External windows in windows ( warning, rated PG: contains
explict win32 code)
Factory
factory at free.net.au
Mon Jun 12 22:56:44 UTC 2000
Using the lovely new FFI in Squeak 2.8a it's possible to open an
external window to the main squeak window, ie. as in..
void ShowWindow()
{
MessageBox( NULL, "HI", "HI", MB_OK );
}
Unfortunately doing this seems to starve the squeak window of messages..
this can be corrected by:
DWORD WINAPI MainThreadProc( LPVOID lpParameter )
{
MessageBox( NULL, "HI", "HI", MB_OK );
return 0;
}
void ShowMessage()
{
HANDLE threadHandle;
unsigned long threadID;
threadHandle=
CreateThread( NULL, 0, MainThreadProc,
0, 0, &threadID );
}
But this is somewhat hacky, anyone know of any other way of getting
around this problem?
- Factory (.sig under reconstruction)
More information about the Squeak-dev
mailing list
|