Handle of titlebarbuttons
- Hroudtwolf
- Addict

- Posts: 803
- Joined: Sat Feb 12, 2005 3:35 am
- Location: Germany(Hessen)
- Contact:
Handle of titlebarbuttons
Hello,
Who knows, how to get the handles of the buttons in the titlebar of a Windows-Window?
Who knows, how to get the handles of the buttons in the titlebar of a Windows-Window?
- Hroudtwolf
- Addict

- Posts: 803
- Joined: Sat Feb 12, 2005 3:35 am
- Location: Germany(Hessen)
- Contact:
@Sparkie: Judging by Hroudtwolf's other post, he wants min/max buttons
on a ToolWindow, which simply can't be done. So I'm guessing he wants
to add simulated buttons or something to the ToolWindow...? There are
posts here that demonstrate how to put a "pushpin" etc on a window,
so Hroudtwolf will have to do a search for it and see if it works.
on a ToolWindow, which simply can't be done. So I'm guessing he wants
to add simulated buttons or something to the ToolWindow...? There are
posts here that demonstrate how to put a "pushpin" etc on a window,
so Hroudtwolf will have to do a search for it and see if it works.
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
"PureBasic won't be object oriented, period" - Fred.
@Hroudtwolf: Does the link below help you get started? It shows how to
get the handle to the "X" (close) button on a normal window (it may also
work on a ToolWindow, but I haven't tried it):
viewtopic.php?t=3712
See also:
viewtopic.php?t=9687
get the handle to the "X" (close) button on a normal window (it may also
work on a ToolWindow, but I haven't tried it):
viewtopic.php?t=3712
See also:
viewtopic.php?t=9687
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
"PureBasic won't be object oriented, period" - Fred.
I really don't know if i understand the subject
But i did something like this on skindwind.app
I used the Webdings or the Marlett Font -"dont' recall"- , for min,max and close
This was on win98, i have no idear what it looks like on XP
and it might look diff. depending on if the user uses big or small fonttypes (96 dpi or " 128 I tinhk dpi")
**Edit** ohe btw you have to use the api for min, max and close of course..
Henrik
But i did something like this on skindwind.app
I used the Webdings or the Marlett Font -"dont' recall"- , for min,max and close
This was on win98, i have no idear what it looks like on XP
and it might look diff. depending on if the user uses big or small fonttypes (96 dpi or " 128 I tinhk dpi")
Code: Select all
;
Global FontID1
;FontID1 = LoadFont(1, "Webdings", 10)
FontID1 = LoadFont(1, "Marlett", 10)
If OpenWindow(0, 0, 0, 160, 160, #PB_Window_SystemMenu |#PB_Window_ScreenCentered, "Tool-Bar")
TBH=CreateToolBar(0, WindowID())
ToolBarStandardButton(0, #PB_ToolBarIcon_New)
ToolBarStandardButton(1, #PB_ToolBarIcon_Open)
ToolBarStandardButton(2, #PB_ToolBarIcon_Save)
If CreateGadgetList(TBH)
ButtonGadget(0, 70, 3, 16, 16, "0")
SetGadgetFont(0, FontID1)
ButtonGadget(1, 85, 3, 16, 16, "1")
SetGadgetFont(1, FontID1)
ButtonGadget(2, 100, 3, 16, 16, "2")
SetGadgetFont(2, FontID1)
ButtonGadget(3, 115, 3, 16, 16, "r")
SetGadgetFont(3, FontID1)
EndIf
Repeat
EventID = WaitWindowEvent()
Until EventID = #PB_Event_CloseWindow
EndIf
Henrik
- Hroudtwolf
- Addict

- Posts: 803
- Joined: Sat Feb 12, 2005 3:35 am
- Location: Germany(Hessen)
- Contact:
At first thanks at all.
But this isn't my problem. It is however my guilt.
I explain my problem once again more exactly.
I want to get the handles of the systembuttons of a window
to position this button on an other place in my window.
I want to do this by using "SetParent (Button.l,hwnd.l)".
With comboboxes, that functions also.
But this isn't my problem. It is however my guilt.
I explain my problem once again more exactly.
I want to get the handles of the systembuttons of a window
to position this button on an other place in my window.I want to do this by using "SetParent (Button.l,hwnd.l)".
With comboboxes, that functions also.
@Hroudtwolf: I really don't think you can do it. Even the tip that disables
the X button is just disabling a menu item (which the "button" actually is).
Look at the other link that I have above which shows how to put a pushpin
on the titlebar -- it should teach you how to add other buttons to it.
the X button is just disabling a menu item (which the "button" actually is).
Look at the other link that I have above which shows how to put a pushpin
on the titlebar -- it should teach you how to add other buttons to it.
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
"PureBasic won't be object oriented, period" - Fred.

