Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS General Discussion » CExtControl / Desactivate / Scrollbar...problems Collapse All
Subject Author Date
Olivier MARTIN Nov 26, 2002 - 3:10 AM

1.- I have one CExtControlbar : I would like its width be fixed size but not its height. Is it possible ?
2.- I have one CExtControlbar which contains a CControlbar. This CControlbar gets picture from a camera : It works.
But when I click out of the CExtControlBar or when I click on its title, the picture disappears.
3.-Is it possible to use Scrollbar on a CExtControlbar.

Thanks,
Olivier

Sergiy Lavrynenko Nov 27, 2002 - 9:50 AM

Dear Olivier,

CExtControlBar class was designed as fully resizable VS.NET-like dockable panel. It is possible to limit its size only if one CExtControlBar object is always single in its row/column (like mail folders tree in the fat MS Outlook or in the MS Outlook Express). It is hardly possible to limit bar size when there are several visible bars in the same row/column.

Now I try to explain why?
MFC’s algorithms for CControlBar windows can manage their mutual positions but can not control their mutual sizes. CExtControlBar uses simple trick: only first visible CExtControlBar instance in each row/column is responsible for the mutual layout of all bars in the same row/column. There are no built-in limits for the minimal widths of the vertically docked panels (or minimal heights of the horizontally docked panels). I can write new bar which overrides CExtControlBar::CalcDynamicLayout() and limits own size in the own manner, but this code will not work properly if this bar is not the first visible bar in its row/column.

About picture-CControlBar inside CExtControlBar: Why this is CControlBar? Why not CStatic or any CWnd-super-based-class? I need you test project to analyze this error.

CExtControlBar should contain only the one child window. It will resize it automatically. These window may have scroll bars.

What is really scroll bars?
Any window may have WINDOWS-BUILD-IN "scroll bars" provided with the WS_HSCROLL and/or WS_VSCROLL window styles. Many common controls are based on these "scroll bars" (list view control, listbox control, tree view control), CScrollView class is a good example of how to use them. These "scroll bars" are not scroll bar windows. They are parts of the window non-client area. You can not get their HWNDs or (CScrollBar*) pointers. If window manually recalculates and repaints own non-client area - it can not have these "scroll bars". CExtControlBar fully controls its non-client area because it should have gripper (or caption) and resizing borders. You can not use built-in "scroll bars" of CExtControlBar object.

Best regards,
Sergiy Lavrynenko