Dialog to config the plugin

Post a reply


This question is a means of preventing automated form submissions by spambots.
Smilies
:D :) :( :o :shock: :? :cool: :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :!: :?: :idea: :arrow: :| :mrgreen: (wave) :ok: (nod)
View more smilies

BBCode is ON
[img] is ON
[flash] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Dialog to config the plugin

Re: Dialog to config the plugin

Post by iam » 13.06.2011 17:11:48

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.

Re: Dialog to config the plugin

Post by Guest » 07.06.2011 16:19:16

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

Post by Patrick » 05.06.2011 13:47:06

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

Post by iam » 03.06.2011 16:27:33

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.

Re: Dialog to config the plugin

Post by Patrick » 02.06.2011 20:48:52

:dex:

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.

Dialog to config the plugin

Post by iam » 01.06.2011 15:29:52

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.

Top