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 / default window

Author
Message
Foz
16
Years of Service
User Offline
Joined: 18th Dec 2007
Location: California
Posted: 14th May 2008 09:39
How can I get a list of commands to manipulate (or even delete) the default window created in Dark GDK programs? The only one i've found so far in the forums - dbWindowOFF() - didn't work, gave me an "identifier not found" error...


Foz, I am.
monotonic
18
Years of Service
User Offline
Joined: 24th Mar 2006
Location: Nottinghamshire, England
Posted: 14th May 2008 11:25
IIRC it's dbWindowOff not dbWindowOFF.

Quote: "How can I get a list of commands to manipulate (or even delete) the default window created in Dark GDK programs?"


Why would you want to delete the window created in GDK?


But, if you want to manipulate the window properties you can use the Win32 API calls and pass the HWND.

To do this you would need to include 'globstruct.h', you can access the HWND like this:

g_pGlob->hWnd

and the HINSTANCE like:

g_pGlob->hInstance

Microsoft Windows = BSOD
Microsoft XBOX 360 = RROD
Foz
16
Years of Service
User Offline
Joined: 18th Dec 2007
Location: California
Posted: 15th May 2008 07:26
yes, I'm vaguely familiar with that API from my limited work with VB.net and C#. I'm not comfortable enough with it to do much on my own - is there a good tutorial I could use?...


Foz, I am.
monotonic
18
Years of Service
User Offline
Joined: 24th Mar 2006
Location: Nottinghamshire, England
Posted: 15th May 2008 13:53
The following site seems to be ok.

http://www.winprog.org/tutorial/

Microsoft Windows = BSOD
Microsoft XBOX 360 = RROD
Foz
16
Years of Service
User Offline
Joined: 18th Dec 2007
Location: California
Posted: 16th May 2008 05:09
That did look like a good tutorial, thanx for pointing it out - but I got thrown for a loop pretty quickly...

So, you can't use the GDK wizards or even "void DarkGDK(void)" as the entry point in a program if you intend to access the Windows API? Do I create a CLR program, a Win32 program, or use the MFC?...at the risk of making myself look like the biggest newb in the entire field of programming, I'm lost...


Foz, I am.
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 16th May 2008 16:47
I THINK its a win32 app... but I know there are various settings that get set when you can select the DarkGDK Wizards...

Can you use those? If not, maybe you should ask someone for a project made with a wizard, and just use that as a tempalte or something.

jinzai
18
Years of Service
User Offline
Joined: 19th Aug 2006
Location: USA
Posted: 16th May 2008 17:35
The only thing GDK hides is the WinMain, and also Windows programs usually have an InitApplication (called once) and an InitInstance (called for each copy of the program running.). All that you are missing is the registration of the window class, and the initial window creation.

You can use almost any Windows API function in a GDK application, but you might have to make some extra function calls, or access the globstruct structure first to get the information that the API call requires. Or, you may have to include a file and/or a library to the project, just as you would with any Win32 project. There is nothing in the Windows world that is magic about GDK...one of its stronger features, imo.

Probably any 32 bit Windows sample code can be modified to work, but it is a situational thing.....i.e. It depends on what it is doing, and how it needs to be setup.
Foz
16
Years of Service
User Offline
Joined: 18th Dec 2007
Location: California
Posted: 17th May 2008 04:43 Edited at: 17th May 2008 04:47
Let me ask this...

the following is the code for a simple, empty DarkGDK project that everyone's seen a hundred times...:



If I were wanting to add the least amount of code possible to do nothing but, say, maximize the window and hide the border, what would that be?...


Foz, I am.
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 17th May 2008 05:07
Foz
16
Years of Service
User Offline
Joined: 18th Dec 2007
Location: California
Posted: 17th May 2008 09:33
Ah, - 'Set Window Off' from DBPro. I see now...I won't necessarily need to use the windows API, or mess with the 'make the right pointer to the right handler just to chew your food' crap...

I find myself liking DarkGDK more every day. And Thanks for the help.


Foz, I am.

Login to post a reply

Server time is: 2024-11-20 11:32:26
Your offset time is: 2024-11-20 11:32:26