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 / DarkGDK GUI Trouble Making the Message Handler - Passing Function Pointer

Author
Message
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 21st Apr 2008 00:33
Hello,

I'm working on this GUI ... (Screenie):
http://forum.thegamecreators.com/xt/xt_apollo_pic.php?i=1479986

...that's part of my DarkGDK OOP library...
Thread: http://forum.thegamecreators.com/?m=forum_view&t=124748&b=22

Download: http://code.google.com/p/darkgdkoop/

...and well...

I'm at the point where I need to Pass a FUNCTION'S POINTER (The address to a message handler) to the Window Class Constructor. Like Windows, Like I've done in FreePascal. I can't seem to get the Syntax Right.

Would you believe I figured this out while posting this message! ... I'll Go On so next person can do this.


I can DECLARE a POINTER to a FUNCTION:



This is basically a "TYPE" that just happens to describe a function.

I now have a member of my window class....



Add the Constructor...



And now - when I instantiate this class - I can pass a ZERO (and I have code elsewhere that checks for ZERO before calling this message handler function) OR I pass a custom message handler for my new window. Now I can move forward Thanx.... um... Well... If you guys weren't here - I wouldn't of tried posting - which is how I figured it out... Ah well... Code Symantics you know?

Codger
21
Years of Service
User Offline
Joined: 23rd Nov 2002
Location:
Posted: 21st Apr 2008 00:36
Glad we could be of help

System
PIV 2.8 MZ 512 Mem
FX 5600 256 mem
Pixel Perfect
17
Years of Service
User Offline
Joined: 21st Feb 2007
Location: UK
Posted: 21st Apr 2008 00:38
lol ... that's very efficient Jason .. answering your own questions

Your GUIs looking nice btw!

No matter how good your code is, someone will improve on it
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 21st Apr 2008 01:36
Thanx Codger, Pixel Perfect.

Thanx for the kind words Pixel. Its coming along decent. It has some neat drawing features and more to come. Nothing to to fancy - but - must be pliable

Login to post a reply

Server time is: 2024-09-29 17:29:23
Your offset time is: 2024-09-29 17:29:23