Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Insert buttons into a window's caption area
#20
shame on me.
i have not continued this idea.

we still need a qm way to display extra window function icons on titlebars.
i need buttons for collapse, onTop, deskthumb, toMonitor.
perfect solution would be to overlay all titlebar buttons. Confusedhock:

Gintaras Wrote:Macro
Code:
Copy      Help
;register class
int+ __xclass
if(!__xclass) __xclass=RegWinClass("xclass" &WndProc_xclass)

;create window
int style=WS_POPUP|WS_BORDER
int exstyle=WS_EX_TOOLWINDOW
int hwnd=CreateWindowEx(exstyle "xclass" 0 style 10 10 50 50 0 0 _hinst 0)

OnScreenDisplay "do you see your window in the top-left corner?"

;wait, or show a dialog
opt waitmsg 1
wait 10

;destroy
DestroyWindow hwnd

Function WndProc_xclass
Code:
Copy      Help
;/
function# hWnd message wParam lParam

;This is window procedure of windows of "xclass" class. It is similar to dialog procedure. Read about window procedures in MSDN library.
;WM_CREATE, WM_DESTROY and other messages are documented in MSDN library.

sel message
,case WM_CREATE
,ShowWindow hWnd SW_SHOWNOACTIVATE
,;here you can create controls (CreateControl), load graphics, etc
,
,case WM_DESTROY
,
,;add more messages here

ret DefWindowProc(hWnd message wParam lParam)
pi


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)