View previous topic :: View next topic |
Author |
Message |
Carl Gundel New Member
Joined: 09 Nov 2005 Posts: 6
|
Posted: Nov 9th, 2005, 6:18pm Post subject: UI completely with WMLiberty |
|
|
Brent,
Is it possible to create and manage the whole of a Windows application's UI with WMLiberty and API calls? In other words, if I wanted to create windows, menus and controls and handle all their events and not use any of Liberty BASIC's built in GUI commands, would this be feasible?
-Carl |
|
Back to top |
|
|
Brent Site Admin
Joined: 01 Jul 2005 Posts: 800
|
Posted: Nov 9th, 2005, 10:30pm Post subject: Re: UI completely with WMLiberty |
|
|
Carl,
It's probably impractical to register a window class and create a top-level window of that class. RegisterClass(Ex) requires a pointer to a WindowProc. Avoiding WindowProc's was the main reason for creating WMLiberty.
Reusing an existing window class with CreateWindowEx or just "Open ... For Window ... " to make your top-level windows are best for an LB app. One could call GetWindowLong or GetClassInfo to get LB's default WindowProc and use that to register a new window class. However, that could be error-prone if it's not done correctly. LB's window class could change in a future version. Using different class styles from what an existing WindowProc expects could create subtle bugs that are nearly impossible to track down.
So, my suggestion for someone wishing to use WMLiberty to build their complete GUI is to stick to subclassing LB's native windows. Almost any control you create on the window can be made fully functional. The most common issue with API-created controls has to do with z-order and tabbing, especially inside non-dialog type windows. Basically, WMliberty can help make an all-API GUI, but it's still a fair amount of work. _________________ Brent |
|
Back to top |
|
|
BASICwebmaster Guest
|
Posted: Dec 6th, 2005, 4:15pm Post subject: Re: UI completely with WMLiberty |
|
|
Would such a program be faster then a regular LB GUI program? |
|
Back to top |
|
|
Brent Site Admin
Joined: 01 Jul 2005 Posts: 800
|
Posted: Dec 6th, 2005, 8:26pm Post subject: Re: UI completely with WMLiberty |
|
|
BASICwebmaster wrote: | Would such a program be faster then a regular LB GUI program? |
I don't believe that speed is much of a factor with respect to GUI controls. Do you mean responsiveness to user actions? Response time is most effectively aided by multithreading. However, LB doesn't give us that option. _________________ Brent |
|
Back to top |
|
|
BASICwebmaster Guest
|
Posted: Dec 13th, 2005, 8:32pm Post subject: Re: UI completely with WMLiberty |
|
|
Brent wrote: | BASICwebmaster wrote: | Would such a program be faster then a regular LB GUI program? |
I don't believe that speed is much of a factor with respect to GUI controls. Do you mean responsiveness to user actions? Response time is most effectively aided by multithreading. However, LB doesn't give us that option. |
Yes, I mean response time. I have notice some sluggishness with LB event handing, and need some more speed for upcoming projects. |
|
Back to top |
|
|
|