Windows Explorer Type Customizable Toolbars
-
- Enthusiast
- Posts: 665
- Joined: Fri Sep 12, 2003 10:40 pm
- Location: Tallahassee, Florida
wow--you got props from The Man. all i got to say is that i never could get that to work, and now i know it was because of the weird structures associated with the rebar. can i just say that the MS programmers must have lost all touch with reality when they dreamed up the way they wrote this. so is anyone going to make a LIB out of it, or i remember freak or one of the them saying the PB will someday include a native rebar.
Code: Select all
!.WHILE status != dwPassedOut
! Invoke AllocateDrink, dwBeerAmount
!MOV Mug, Beer
!Invoke Drink, Mug, dwBeerAmount
!.endw
Thank you all for the *thumbs up* on this one. All I did was convert some code over to PB and presto whamo it worked. 8O
@Fred - It is I who thanks YOU for bringing PB to us all so that we can accomplish tasks such as this one
As for making a lib...I am not the best candidate for doing this but maybe it's time I got some practice.
@Shopro - I'm not sure what can be done about the underline problem. If I find anything I'll let you know.
@Fred - It is I who thanks YOU for bringing PB to us all so that we can accomplish tasks such as this one

As for making a lib...I am not the best candidate for doing this but maybe it's time I got some practice.

@Shopro - I'm not sure what can be done about the underline problem. If I find anything I'll let you know.
What goes around comes around.
PB 5.21 LTS (x86) - Windows 8.1
PB 5.21 LTS (x86) - Windows 8.1
AFAIK, the ampersand (&) for underlining is standard Windows protocol. I think the problem is that not all controls (gadgets/windows) adhere to this standard. If you change this line in the original code
to this
you'll see the underline works with or without XP skins (Look at the top TextGadget in the main window and the C in Clicking should be underlined)
I don't yet know how to overcome this so maybe someone else has an idea?
Code: Select all
TextGadget(2, 200, 100, 400, 20, "Clicking on any of the text labels in the Rebar also resizes the band.")
Code: Select all
TextGadget(2, 200, 100, 400, 20, "&Clicking on any of the text labels in the Rebar also resizes the band.")
I don't yet know how to overcome this so maybe someone else has an idea?
What goes around comes around.
PB 5.21 LTS (x86) - Windows 8.1
PB 5.21 LTS (x86) - Windows 8.1
@Shopro - A little API SendMessage_() is needed for Rebar height:
Keep in mind that unless you lock the rebar, the height can change if the the user drags a band downward or upward. You can lock the rebar by adding the #RBBS_FIXEDSIZE to the rebar fStyle member
Code: Select all
Global hwndRB
...
...
...
rebarHeight = SendMessage_(hwndRB, #RB_GETBARHEIGHT, 0, 0)
Code: Select all
rbBand\fStyle = #RBBS_CHILDEDGE | #RBBS_FIXEDSIZE
What goes around comes around.
PB 5.21 LTS (x86) - Windows 8.1
PB 5.21 LTS (x86) - Windows 8.1
#RBN_HEIGHTCHANGE Notification
Set up a windowcallback to catch the notification and you should be good to go.
Here's a link to msdn for more Rebar information.Sent by a rebar control when its height has changed. This notification message is sent in the form of a WM_NOTIFY message.
Set up a windowcallback to catch the notification and you should be good to go.

What goes around comes around.
PB 5.21 LTS (x86) - Windows 8.1
PB 5.21 LTS (x86) - Windows 8.1
Thanks again for the info Sparkie,
but... I'm not so familiar with the windowcallback thingy.
This is what i've done so far:
But not getting any results. I know that I'm doing something wrong. could someone please point it out?
-Shopro
but... I'm not so familiar with the windowcallback thingy.
This is what i've done so far:
Code: Select all
Declare Callback(WindowID, Message, wParam, lParam)
Window_Main_Open()
SetWindowCallback(@Callback())
.
.
.
Procedure Callback(WindowID, Message, wParam, lParam)
If Message = #RBN_HEIGHTCHANGE
Debug "Rebar height changed!!!"
EndIf
EndProcedure
-Shopro
Set your window callback
The window callback procedure
Code: Select all
SetWindowCallback(@myWindowCallback())
Code: Select all
Procedure myWindowCallback(hwnd, message, wParam, lParam)
result = #PB_ProcessPureBasicEvents
If message = #WM_NOTIFY
*pNMH.NMHDR = lParam
If *pNMH\hwndFrom = hwndRB
Select *pNMH\code
Case #RBN_HEIGHTCHANGE
rebarHeight = SendMessage_(hwndRB, #RB_GETBARHEIGHT, 0, 0)
Debug "Rebar height is now " + Str(rebarHeight)
EndSelect
EndIf
EndIf
ProcedureReturn result
EndProcedure
What goes around comes around.
PB 5.21 LTS (x86) - Windows 8.1
PB 5.21 LTS (x86) - Windows 8.1