Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 23

Thread: Maze Solver - A-Star Path Finding

  1. #11

    Re: Maze Solver - A-Star Path Finding

    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.

  2. #12
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,777
    Rep Power
    10

    Re: Maze Solver - A-Star Path Finding

    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
    www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
    Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000

  3. #13
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,777
    Rep Power
    10

    Re: Maze Solver - A-Star Path Finding

    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
    www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
    Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000

  4. #14

    Re: Maze Solver - A-Star Path Finding

    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

  5. #15
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,777
    Rep Power
    10

    Re: Maze Solver - A-Star Path Finding

    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
    Let me know if it works better than clearing the message queue.

    Ciao
    Eros
    www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
    Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000

  6. #16

    Re: Maze Solver - A-Star Path Finding

    Quote Originally Posted by ErosOlmi
    Thanks about this idea. Seems you know much better than me behind the curtains engines
    Hah! Just a lucky guess on my part. Even a blind squirrel gets an acorn once in a while.

    Thanks for the information, Eros. I'll give it a try this evening.

    Randall

  7. #17

    Re: Maze Solver - A-Star Path Finding

    What screen resolution was the program written for?

    I run 800 x 600 and the window doesn't look right.

    Thanks
    Sandy

  8. #18
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,777
    Rep Power
    10

    Re: Maze Solver - A-Star Path Finding

    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.
    www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
    Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000

  9. #19

    Re: Maze Solver - A-Star Path Finding

    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

  10. #20

    Re: Maze Solver - A-Star Path Finding

    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

Page 2 of 3 FirstFirst 123 LastLast

Similar Threads

  1. Maze Solver - Updated Version 06 Oct 07
    By Randall in forum AStar - (A Star) path-finding algorithm
    Replies: 13
    Last Post: 07-10-2007, 16:01

Members who have read this thread: 0

There are no members to list at the moment.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •