My code is developed in IBP, yours in C++ if I read correct. I see no problem having a module for ASTAR and one for DJISTRA.
Printable View
My code is developed in IBP, yours in C++ if I read correct. I see no problem having a module for ASTAR and one for DJISTRA.
Randall,
a possible work around about %WM_PAINT is to clear the message queue of the window using ClearMessages(hDlg) where hDlg is the handle of the window.
ClearMessages(hDlg) is a unique thinBasic command (not a standard Windows behave) used to clear the internal queue thinBasic store for every window. So write something like:
[code=thinbasic]
CASE %WM_PAINT
Call Paint_Grid_Window()
Call Paint_Draw_Mode_Legend()
ClearMessages(hDlg)
[/code]
so script will clear the window message queue avoiding to return so many %WM_PAINT
As I said, it is a trick and not a standard or general behave to be used other than in thinBasic script.
Hope it makes some difference.
I'm looking at UI module in order to find an official way to get it working correctly. %WM_PAINT message are in reality fired by windows but each belonging to different child windows. So I need to trap them all and fire only the relevant ones.
Ciao
Eros
Forgot to say,
if you make significant changes or fix important bugs, please remove you attachement in first post and attach again the project so other can remain updated.
You can also create sticky posts in this forum because you are moderator.
Ciao
Eros
Thanks Eros,
I'll give it a try this evening when I get home from work.
The GetMessage function has an optional parameter, which is a pointer to a NMHDR structure. Is the ID of the window (control) generating the WM_PAINT message stored in that structure? If so, I could just react to the windows I want, and ignore the rest.
Thanks again,
Randall
Yes, Randal, seems you got it.
I've done few tests and seems IDFrom in notification structure returns the handle or the ID of the control sending the %WM_PAINT message.
So you need to test if IDFrom contains the window handle.
Thanks about this idea. Seems you know much better than me behind the curtains engines :D
Let me know if it works better than clearing the message queue.
Ciao
Eros
Hah! Just a lucky guess on my part. Even a blind squirrel gets an acorn once in a while. :DQuote:
Originally Posted by ErosOlmi
Thanks for the information, Eros. I'll give it a try this evening.
Randall
What screen resolution was the program written for?
I run 800 x 600 and the window doesn't look right.
Thanks
Sandy
1280x1024 or higher here.
But yes, window is fixed size. Maybe, after refresh problems are solved, next version will be a resizable one with maze autoadjusting.
Yes, certainly. The next version will be re-sizeable.
Sorry samdyrepope, I neglected to consider users with different screen resolutions. I will fix it as soon as possible, but it will take me a few days as I have very limited time this week to work on it.
Randall
Thanks Randall. I appreciate your response. I understand about having limited time. I await the update with bated breath. (I don't really know what that means but here in New Mexico USA I hear people say it a lot.)
Take your time... it will be worth waiting for.
Thanks
Sandy