Hello everybody,

I have a full screen app in which clicking a toolbar button on one window creates another window with toolbar and rebar bands. Each window has two toolbars. Each are the same size. The first window (upper toolbar) displays the toolbar as it should be displayed. The second, child window, (lower toolbar) displays a rebar band which is a few pixels short of being full screen on its left hand side. This area is unpainted. To clarify my question I have added a scaled down screen shot of the windows. One window is superimposed on the other for simplicity.

Any help or comments re the cause of this unpainted rebar band would be appreciated.

best regards,

czDrillard
Posted on 2003-02-23 15:54:49 by czDrillard
My best guess is perhaps in the window styles of how your creating your child window. It looks as tho the paint routine for the rebar is looking up and using a "Usable Area" that is a result of calculation and window type properties. You above window does look like it has its side edges, which could account for roughly the same amount of space as the unpainted area.
Posted on 2003-02-23 22:16:16 by NaN
Thanks NaN,


The problem is somewhere in the rebar band or in the parent cuz when I delete the two tool bars the band is still not full screen in width.

I create the rebar band like so:

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
invoke CreateWindowEx,WS_EX_TOOLWINDOW, ADDR REBARCLASSNAME, NULL, \
WS_CHILD OR WS_VISIBLE OR WS_CLIPSIBLINGS OR \
WS_CLIPCHILDREN OR RBS_VARHEIGHT OR RBS_AUTOSIZE OR CCS_NODIVIDER, \
0,0,0,0, hWndList,IDRB_REBAR, hInstance, NULL

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

This is used for creating bands for both windows. Why work for one and not the other?

The parent windows are created like this:

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
invoke CreateWindowEx,NULL,ADDR ListClassName,ADDR ListAppName,\
WS_OVERLAPPEDWINDOW,0,\
0,800,600,\
NULL,NULL,hInst,NULL
mov hWndList,eax ;different handles are used

invoke ShowWindow,hWndList,SW_MAXIMIZE
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


Btw, this is based on an example by Scronty and works fine other than the one rebar band. Any ideas appreciated.

best regards,

czDrillard
Posted on 2003-02-25 09:04:14 by czDrillard
Hi

Not sure, but did you try NOT using RBS_AUTOSIZE? (I found it wasn't necessary for a similar double rebar menu/toolbar combo)

Or setting the cx value of REBARBANDINFO to a specific size? (i.e. mov rbi.lx, 640)

If you're sharing the REBARBANDINFO structure between the 2 windows, after the first one is created it might be affecting the parameters of the second when you insert the band?

Maybe forcing a repaint of the rebar during WM_SIZE with
invoke MoveWindow, hRebar,0,0,0,0, TRUE

run out of ideas...;-)

Kayaker
Posted on 2003-02-25 10:47:25 by Kayaker
You didn't run out of ideas too soon Kayaker. The last one, MoveWindow, did it. :) Funny thing but I was trying to repaint the rebar using InvalidateRect this didn't work and I never thought of MoveWindow. Thanks for the help.

best regards,

czDrillard
Posted on 2003-02-25 22:33:58 by czDrillard