View Full Version : How to use opSetPluginPage
Tokelil
02-18-2004, 05:02 PM
Anyone used opSetPluginPage yet? I have tried it but I couldn't get it to work. I think its because I dont set PluginPrefPage.lpTemplate to the right value, so what should this membervariable be?
Anyone used opSetPluginPage yet? I have tried it but I couldn't get it to work. I think its because I dont set PluginPrefPage.lpTemplate to the right value, so what should this membervariable be?
Normally:
PluginPrefPage.lpTemplate = MAKEINTRESOURCE(IDD_MYPLUGINDIALOG);
Also note that preferences pages must be set as 'child' dialogs, with no frame, and set as a 'control' dialog (under 'more styles' in dialog editor).
The size of a pref page can not be larger than (preferrably exactly) 266x180 dialog units (in the dialog editor).
Tokelil
02-19-2004, 02:29 AM
Thanks. I'll try out the things you said tomorrow! I tried MAKEINTRESOURCE() once but it didn't work. (probably my fault!) So I started convertion "all" my plug-ins to unicode, which is long over due!!!
Tokelil
02-19-2004, 11:15 AM
Hmmm still can't get it to work. :pirate:
_TCHAR strDisplayText[256];
QCDCallbacks->Service(opUCS2toUTF8, _T("Playlist Sample Mode"), (long)strDisplayText, 256);
pPPP.struct_size = sizeof(PluginPrefPage);
pPPP.hModule = hInstance;
pPPP.lpTemplate = MAKEINTRESOURCE("IDD_CONFIGURE1");
pPPP.lpDialogFunc = dlgConfigCallback;
pPPP.lpDisplayText = strDisplayText;
m_iPlugInPageID = QCDCallbacks->Service(opSetPluginPage, &pPPP, 0, 0);
I have created an new empty small dialog, with properties you mentioned. Any ideas?
pPPP.lpTemplate needs to be set the same way you would pass the template in to CreateDialog.
Tokelil
02-19-2004, 07:53 PM
Ahhh overlooked those ". Thanks for the help.
Tokelil
02-20-2004, 01:32 AM
Sorry to bother you one more time with this... But I still have a few issues and comments.
The PDK says that I should subclass the play and save the preferences on WM_PN_DIALOGSAVE. I never recives that message though. (Subclassing works for other messages)
Should I destroy the dialog (EndDialog()) when reciving WM_PN_DIALOGSAVE or does QCD do that?
I think it would be more intuative if the added pages was put in the Plug-ins subsection rather than the Settings subsection. Or maybe make it optional where to place it.
BTW, I have trayicon set so a triple click brings player to front. Seems like it doesn't work probably in B71.
The PDK says that I should subclass the play and save the preferences on WM_PN_DIALOGSAVE. I never recives that message though. (Subclassing works for other messages)
It doesn't say to subclass the player at all. It says it will send that message to your dialog.
Should I destroy the dialog (EndDialog()) when reciving WM_PN_DIALOGSAVE or does QCD do that?
No, QCD will destroy the dialog.
I think it would be more intuative if the added pages was put in the Plug-ins subsection rather than the Settings subsection. Or maybe make it optional where to place it.
Plugin configuration should not go in preference pages. User-level features that happen to be in plugins should be surfaced.
BTW, I have trayicon set so a triple click brings player to front. Seems like it doesn't work probably in B71.
I'll check.
Tokelil
02-20-2004, 02:20 AM
Thanks!
shaohao
02-21-2004, 07:24 PM
Hi, Paul:
I want to insert my own encoder config dialog box into encoder format section as your MP3 encoder, DiskWrite encoder plug-in did, Not in a new section.
Can you give me a hand?
To set the preference page for an encoder, set:
PluginPrefPage::reserved = 0x1000; // encoder page
The dimensions of an encoder page should not exceed: 266x180 dlg units
To match font type, set the dialog's font to Tahoma.
vBulletin® v3.8.4, Copyright ©2000-2010, Jelsoft Enterprises Ltd.