Can't get a handle on these Handles

This is a discussion on Can't get a handle on these Handles within the Windows Programming forums, part of the Platform Specific Boards category; Hi all; Thanks to the Tutorial I can now put cool looking Windows Message Boxes into my 32-bit console applications. ...

  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, 05:02 PM
  2. Direct3D problem
    By cboard_member in forum Game Programming
    Replies: 10
    Last Post: 04-09-2006, 04: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, 07:05 PM
  5. a simple C question...
    By DramaKing in forum C Programming
    Replies: 10
    Last Post: 07-28-2002, 03:04 PM

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