We value your input! Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey
2007-06-22 08:16 AM - last edited on 2023-08-07 10:34 AM by Doreena Deng
2007-06-22 09:58 AM
csh wrote:I think even if you used the Windows native dialogs, you'd still have to set the resource module to the add-on using ACAPI_UseOwnResModule. But first check if the resource is really there by opening the compiled add-on in resource view.
//
// Win32 modeless dialog creation code starts here...
DWORD error;
if (hwnd == NULL) {
hwnd = CreateDialog(GetModuleHandle(NULL), MAKEINTRESOURCE(IDD_FORMVIEW), NULL, (DLGPROC)DlgProc);
if (hwnd == NULL) {
error = GetLastError();
} else {
ShowWindow(hwnd, SW_SHOW);
}
}
// Win32 modeless dialog creation code ends here...
//
}
hwnd == NULL and error == 1814 ("The specified resource name cannot be found in the image file"). Any ideas on why I can't create the dialog via the resource mechanism?
thanks in advance, Chuck
2007-07-07 03:57 PM
2007-08-18 02:32 PM
HWND _win; BOOL CALLBACK DialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) { return FALSE; } static void Do_Window() { _win = CreateDialog(ACAPI_GetExtensionInstance (), MAKEINTRESOURCE(IDD_DIALOG1), ACAPI_GetMainWindow(), (DLGPROC)DialogProc); //ACAPI_GetExtensionInstance(); //ACAPI_GetMainWindow(); if(_win != NULL) ShowWindow(_win, SW_SHOW); }