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 / WinAPI StatusBar and Rebar

Author
Message
Keaz
21
Years of Service
User Offline
Joined: 22nd Sep 2003
Location: Somewhere in south Texas
Posted: 4th Aug 2005 17:42
Many on these forums know I'm working with the Win API and all is well Except children of a window aren't updating properly. For instance when I create a ToolBar or StatusBar they show up ok and size themselves correctly for the Window's client area, but when I resize the window their size stays the same. However when I click on the control in question it resizes properly. Can anyone with better API knowlege help me to figure what's going wrong?

Breaking Stuff=Fun!,Bug Testing<>Fun!, Bug Testing=Breaking Stuff, so...
Bug Testing=Fun! Hmmmm....
DOES NOT COMPUTE! SYSTEM MALFUNTION!
Cryptoman
21
Years of Service
User Offline
Joined: 24th Nov 2003
Location: Utah Mountains
Posted: 4th Aug 2005 17:59
Pro is not going to handle your resize messages for you. It discards those messages as pro does not use them. What I did was monitor the pro's window size and sent resize/position myself when it was time.


Keaz
21
Years of Service
User Offline
Joined: 22nd Sep 2003
Location: Somewhere in south Texas
Posted: 4th Aug 2005 19:10
Is there a way to send it to all of a window's child controls or does it have to be implemented individually? Also how did you go about sending the resize/position commands?

Breaking Stuff=Fun!,Bug Testing<>Fun!, Bug Testing=Breaking Stuff, so...
Bug Testing=Fun! Hmmmm....
DOES NOT COMPUTE! SYSTEM MALFUNTION!
Xolatron old
21
Years of Service
User Offline
Joined: 25th Jan 2004
Location: The Star Forge Language: DBpro
Posted: 4th Aug 2005 19:19
Windows has messages to resize/position a gadget.
Sorry, I can't find a page to link to right now.

-Xol

Keaz
21
Years of Service
User Offline
Joined: 22nd Sep 2003
Location: Somewhere in south Texas
Posted: 4th Aug 2005 19:27
I understand that xolo what I'm looking for is a way to capture those messages so the I can implement a message handling routine or direct windows to do it for me.

Breaking Stuff=Fun!,Bug Testing<>Fun!, Bug Testing=Breaking Stuff, so...
Bug Testing=Fun! Hmmmm....
DOES NOT COMPUTE! SYSTEM MALFUNTION!
Xolatron old
21
Years of Service
User Offline
Joined: 25th Jan 2004
Location: The Star Forge Language: DBpro
Posted: 4th Aug 2005 19:31 Edited at: 4th Aug 2005 19:33
Try sending these messages:
EN_UPDATE 0x0400
EM_AUTOSIZE (1L<<10) `50<<10 ??

Also, look at this:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wceshellui5/html/wce50concreatingacommandbar.asp

In response to your last post,
the messages WM_MOVE 0x3, WM_SIZE 0x5, and WM_RESIZE 0x214 could be read for size change, OR you could specify that the window doesn't resize (see gui.dba)

-Xol

Keaz
21
Years of Service
User Offline
Joined: 22nd Sep 2003
Location: Somewhere in south Texas
Posted: 4th Aug 2005 19:39
Well this gives me something to work with.

Breaking Stuff=Fun!,Bug Testing<>Fun!, Bug Testing=Breaking Stuff, so...
Bug Testing=Fun! Hmmmm....
DOES NOT COMPUTE! SYSTEM MALFUNTION!
Keaz
21
Years of Service
User Offline
Joined: 22nd Sep 2003
Location: Somewhere in south Texas
Posted: 4th Aug 2005 19:47
Those messages are for edit controls only. Oh well this is going to take more research into message handling. If anyone else can help please let me know.

Breaking Stuff=Fun!,Bug Testing<>Fun!, Bug Testing=Breaking Stuff, so...
Bug Testing=Fun! Hmmmm....
DOES NOT COMPUTE! SYSTEM MALFUNTION!
Cryptoman
21
Years of Service
User Offline
Joined: 24th Nov 2003
Location: Utah Mountains
Posted: 4th Aug 2005 19:54
Here is a simple resize function I used in one project.



Here is the get window size function I used.




Dll #1=user32.dll

Maybe they are of help to you.


Keaz
21
Years of Service
User Offline
Joined: 22nd Sep 2003
Location: Somewhere in south Texas
Posted: 4th Aug 2005 21:54
Not really but thx anyway. I needed something that would work no matter what window was active at the time or what child was active. So a made a function that sends the WM_SIZE (Tells the control to update) to all the Children. I'm trying my best to keep stability by not stealing Messages as someone else told me. It's forcing me to get creative, but be of the Difference between DB/C++ You need to just send the proper messages to the proper controls and they'll do the processing. The framework is there it's just a matter of telling it what to do. I just thought their would be a simpler routine.

Here's what I'm using:

This may work even better for you. I just need to implement a conditional statment to check for a size change before calling it, because this will become slow with a lot of controls

Breaking Stuff=Fun!,Bug Testing<>Fun!, Bug Testing=Breaking Stuff, so...
Bug Testing=Fun! Hmmmm....
DOES NOT COMPUTE! SYSTEM MALFUNTION!
Cryptoman
21
Years of Service
User Offline
Joined: 24th Nov 2003
Location: Utah Mountains
Posted: 4th Aug 2005 22:11
I think you should log into msn or yabooger then we can confer. I am interested in finishing my editor also. I think we may have something to share between us.


Keaz
21
Years of Service
User Offline
Joined: 22nd Sep 2003
Location: Somewhere in south Texas
Posted: 5th Aug 2005 01:49
Not Necessary xolo I've made an UpdateAPI() function now to update the GUI.

Breaking Stuff=Fun!,Bug Testing<>Fun!, Bug Testing=Breaking Stuff, so...
Bug Testing=Fun! Hmmmm....
DOES NOT COMPUTE! SYSTEM MALFUNTION!
Xolatron old
21
Years of Service
User Offline
Joined: 25th Jan 2004
Location: The Star Forge Language: DBpro
Posted: 5th Aug 2005 01:53

Login to post a reply

Server time is: 2025-06-10 05:47:52
Your offset time is: 2025-06-10 05:47:52