Hi everybody,
I am developing one plugin to screenshot every desk when you change it, it's work fine, dexpot is a very good software and was so much easy develop the plugin. Now I like to configure the plugin from dexpot interface but i dont know how to create and manage the dialog in the OnConfigure() method, can you help me?
Thanks.
Dialog to config the plugin
Re: Dialog to config the plugin
Do whatever it is you usually do to create graphical dialogs. Dexpot doesn't care. Some examples from our plugins: Dexgrid uses CreateDialog, Dexcube launches an external configuration utility written in Visual Basic, and Raindexer opens its configuration file in the default text editor.
Re: Dialog to config the plugin
Thanks Patrick, i have doing something wrong because de dialog don't open:
IDD_CONFIG DIALOG 0, 0, 185, 92
STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD
BEGIN
LTEXT "Path de ScreenSots",IDC_STATIC,23,38,68,8
PUSHBUTTON "Button1",IDC_BUTTON1,89,58,50,14
EDITTEXT IDC_EDIT1,89,34,60,14,ES_AUTOHSCROLL
END
BOOL CALLBACK DexShot::DialogConfig(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
switch(message)
{
case WM_INITDIALOG:
{
/// initialize dialog
}
break;
}
return TRUE;
}
void DexShot::OnConfigure()
{
CreateDialog(GetModuleHandle(NULL), MAKEINTRESOURCE(IDD_CONFIG), dex->GetDexpotWindow(), DialogConfig);
}
Thnaks again.
IDD_CONFIG DIALOG 0, 0, 185, 92
STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD
BEGIN
LTEXT "Path de ScreenSots",IDC_STATIC,23,38,68,8
PUSHBUTTON "Button1",IDC_BUTTON1,89,58,50,14
EDITTEXT IDC_EDIT1,89,34,60,14,ES_AUTOHSCROLL
END
BOOL CALLBACK DexShot::DialogConfig(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
switch(message)
{
case WM_INITDIALOG:
{
/// initialize dialog
}
break;
}
return TRUE;
}
void DexShot::OnConfigure()
{
CreateDialog(GetModuleHandle(NULL), MAKEINTRESOURCE(IDD_CONFIG), dex->GetDexpotWindow(), DialogConfig);
}
Thnaks again.
Re: Dialog to config the plugin
You have to add the WS_VISIBLE style to the dialog template or show it manually:
Code: Select all
HWND hWndConfig = CreateDialog(GetModuleHandle(NULL), MAKEINTRESOURCE(IDD_CONFIG), NULL, DialogConfig);
if(hWndConfig) ShowWindow(hWndConfig, SW_SHOW);
Re: Dialog to config the plugin
Thanks Patrick for your time... but it does't work... I still trying... Is correct this way to get the Instance? I don't know how the system work with Instance for the plugins.
Re: Dialog to config the plugin
It worked finally, the problem was that I was giving the wrong address for the processing method of the dialog events. The creation of the dialog ended up doing this:
CreateDialog (GetModuleHandle (NULL), MAKEINTRESOURCE (IDD_CONFIG), dex-> GetDexpotWindow (), DexShot: DialogConfig)
Long time no programing in c++
Regards.
CreateDialog (GetModuleHandle (NULL), MAKEINTRESOURCE (IDD_CONFIG), dex-> GetDexpotWindow (), DexShot: DialogConfig)
Long time no programing in c++
Regards.
Who is online
Users browsing this forum: No registered users and 10 guests