Copy link to clipboard
Copied
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]
Using win32 this senario working:
Hi,
In your menu function use this:
You can defin HINSTANCE gHINSTANCE;
int nRetVal = DialogBoxParam(gHINSTANCE, MAKEINTRESOURCE(IDD_DIALOG1),NULL,DialogProc,0);
need to call dialgproc function, in dialog proc function use:
switch (uMsg)
{
case WM_INITDIALOG:
//CenterDialog(hDlg);
return TRUE;
case WM_COMMAND:
switch (LOWORD(wParam))
{
case IDC_BUTTON1:
AfxMessageBox("button clicked");
case IDOK:
EndDialog(hDlg, IDOK);
break;
case IDCANCEL:
//SendMessage(hDlg, WM_CLOSE, 0, 0);
EndDi
Copy link to clipboard
Copied
Look for dialog samples in the SDK. You cannot use code written for an EXE. One critical difference is that DialogBoxA will look for the dialog resource in the current module. At all times the current module is Acrobat.exe, NOT your plug-in. Other API calls are needed too.
Copy link to clipboard
Copied
I reviewd all samples in sdk, there is no dialog implementation.
I tried to display dialog using win32 and MFC both senerio's still not resolved.
It is crtical for me, Please help on this.
Note: Please connect through Teamviewer, where i was stuck will explain clearly
Thanks!
[Private info removed]
Copy link to clipboard
Copied
You misunderstand the way the forums work. Nobody will connect with you, this is not Adobe support. So far as I know, Adobe no longer offer any developer support otions. You are, here, talking to other Adobe customers who may choose to share their experiences.
Did you deal with the resource loading issue that I mentioned? Clearly you will get nowhere until you do this.
Copy link to clipboard
Copied
> Nobody will connect with you
Correction: You will get contacted, most likely by scammers trying to take control of your computer or stealing your bank or credit-card details. Do not post private information again! I removed it from your post above.
Copy link to clipboard
Copied
> I reviewd all samples in sdk, there is no dialog implementation.
Look at the sample "wxPlugin".
Copy link to clipboard
Copied
Using win32 this senario working:
Hi,
In your menu function use this:
You can defin HINSTANCE gHINSTANCE;
int nRetVal = DialogBoxParam(gHINSTANCE, MAKEINTRESOURCE(IDD_DIALOG1),NULL,DialogProc,0);
need to call dialgproc function, in dialog proc function use:
switch (uMsg)
{
case WM_INITDIALOG:
//CenterDialog(hDlg);
return TRUE;
case WM_COMMAND:
switch (LOWORD(wParam))
{
case IDC_BUTTON1:
AfxMessageBox("button clicked");
case IDOK:
EndDialog(hDlg, IDOK);
break;
case IDCANCEL:
//SendMessage(hDlg, WM_CLOSE, 0, 0);
EndDialog(hDlg, IDCANCEL);
//return TRUE;
break;
}
break;
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more