Re: RE: Windows program error
- Posted by Derek Parnell <ddparnell at bigpond.com> Dec 10, 2002
- 427 views
----- Original Message ----- From: Patrick.Barnes at transgrid.com.au Subject: RE: Windows program error > > ahh... I see. > > The error was that CCS_BOTTOM is an extended flag. The docs don't > say that. > > To use CCS_BOTTOM as a flag, you have to do this: > > status_bar=createEx(StatusBar,status_text,snake_window,0,0,0,0,0, {CCS_BOTTOM}) > ^ ^ > Ex, not just create An > extra zero as a parameter before the extended flags. > -------- > MrTrick > Sorry Patrick, I explained to Philip the full reason for the fault. It went something like this... CCS_BOTTOM is a normal (not extended) flag for status bars and it is the default in win32lib. However, by placing it in a sequence on the create() call, it had the effect of removing the other default flags. The key one was WS_CHILD. This meant that he was trying to create a non- Child control but was specifying a parent control at the same time. Windows didn't like that so it didn't create a new hWnd value. In win32lib, if flags are used in the create or createEx calls, and they are in sequences, they replace ALL the default flags for the control type. To add flags to the defaults, you must provide them as an atom in the create call. -- This replaces the default flags... x = create(whatever, ...., {flag1, flag2}) -- This merges with the default flags... x = create(whatever, ...., or_all({flag1, flag2}) ) In the upshot, there is no need to have CCS_BOTTOM explicitly mentioned in this program. -------- cheers, Derek