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 / Some Thoughts on Retrieving HWnd

Author
Message
Argon Knight
21
Years of Service
User Offline
Joined: 29th Aug 2002
Location: Gastonia, NC, USA
Posted: 9th Dec 2004 04:48
I'd like to ask you guys, what are some of the ways y'all retreive the Hwnd and HInstance without having access to the WinMain?
OSX Using Happy Dude
20
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 9th Dec 2004 05:45
You've still got access to the global pointer system, so it will be found in there...

Haven't done it myself yet though.

Walk softly... and carry a big gun...
Argon Knight
21
Years of Service
User Offline
Joined: 29th Aug 2002
Location: Gastonia, NC, USA
Posted: 9th Dec 2004 06:17
ahh, i didn't notice that in my include dir.

a quick search of the includes shows that it is not referenced by any of the sdk headers, so I guess I have to include it separately.

and hope it works

I was thinking, has anybody every tried the functions like GetWindowLong with darkBasic?
Shadow Robert
21
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 9th Dec 2004 07:55
HWND CurrentWindow = GlobStruct.hWnd; // no?
Failing that, it'll automatically name the window 'Dark Basic Professional Program' or something like that, so:

GetWindowByTitle( "Dark Basic Professional Program" );

woudl probably be the simplist way.. but that'd screw up if you change it.


IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 9th Dec 2004 15:22
Close. The way to do it is:

#include "globstruct.h" // Naturally!

then you can access is like this:

HWND WindowHandle = g_pGlob->hWnd;

*** Coming soon - Network Plug-in - Check my site for info ***
For free Plug-ins and source code http://www.matrix1.demon.co.uk
Y S C
19
Years of Service
User Offline
Joined: 22nd Jan 2005
Location:
Posted: 22nd Jan 2005 10:23
i would like to use dark game sdk in a dll.
but the void darkSDK(); dosn't load at the start and i can't load the window.

please help me. what do i need to do to load the window and unload it or to call the void darkSDK in a way that the window will open.

thenks in advence.

Login to post a reply

Server time is: 2024-03-28 18:58:47
Your offset time is: 2024-03-28 18:58:47