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



Comments

  • UI not very good...

    Posted by Legacy on 06/24/2002 12:00am

    Originally 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:00am

    Originally posted by: Mike

    You saved my life. Thanks
    
    

    Mike

    Reply
  • Register problem

    Posted by Legacy on 10/16/2001 12:00am

    Originally 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.

    Reply
  • Found Error at the Program Source...

    Posted by Legacy on 12/11/1999 12:00am

    Originally posted by: sun woo lee

    Error Contents
    
    

    Development Tool Visual C++ 6.0


    PagesListCtrl.cpp

    C:\down\Window1\_users\Mihai\Project\ActiveX\XFloorWnd\Version 1.02\PagesListCtrl.cpp(78) : error C2664: 'atoi' : cannot convert parameter 1 from 'const unsigned short *' to 'const char *'
    Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
    TLabelEdit.cpp
    C:\down\Window1\_users\Mihai\Project\ActiveX\XFloorWnd\Version 1.02\TLabelEdit.cpp(136) : error C2446: ':' : no conversion from 'const char *' to 'const unsigned short *'
    Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
    C:\down\Window1\_users\Mihai\Project\ActiveX\XFloorWnd\Version 1.02\TLabelEdit.cpp(136) : error C2664: 'SetWindowTextW' : cannot convert parameter 1 from '' to 'const unsigned short *'
    C:\down\Window1\_users\Mihai\Project\ActiveX\XFloorWnd\Version 1.02\TLabelEdit.cpp(210) : error C2664: 'SetText' : cannot convert parameter 1 from 'class CString' to 'const char *'
    No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
    C:\down\Window1\_users\Mihai\Project\ActiveX\XFloorWnd\Version 1.02\TLabelEdit.cpp(256) : error C2664: 'SetText' : cannot convert parameter 1 from 'class CString' to 'const char *'
    No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
    XFloorWndCtl.cpp
    C:\down\Window1\_users\Mihai\Project\ActiveX\XFloorWnd\Version 1.02\XFloorWndCtl.cpp(46) : error C2664: 'AfxTrace' : cannot convert parameter 1 from 'char [39]' to 'const unsigned short *'
    Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
    C:\down\Window1\_users\Mihai\Project\ActiveX\XFloorWnd\Version 1.02\XFloorWndCtl.cpp(74) : error C2664: 'AfxTrace' : cannot convert parameter 1 from 'char [80]' to 'const unsigned short *'
    Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
    C:\down\Window1\_users\Mihai\Project\ActiveX\XFloorWnd\Version 1.02\XFloorWndCtl.cpp(108) : error C2664: 'AfxTrace' : cannot convert parameter 1 from 'char [55]' to 'const unsigned short *'
    Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
    C:\down\Window1\_users\Mihai\Project\ActiveX\XFloorWnd\Version 1.02\XFloorWndCtl.cpp(109) : error C2664: 'AfxTrace' : cannot convert parameter 1 from 'char [52]' to 'const unsigned short *'
    Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
    C:\down\Window1\_users\Mihai\Project\ActiveX\XFloorWnd\Version 1.02\XFloorWndCtl.cpp(124) : error C2664: 'AfxTrace' : cannot convert parameter 1 from 'char [55]' to 'const unsigned short *'
    Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
    C:\down\Window1\_users\Mihai\Project\ActiveX\XFloorWnd\Version 1.02\XFloorWndCtl.cpp(125) : error C2664: 'AfxTrace' : cannot convert parameter 1 from 'char [76]' to 'const unsigned short *'
    Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
    C:\down\Window1\_users\Mihai\Project\ActiveX\XFloorWnd\Version 1.02\XFloorWndCtl.cpp(1153) : error C2664: 'atol' : cannot convert parameter 1 from 'const unsigned short *' to 'const char *'
    Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
    Generating Code...

    Reply
  • Compilation Error

    Posted by Legacy on 08/30/1999 12:00am

    Originally posted by: Gnanavel

    It gives complilation Error in Switch /o

    Reply
  • There was some problems in compiling your project under VC6.0.

    Posted by Legacy on 03/29/1999 12:00am

    Originally posted by: Park Hyung Wook

    There was some problems in compiling your project under VC6.0.
    
    


    D:\Temp\XFloor\_users\Mihai\Project\ActiveX\XFloorWnd\Version 1.02\TLabelEdit.cpp(136) : error C2446: ':' : no conversion from 'const char *' to 'const unsigned short *'
    Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
    D:\Temp\XFloor\_users\Mihai\Project\ActiveX\XFloorWnd\Version 1.02\TLabelEdit.cpp(136) : error C2664: 'SetWindowTextW' : cannot convert parameter 1 from '' to 'const unsigned short *'
    D:\Temp\XFloor\_users\Mihai\Project\ActiveX\XFloorWnd\Version 1.02\TLabelEdit.cpp(210) : error C2664: 'SetText' : cannot convert parameter 1 from 'class CString' to 'const char *'
    No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
    D:\Temp\XFloor\_users\Mihai\Project\ActiveX\XFloorWnd\Version 1.02\TLabelEdit.cpp(256) : error C2664: 'SetText' : cannot convert parameter 1 from 'class CString' to 'const char *'
    No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called

    ...

    Reply
  • There was some problems in compiling your project under VC6.0.

    Posted by Legacy on 03/29/1999 12:00am

    Originally posted by: Park Hyung Wook

    There was some problems in compiling your project under VC6.0.
    
    


    D:\Temp\XFloor\_users\Mihai\Project\ActiveX\XFloorWnd\Version 1.02\TLabelEdit.cpp(136) : error C2446: ':' : no conversion from 'const char *' to 'const unsigned short *'
    Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
    D:\Temp\XFloor\_users\Mihai\Project\ActiveX\XFloorWnd\Version 1.02\TLabelEdit.cpp(136) : error C2664: 'SetWindowTextW' : cannot convert parameter 1 from '' to 'const unsigned short *'
    D:\Temp\XFloor\_users\Mihai\Project\ActiveX\XFloorWnd\Version 1.02\TLabelEdit.cpp(210) : error C2664: 'SetText' : cannot convert parameter 1 from 'class CString' to 'const char *'
    No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
    D:\Temp\XFloor\_users\Mihai\Project\ActiveX\XFloorWnd\Version 1.02\TLabelEdit.cpp(256) : error C2664: 'SetText' : cannot convert parameter 1 from 'class CString' to 'const char *'
    No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called

    ...

    Reply
Leave a Comment
  • Your email address will not be published. All fields are required.

Top White Papers and Webcasts

  • Live Event Date: October 29, 2014 @ 11:00 a.m. ET / 8:00 a.m. PT Are you interested in building a cognitive application using the power of IBM Watson? Need a platform that provides speed and ease for rapidly deploying this application? Join Chris Madison, Watson Solution Architect, as he walks through the process of building a Watson powered application on IBM Bluemix. Chris will talk about the new Watson Services just released on IBM bluemix, but more importantly he will do a step by step cognitive …

  • Businesses are moving more and more of their customer transactions to the web. Security is understandably a top concern as online transactions increase, so it is important to make sure your electronic signature provider meets the highest security standards. That means more than simply passing a security audit or obtaining a certification. This white paper provides recommendations for taking a broader view of e-signature security, and answers key questions that help identify the security requirements against …

Most Popular Programming Stories

More for Developers

Latest Developer Headlines

RSS Feeds