Toolbox windows with win32lib

new topic     » topic index » view thread      » older message » newer message

I have an EXW app with a main window and another smaller window that I want
to act as a toolbar.  The smaller window should stay on top of the main
window, but not receive full focus as a real window.

Actually, I would like it to behave much like the tool windows in Photoshop.
Photoshop's main window always keeps the "main" focus (title bar stays in
the "focused state") but all of its child windows always appear this way as
well.

I've tried this code, but since I am opening the child window as modal, it
does not satisfy any of my needs.  If somebody could help with this, that
would be great.

------------------------------------------------------------

include win32lib.ew
if setAppName("My sample app") != 0 then
    abort(0)
end if

constant MainWindow = createEx( Window, "Main window", NULL, 100, 0, 500,
500, {WS_THICKFRAME, WS_SYSMENU}, {WS_EX_DLGMODALFRAME} )
constant ToolbarWindow = createEx( Window, "Toolbar", NULL, 0, 0, 100, 450,
{}, {WS_EX_CONTEXTHELP} )

procedure MainWindow_onOpen()
  openWindow( ToolbarWindow, Modal)
end procedure
onOpen[MainWindow] = routine_id("MainWindow_onOpen")

WinMain( MainWindow, Normal )

------------------------------------------------------------

~Tom

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu