Mode Dialog Problem

This is a discussion on Mode Dialog Problem within the Windows Programming forums, part of the Platform Specific Boards category; I am writing a plugin for an iTunes application and trying to pop-up a little dialog box. When I get ...

  1. #1
    Registered User Tonto's Avatar
    Join Date
    Jun 2005
    Location
    New York
    Posts
    1,465

    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
    Last edited by Tonto; 04-09-2007 at 10:21 PM.

    ╔╗╔╦══╦╗╔╦══╦╗
    ║╚╝║╔╗║╚╝║╔╗║║
    ║╔╗║╠╣║╔╗║╠╣╠╣
    ╚╝╚╩╝╚╩╝╚╩╝╚╩╝

    codez http://code.google.com/p/zxcvbn/

  2. #2
    Registered User Tonto's Avatar
    Join Date
    Jun 2005
    Location
    New York
    Posts
    1,465
    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

    ╔╗╔╦══╦╗╔╦══╦╗
    ║╚╝║╔╗║╚╝║╔╗║║
    ║╔╗║╠╣║╔╗║╠╣╠╣
    ╚╝╚╩╝╚╩╝╚╩╝╚╩╝

    codez http://code.google.com/p/zxcvbn/

  3. #3
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,485
    > 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"
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  4. #4
    Registered /usr
    Join Date
    Aug 2001
    Location
    Newport, South Wales, UK
    Posts
    1,262
    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.

  5. #5
    Registered User Tonto's Avatar
    Join Date
    Jun 2005
    Location
    New York
    Posts
    1,465
    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.

    ╔╗╔╦══╦╗╔╦══╦╗
    ║╚╝║╔╗║╚╝║╔╗║║
    ║╔╗║╠╣║╔╗║╠╣╠╣
    ╚╝╚╩╝╚╩╝╚╩╝╚╩╝

    codez http://code.google.com/p/zxcvbn/

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Problem With Vc++7 And Dialog Boxes...
    By elfjuice in forum Windows Programming
    Replies: 4
    Last Post: 05-07-2005, 02:23 AM
  2. a real beginner in Visual C++.net - Q about dialog problem
    By Green Fuze in forum Windows Programming
    Replies: 3
    Last Post: 03-01-2005, 04:24 AM
  3. problem with the open dialog box
    By stallion in forum Windows Programming
    Replies: 13
    Last Post: 02-19-2003, 07:28 AM
  4. Problem with static text in dialog boxes
    By Clyde in forum Windows Programming
    Replies: 11
    Last Post: 05-28-2002, 12:51 PM
  5. problem going into mode 13h
    By ArseMan in forum C++ Programming
    Replies: 5
    Last Post: 08-31-2001, 04:53 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21