Floor Window Control

The control has one or more pages and Each page has name, height, color, a window attached, and a user data associated. At one moment only one page can be activate. XFloorWnd Control offers the followings properties, methods and events:
Properties
Type | Name | Specification |
OLE_COLOR | BackColor | Allows changing the background color of control.. |
Boolean | Animation | If this is TRUE, the animation on moving page is allowed. |
Long | Sleep | It is valid only if Animation is TRUE. It is used on animation process. |
Boolean | Sign | TRUE means that right sign on one deactivated page is visible or not. |
BSTR | Pages | This property store all pages into a template format. It is usefull, when user want to load more pages without flickering. User has to be documented from sources, about the description of template used. |
Boolean | AsPage | It can change the "looks". The control accepts two styles: floor or page as shown in the images. |
IfontDisp* | Font | Change the font of control. |
Methods
Name | Specification |
short AddPage(BSTR sName) | Add a new page called sName. Return index of page into control. |
boolean DeletePage(short nIndex) | Delete page index nIndex, and return TRUE if successful. |
BSTR GetPageName(short nIndex) | Return as string the name of page from nIndex. |
short GetPage(BSTR lpszPageName) | Return the index of page called lpszPageName. –1 if failed. |
boolean ActivatePage(short nIndex) | Activate page from nIndex. Return TRUE if successful. |
boolean AttachWindow(short nIndex, long pWnd) | Attach one window to page nIndex. This can be used only in VC++. In pWnd pass the pointer to one child window. |
boolean SetPageName(short nIndex, BSTR lpszPageName) | Rename page nIndex to lpszPageName. Return TRUE if succsefully. |
void Init() | Obsolete.This forces the attahched windows to resize. |
short Height(short nIndex) | Return the height of page nIndex. |
void Height(short nIndex, short nNewValue) | Set the new height of page nIndex to be nNewValue |
OLE_COLOR Color(short nIndex) | Get the color of page nIndex. |
void Color(short nIndex, OLE_COLOR nNewValue) | Set the new color for page nIndex to be nNewValue |
long UserData(short nIndex) | Get the user data attached to page nIndex |
void UserData(short nIndex, long nNewValue) | Set the new user data to page nIndex, to be nNewValue |
short GetActivePage() | Return the index of active page. |
long GetPagesCount() | Return the number of pages |
boolean IsPage(short nIndex) | Return TRUE if page nIndex exists or not. |
long GetLeftTopPage(short nIndex) | Get the topleft point of page nIndex |
long GetBottomRightPage(short nIndex) | Get the bottomright point of page nIndex |
void StyleAs(boolean bAsFloor) | See property AsPage |
long GetHWnd(long nIndex) | Return the handle of window attached with AttachWindow. |
Events:
Name | Specification |
ActivatePage(short nIndex) | Occurs when page nIndex was activated. |
ClickOnActivePage(short nIndex) | User click twice a activate page. |
Notes:
- all BSTR returned by any functions (methods), in VC, need to be released with ::SysFreeString

Comments
UI not very good...
Posted by Legacy on 06/24/2002 12:00amOriginally posted by: PhreekySicko
why do you use static colors? please use the GetSysColor API to get the currently set windows colors. That helps integrating your control into the Windows UI...
COLOR_BTNFACE background color of dialogs, buttons, ...
COLOR_WINDOW background color of controls
Reply
Excelent.
Posted by Legacy on 04/09/2002 12:00amOriginally posted by: Mike
ReplyRegister problem
Posted by Legacy on 10/16/2001 12:00amOriginally posted by: liukai
At the time of registering the control,it often occurs the problem like this: "link failed ,possibly link have interrupted",please give me an answer, I will thank for you very much.
ReplyFound Error at the Program Source...
Posted by Legacy on 12/11/1999 12:00amOriginally posted by: sun woo lee
ReplyCompilation Error
Posted by Legacy on 08/30/1999 12:00amOriginally posted by: Gnanavel
It gives complilation Error in Switch /o
ReplyThere was some problems in compiling your project under VC6.0.
Posted by Legacy on 03/29/1999 12:00amOriginally posted by: Park Hyung Wook
ReplyThere was some problems in compiling your project under VC6.0.
Posted by Legacy on 03/29/1999 12:00amOriginally posted by: Park Hyung Wook
Reply