Positioning Message Box MFC

This is a discussion on Positioning Message Box MFC within the Windows Programming forums, part of the Platform Specific Boards category; Could someone tell me if it is possible to give screen co ordinates for positioning MessageBoxes using MFC, thanks....

  1. #1
    ResurgentBarbecue UnclePunker's Avatar
    Join Date
    May 2002
    Posts
    128

    Positioning Message Box MFC

    Could someone tell me if it is possible to give screen co ordinates for positioning MessageBoxes using MFC, thanks.
    Compiler == Visual C++ 6.0
    "Come Out Fighting."

  2. #2
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,673
    - Create a thread to display a message box with a known title
    - In the main thread, use FindWindow() to get the HWND of the message box
    - Call MoveWindow()

    You will want to put some retry logic on the FindWindow() call to allow the other thread to finish creating the message box.

    gg

  3. #3
    ResurgentBarbecue UnclePunker's Avatar
    Join Date
    May 2002
    Posts
    128
    Thanks a lot for that Codeplug, it worked, first time aswell!!!!!!!
    Compiler == Visual C++ 6.0
    "Come Out Fighting."

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. MFC check box question
    By MyglyMP2 in forum Windows Programming
    Replies: 2
    Last Post: 03-09-2009, 05:47 PM
  2. How to program a "back" button with MFC
    By 99atlantic in forum Windows Programming
    Replies: 3
    Last Post: 04-26-2005, 08:34 PM
  3. Context Menu & Dialog Box :: MFC
    By kuphryn in forum Windows Programming
    Replies: 4
    Last Post: 08-11-2002, 10:01 AM
  4. MFC Assertion Failure
    By maxthecat in forum Windows Programming
    Replies: 5
    Last Post: 08-01-2002, 09:58 AM
  5. Replies: 1
    Last Post: 07-13-2002, 05:45 PM

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