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 / DGK(C++) Form

Author
Message
Jna99
18
Years of Service
User Offline
Joined: 3rd Nov 2005
Location: Portugal
Posted: 15th May 2007 00:20
Here I leave my code so far, I have no idea I can link the form to my code so far...so that the darkdgk window appears in my form...YES Ive read all the threads so far, but so far I only have seen examples for the C# none for C++!

Attachments

Login to view attachments
Jna99
18
Years of Service
User Offline
Joined: 3rd Nov 2005
Location: Portugal
Posted: 15th May 2007 22:07
Anyone? This is what I have so far, It's giving me a probl with the override cause I'm using int instead of Hwnd, but I don't know how to return to override....
APEXnow
Retired Moderator
21
Years of Service
User Offline
Joined: 15th Apr 2003
Location: On a park bench
Posted: 16th May 2007 03:03 Edited at: 16th May 2007 03:08
Here ya go.. I've had to make several changes to your project, but this does exactly what you're after. Only difference is, I ignore the button create event and just create the view control.

One thing I have not done, is to hide the initial DGDK window. There is a method to do this, but I didn't implement this in your project. It basically requires you to obtain the original DGDK window handle and hide it before you override the picture control.

[EDIT] Note, I had to change your Object class, to CDBObject, because naming a class as Object, is ambiguous, specially since ALL .NET classes derive from (Object) anyway. But I forgot to rename your Object.cpp file. The header and class def are fine though.

Paul.


Abundance = Choice = Freedom - Scarcity = Dependancy = Control, Truth!

Attachments

Login to view attachments
Jna99
18
Years of Service
User Offline
Joined: 3rd Nov 2005
Location: Portugal
Posted: 16th May 2007 16:34
OK APEX I'll take a look thanks
Jna99
18
Years of Service
User Offline
Joined: 3rd Nov 2005
Location: Portugal
Posted: 17th May 2007 01:10
Apex is any way of hidding the dummy black window that appears too?
monotonic
18
Years of Service
User Offline
Joined: 24th Mar 2006
Location: Nottinghamshire, England
Posted: 25th May 2007 14:51
I'm not currently at my development machine, so I can't test this but, could you not just get the original HWND, set the new one then call the standard CloseWindow function?

I know the voices aren't real, but they have good ideas!
APEXnow
Retired Moderator
21
Years of Service
User Offline
Joined: 15th Apr 2003
Location: On a park bench
Posted: 25th May 2007 22:01
Nope, because the message pump isn't transferred. If you close the original window, it closes the whole application. The window needs to be subclassed and messages caught before they are passed to DGDK.

Paul.


Abundance = Choice = Freedom - Scarcity = Dependancy = Control, Truth!
Jna99
18
Years of Service
User Offline
Joined: 3rd Nov 2005
Location: Portugal
Posted: 5th Jun 2007 19:53
APEX I've found a huge problem, the mouse seems to get its position from the window in the background....

APEXnow
Retired Moderator
21
Years of Service
User Offline
Joined: 15th Apr 2003
Location: On a park bench
Posted: 5th Jun 2007 21:56
Yeah, and this is a known problem as well. Have you tried to use the standard Event handling of the form?

Paul.

Jna99
18
Years of Service
User Offline
Joined: 3rd Nov 2005
Location: Portugal
Posted: 6th Jun 2007 00:35
Isn't there any other way...by the way has this been reported?

Jna99
18
Years of Service
User Offline
Joined: 3rd Nov 2005
Location: Portugal
Posted: 7th Jun 2007 15:10 Edited at: 8th Jun 2007 04:11
Hi again people just to say that I've overcame the problem, I used the MouseEventArgs, but I found something strange..the keycontrols work! eg:


EDIT: Actually I just found out that the code worked because the background window was selected....

Jna99
18
Years of Service
User Offline
Joined: 3rd Nov 2005
Location: Portugal
Posted: 8th Jun 2007 18:17 Edited at: 9th Jun 2007 13:59
....by the way I know that I shouldn't be posting this here but can someone tell me how can I return the keycode of a pressed key in C++ .NET, I'm using a keypress eventhandler but I doesn't seem to enter in that method when a key is pressed....

EDIT: I've found out..but the keyValue returns me some value e.g "A" = 65 that is different from 30 that GDK prints...

Jna99
18
Years of Service
User Offline
Joined: 3rd Nov 2005
Location: Portugal
Posted: 9th Jun 2007 17:58
anyone....

Login to post a reply

Server time is: 2024-09-29 01:15:00
Your offset time is: 2024-09-29 01:15:00