Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / GDK Window Handle

Author
Message
Mahoney
16
Years of Service
User Offline
Joined: 14th Apr 2008
Location: The Interwebs
Posted: 23rd Jun 2008 16:52
What is the window handle for the DarkGDK? Example:



The prototype is this:



So, I guess my question is what is the handle for the GDK and what do I put in for UINT uType?
bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 23rd Jun 2008 17:42
MessageBoxA (g_pGlob->hWnd, "Message", "This is a message box!", 1);
sydbod
16
Years of Service
User Offline
Joined: 14th Jun 2008
Location: Just look at the picture
Posted: 23rd Jun 2008 18:50
Quote: "g_pGlob->hWnd"


Thanks for that.

I also required that information to place a few buttons on the window.
Sephnroth
21
Years of Service
User Offline
Joined: 10th Oct 2002
Location: United Kingdom
Posted: 23rd Jun 2008 19:03
g_pGlob requires including the globstruct.h header (as you obviously know ) which is a bit of a waste for just a message box. If all you're doing is using the messagebox function then dont bother with the header and just pass NULL as the hwnd parameter.

Zuka
16
Years of Service
User Offline
Joined: 21st Apr 2008
Location: They locked me in the insane asylum.
Posted: 23rd Jun 2008 19:37
You beat me, fool.

If you can do any models for FW, reply to the FleetWars thread.

Click here!
Mahoney
16
Years of Service
User Offline
Joined: 14th Apr 2008
Location: The Interwebs
Posted: 24th Jun 2008 01:38
Thanks guys. Very useful.
elantzb
16
Years of Service
User Offline
Joined: 10th May 2008
Location: Classified
Posted: 24th Jun 2008 09:03
MessageBox functions work fine with a NULL value foer the window handle parameter.
Mahoney
16
Years of Service
User Offline
Joined: 14th Apr 2008
Location: The Interwebs
Posted: 24th Jun 2008 09:26
Here's a link that elantzb posted in another thread. Very useful info.

http://msdn.microsoft.com/en-us/library/ms645505(VS.85).aspx
SunDawg
19
Years of Service
User Offline
Joined: 21st Dec 2004
Location: Massachusetts
Posted: 26th Jun 2008 22:33
Using NULL instead of the window's handle isn't the same. Supplying the handle forces the user to respond to the message box before the program receives user input again. Null allows the user to ignore the message box and continue using the program, which could cause problems if the program is waiting for an IDOK or other response from the dialog.


My site, for various stuff that I make.
Mahoney
16
Years of Service
User Offline
Joined: 14th Apr 2008
Location: The Interwebs
Posted: 27th Jun 2008 03:47
I'm trying to learn to use the Win32 API in other apps, and I found this page about doing so:

http://msdn.microsoft.com/en-us/library/ms633575(VS.85).aspx


The code from the page is posted below. I've slightly modified it because of an error with their usage of BOOL.



But, I get errors from it still. This is the output when I try to build:



What should I do? I tried cleaning and rebuilding.

Login to post a reply

Server time is: 2024-09-30 01:32:19
Your offset time is: 2024-09-30 01:32:19