1. RE: Toolbox windows with win32lib

Thanks to CRojo in the Euphoria IRC channel, I had my problem solved
already! :)

~Tom

new topic     » topic index » view message » categorize

2. RE: Toolbox windows with win32lib

This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_000_01C20DB2.817A9770
 charset=iso-8859-1

> -----Original Message-----
> From: thomas at columbus.rr.com [mailto:thomas at columbus.rr.com]
> Sent: Friday, 7 June 2002 9:14
> To: EUforum
> Subject: Toolbox windows with win32lib
> 
> 
> 
> 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 )
> 
> ------------------------------------------------------------
> 

Here is my attempt to help...

-------------------
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", MainWindow, 0, 0, 100,
450,
{WS_VISIBLE,WS_BORDER,WS_SYSMENU},
{WS_EX_WINDOWEDGE,WS_EX_CONTEXTHELP,WS_EX_TOOLWINDOW} )

procedure MainWindow_onOpen()
  openWindow( ToolbarWindow, Normal)
end procedure
onActivate[MainWindow] = routine_id("MainWindow_onOpen")

WinMain( MainWindow, Normal )
-------------
The main changes were ...
a) to NOT open the tool windows as Modal
b) to use the toolwin style
c) to allow it to be closed
d) and to make it a child window of the main window.
---------------
Derek.

==================================================================
De informatie opgenomen in dit bericht kan vertrouwelijk zijn en 
is uitsluitend bestemd voor de geadresseerde. Indien u dit bericht 
onterecht ontvangt wordt u verzocht de inhoud niet te gebruiken en 
de afzender direct te informeren door het bericht te retourneren. 
==================================================================
The information contained in this message may be confidential 
and is intended to be exclusively for the addressee. Should you 
receive this message unintentionally, please do not use the contents 
herein and notify the sender immediately by return e-mail.


==================================================================

------_=_NextPart_000_01C20DB2.817A9770
Content-Type: application/ms-tnef

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu