Trying to add a dialog in acrobat sdk projects using Vc++/c++
Hi Team,
I'm using Acrobat Adobe Dc Samples Basic Plugin project, I enabled another submenu under Acrobat sdk.
So, whenever i'm clicking that submenu the action enabled in that function i wrote code for Dialog purpose.
Way One: Inside function:
I wrote modal dialog code from Acrobat adobe pulgins pdf document:
code:
HWND CapturehWnd, hParent, hWnd;// nRetVal;
HINSTANCE gHINSTANCE;
CapturehWnd = GetCapture();
if (CapturehWnd != NULL)
ReleaseCapture();
hParent = WinAppGetModalParent(AVAppGetActiveDoc());
int nRetVal = DialogBoxA(gHINSTANCE, MAKEINTRESOURCE(IDD_DIALOG1), hParent,AboutDlgProc);
if (CapturehWnd != NULL)
SetCapture(CapturehWnd);
static AVWindow sAVWin;
//.....
// hWnd is the window handle of the dialog box window
HWND hWnd1;
sAVWin = AVWindowNewFromPlatformThing(AVWLmodal, 0, NULL,gExtensionID,0);
AVAppBeginModal(sAVWin);
AVAppEndModal();
AVWindowDestroy(sAVWin);
Way Two: Inside function:
I added Dialog resource and created the class from Cdialog
I used mfc code for dialog like:
Mydialog obj; //Mydialog is the dialog class
obj.domodal;//domodal doesnt called
Runtime Exception:afxwin1.inl line 24
Note: I refered all the sites and implemented based on suggetions.
Kindly support to me.
If any need please feel reach out me
[Edit: Personal information removed by Mod]
