Thread: Getting a HWND

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

    Getting a HWND

    I am dabling in DLLs and to test I want to pop up a textbox that says "Dll loaded" or something. I don't have an HWND to send the MessageBox to. I usually code in MFC appwizard apps, and have an m_hWnd handle.

    How do I get an HWND when there is not one associated with my application, or in this case a DLL.
    Best Regards,

    Bonkey

  2. #2
    the hat of redundancy hat nvoigt's Avatar
    Join Date
    Aug 2001
    Location
    Hannover, Germany
    Posts
    3,130
    If you just need a MessageBox, use NULL as HWND parameter.
    hth
    -nv

    She was so Blonde, she spent 20 minutes looking at the orange juice can because it said "Concentrate."

    When in doubt, read the FAQ.
    Then ask a smart question.

  3. #3
    Registered User
    Join Date
    Aug 2002
    Posts
    170
    Thanks that worked. I didn't realize it could be null.
    Best Regards,

    Bonkey

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Avoiding Global variables
    By csonx_p in forum Windows Programming
    Replies: 32
    Last Post: 05-19-2008, 12:17 AM
  2. Button handler
    By Nephiroth in forum Windows Programming
    Replies: 8
    Last Post: 03-12-2006, 06:23 AM
  3. My first "real" windows app
    By JoshR in forum Windows Programming
    Replies: 2
    Last Post: 07-28-2005, 07:40 AM
  4. opengl program as win API menu item
    By SAMSAM in forum Game Programming
    Replies: 1
    Last Post: 03-03-2003, 07:48 PM