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.

DarkBASIC Professional Discussion / sorry `subclassing`, still not getting it.

Author
Message
HAL
23
Years of Service
User Offline
Joined: 28th Aug 2002
Location:
Posted: 21st Apr 2003 21:45
here's the code of a dll i have:

it's basicly the code of someone's example of subclassing that i have altered to accept the handle of my db project window. it works fine but it still does what my other examples did which is when the dll is called it seems to loop within the dll and doesn't return to the db program.

could this be because i'm doing this with the 'call dll' function instead of compiling using the pluging method, it's a bit hard to explain but i thought by subclassing the db project window you where just changing the area where the messages are proccessed and once this was done the window would just act on the new area until the program ended, no need to call the function again?
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 21st Apr 2003 23:16
It looks like you are doing too much in your code - all you should be doing is registering your new WndProc - DB provides the message loop.

I've switched some stuff around in your code:



Please note: this is untested - have fun
HAL
23
Years of Service
User Offline
Joined: 28th Aug 2002
Location:
Posted: 22nd Apr 2003 03:34
just one more thing , i get an `illegal operation error` when i close the program down, is this because by changing the procedure i now have to handle all the messages myself?

i'd just like to say IanM, to add you to my credits would be to little!, also i'd like to thank everyone else because you never know what might happen, and i feel its important that you know how much i appreciate all the help you've given me. as you can tell i'm very happy, i know i've still got a long way to go but it's such a buzz when you make a mini break-through, not just with getting things working but also with understanding how they work.

i'm off to have fun. [b])
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 22nd Apr 2003 15:16
You have to restore the old settings before you exit too
Shadow Robert
23
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 22nd Apr 2003 16:39
remember you have to release what you create, especially under Windows98 or above - it would be a good idea to use the Global Pointer to achieve that

Tsu'va Oni Ni Jyuuko Fiori Sei Tau!
One block follows the suit ... the whole suit of blocks is the path ... what have you found?
HAL
23
Years of Service
User Offline
Joined: 28th Aug 2002
Location:
Posted: 22nd Apr 2003 21:48
thanks IanM, so i need to make another function to reverse the procedure thing and call it before the program ends.
Raven i know i have to make a way to return the values back to my db program i was going to write the values to memory in the dll then use db's indirect thing `*` to pick them out, is this what you mean?, i'm not sure how to set this up..

Login to post a reply

Server time is: 2026-07-11 09:30:05
Your offset time is: 2026-07-11 09:30:05