Print Thread
Plugin - VS C++ - add windows
#64614 05/19/23 10:20 PM
Joined: Nov 2016
Posts: 93
F
fabrice Offline OP
Member
OP Offline
Member
F
Joined: Nov 2016
Posts: 93
Hello, i am playing with plugin.
I start from Visual Studio example delivered with pl/sql dev, compile the dll, and everything work fine.
Now, i want to add a window, like a configuration windows.
In visual studio, i add a dialog in resources files (IDD_DIALOG1).
I try to show the dialog with this command :

DialogBox(GetModuleHandle(NULL), MAKEINTRESOURCE(IDD_DIALOG1), NULL, DialogProc);
DialogProc is the callback function

But, my dialog never open.
I'm not sure it's correct to use GetModuleHandle(NULL).
Can someone show me my mistake(s) or a better way to do it.
Thanks

Last edited by fabrice; 05/20/23 11:07 AM.
Re: Plugin - VS C++ - add windows
fabrice #64616 05/21/23 10:08 AM
Joined: Jun 2015
Posts: 72
Russia
L
Member
Offline
Member
L
Joined: Jun 2015
Posts: 72
Russia
Save hInstance in DllEntryPoint(), then use it in DialogBox.

Re: Plugin - VS C++ - add windows
fabrice #64617 05/21/23 12:45 PM
Joined: Nov 2016
Posts: 93
F
fabrice Offline OP
Member
OP Offline
Member
F
Joined: Nov 2016
Posts: 93
I replace GetModuleHandle(NULL) by save hInstance , and my dialog appear.

Thanks

Last edited by fabrice; 05/21/23 02:24 PM.

Moderated by  support 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Release build 20200307)
Responsive Width:

PHP: 7.1.33 Page Time: 0.028s Queries: 16 (0.008s) Memory: 2.5005 MB (Peak: 3.0378 MB) Data Comp: Off Server Time: 2024-03-29 01:56:08 UTC
Valid HTML 5 and Valid CSS