Thread: Can't get a handle on these Handles

  1. #1
    Registered User
    Join Date
    Aug 2002
    Posts
    6

    Talking Can't get a handle on these Handles

    Hi all;
    Thanks to the Tutorial I can now put cool looking Windows Message Boxes into my 32-bit console applications.
    I can't however get them to appear in the middle of my console window, unless I position my console in the centre of the screen all the time.
    I think that I need to do something with the HWND parameter within the MessageBox function to achieve this.
    At the moment my MessageBox function looks something like this...
    Code:
    	MessageBox(NULL, "Program Successfully Completed", "Program Message ", MB_OK);
    What should I change "NULL" to in order to 'tell the message box' who its owner is?
    What other changes need to be made within the rest of the program to accomodate this?
    Thanks in advance.

  2. #2
    Banned Troll_King's Avatar
    Join Date
    Oct 2001
    Posts
    1,784
    In GTK+ a handler is a user defined method that is invoked by a widget. I can't say much for Microcrap Windows though.

  3. #3
    Refugee face_master's Avatar
    Join Date
    Aug 2001
    Posts
    2,052
    maybe you could use FindWindow() to find your window and get a handle to it, but I've never tried it in console apps.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Getting other processes class names
    By Hawkin in forum Windows Programming
    Replies: 3
    Last Post: 03-20-2008, 04:02 PM
  2. Direct3D problem
    By cboard_member in forum Game Programming
    Replies: 10
    Last Post: 04-09-2006, 03:36 AM
  3. Button handler
    By Nephiroth in forum Windows Programming
    Replies: 8
    Last Post: 03-12-2006, 06:23 AM
  4. Is there any way?
    By Blackbox in forum C++ Programming
    Replies: 2
    Last Post: 05-21-2003, 06:05 PM
  5. a simple C question...
    By DramaKing in forum C Programming
    Replies: 10
    Last Post: 07-28-2002, 02:04 PM