Floor Window Control

Floor Window Control or XFloorWnd is an ActiveX Control similar to the Outlookbar in Microsoft Outlook but with more features.

old looknew look  

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

Download demo project – 200 KB

Download source – 218 KB

More by Author

Get the Free Newsletter!

Subscribe to Developer Insider for top news, trends & analysis

Must Read