Dialog question w/ win32 API

This is a discussion on Dialog question w/ win32 API within the Windows Programming forums, part of the Platform Specific Boards category; ok the function to create dialog box requires an hInstance param. Is there a way I can get this handle ...

  1. #1
    Quietly Lurking
    Join Date
    Aug 2001
    Posts
    208

    Dialog question w/ win32 API

    ok the function to create dialog box requires an hInstance param.
    Is there a way I can get this handle from inside the dialog procedure function. Thanks...

  2. #2
    Registered User
    Join Date
    Feb 2002
    Posts
    14
    Try:
    Code:
    long hInstance = GetWindowLong(NULL, GWL_HINSTANCE);
    good luck
    Dharius

  3. #3
    erstwhile
    Join Date
    Jan 2002
    Posts
    2,227
    also..

    HINSTANCE hInst=GetModuleHandle(0);

    works just about anywhere.

  4. #4
    Quietly Lurking
    Join Date
    Aug 2001
    Posts
    208
    thanks to both you, thats exactly what i needed

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. small dialog question
    By fdy in forum C++ Programming
    Replies: 3
    Last Post: 05-18-2004, 11:03 AM
  2. OpenSSL and Win32 SSL API :: SSL/TLS
    By kuphryn in forum Networking/Device Communication
    Replies: 0
    Last Post: 03-10-2004, 06:46 PM
  3. Textbox in Win32 API ???
    By actionbasti in forum Windows Programming
    Replies: 1
    Last Post: 11-07-2003, 01:29 AM
  4. Win32 API Questions
    By CPP-Null in forum C++ Programming
    Replies: 1
    Last Post: 05-25-2003, 04:26 PM
  5. Win32 API
    By Liger86 in forum Windows Programming
    Replies: 2
    Last Post: 01-30-2003, 01:19 PM

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