-
Mode Dialog Problem
I am writing a plugin for an iTunes application and trying to pop-up a little dialog box. When I get the word I say
Code:
// On dialog creation notification...
HWND dlg = CreateDialogParam(
GetModuleHandle(TEXT("Itunesplugin.dll")),
MAKEINTRESOURCE(IDD_DIALOG),
0, &DlgProc, LPARAM(vpd));
And the dialog resource is defined as
Code:
IDD_DIALOG DIALOGEX 10, 10, 294, 153, 0
STYLE DS_MODALFRAME | 0x0004 | WS_CAPTION | WS_SYSMENU | WS_VISIBLE | WS_POPUP
CAPTION "Dialog"
FONT 8, "MS Sans Serif", 700, 0 /*FALSE*/
BEGIN
/* ... Stuff... */
END
As it is a plugin app, I do not know whether iTunes does something like IsDialogMessage or something, but I do know that the presence of my dialog messes up the app, so that it isn't updated and I drag my dialog around and it looks like when you win at the windows solitaire, like this:
http://img.photobucket.com/albums/v2...o1/loooolc.jpg
What is the problem, and how can I fix it? Edit: I meant to say modeless
-
Note: This problem exists whether or not the dialog was created in the same or a different thread than the main thread calling the plug-in
-
> I do not know whether iTunes does something like IsDialogMessage or something
Well is there some kind of iTunes plugin SDK which you can refer to, with examples of how to do things?
It's going to be a lot harder to do by guesswork if there isn't.
5 seconds later
google "itunes sdk"
-
Well the thing I'd probably do in this situation is trace through execution and see where it goes. Maybe something you're doing is preventing control moving back to iTunes, or it's doing something bizarre that is incompatible with your approach.
Of course, that would depend on how confident you are about your assembly language reading skills. ;)
You'd save time if you do as Salem says.
-
The sdk documentation is sparse, and the example does not cover the creation of something like an external window. I am going to look at some open source code (audioscrobbler) for more info.