Independent window (Re: Native GUI Squeak?)

Wiebe Baron wiebe at cosmocows.com
Sun Feb 18 18:39:41 UTC 2001


> On Sunday 18 February 2001 06:46, Rick wrote:
>
> > Yes, I can make my application window fill up the Squeak window, but it
> > will still be identifyed at the title bar with Squeak icon and "Squeak!
> > (C:\Squeak\Squeak.image)" words. How can I personalize this
> title bar to my
> > application title and icon? I built my application window as a
> > StandardSystemView and I wondered if only this view could be opened on
> > desktop without the main Squeak window rounding it...
>
> I think you can do this via FFI calls to the window manager.


You can easily change the caption by adding the following method to (for
example) the Win32Window class side:

setWindowText:hwnd with:title
	"Set the title"
	<apicall: bool 'SetWindowTextA' (Win32Handle char*) module: 'user32.dll'>
	^self externalCallFailed


In a workspace do:

window := Win32Window getFocus.
Win32Window setWindowText: window with: 'My Title'



The Squeak window has been compiled with the WS_OVERLAPPED flag which
(AFAIK) means that the border and caption is there to stay. If you want rid
of the border you'll need the VM source code and do something like this:

In sqWin32Window.c replace the WS_OVERLAPPED in the CreateWindowEx function
with WS_POPUP, and set the windows size. Note that you won't be able to move
or resize your Squeak window without a caption (you could make your own
Squeak skin and move the window around with FFI though :-)!

greetings,

Wiebe.





More information about the Squeak-dev mailing list