Virtual Developer Workshop: Containerized Development with Docker

Here is a set of  two ActiveX Control for enriching your User Interface.

XFloorWnd Control

XPropertiesWnd Control

XFloorWnd ActiveX Control.

What is XFloorWnd?

If somebody hs seen Microsoft Outlook, there is a control on the left side of MDI that looks like the XFloorWnd control. You will see some diferences at animation time.

Description of the classes that are used:

XFloorWndSource.zip file:

CXFloorWndCtrl - class derived from COleControl, which is the control how manage all features of XFloorWnd. _DXFloorWnd - interface with XFloorWnd control. _DXFloorWndEvents - events for XFloorWnd control.

CXFloorWndPropPage - class derived from COlePropertyPage, is the particular proertiy page fro this control. In this dialog, you can set the animation speed, and insert(delete) new items in XFloorWnd. Select Properties from Developer, after the control was registered.

CXFloorWndApp - It deals with registering, unregistering the control XFloorWnd.

CFloorObject - abstract class for store information of an object from XFloorWnd, like height, color, name....

CFloorPageObject - class derived from CFloorObject, which deals objects as pages.

CPagesListCtrl - used by CXFloorWndPropPage, to manage the items(pages) from XFloorWnd.

XFloorWndDemo.zip file:

CXFloorWnd - class derived from CWnd, which manages all events from XFloorWnd control. This class was generated by Developer Studio  I  inserted a new component to XFloorWnd file. In this file you can see all methods, and properties which you can use. After inserting, the Developer Studio generates from you a file XFloorWnd.h, and XFloorWnd.cpp, which contains all that you need to use control.

Properties of XFLoorWnd Control:

OLE_COLOR GetBackColor() - return the color of XFloorWnd' background

void SetBackColor(OLE_COLOR) - set the new color of of XFloorWnd' background

BOOL GetAnimation() - return TRUE or FALSE, if floor page will be animated.

void SetAnimation(BOOL) - set the animation to on/off

long GetSleep() - Used for animation

void SetSleep(long) - Used for animation

BOOL GetSign() - return BOOL value if right sign on page will occur or no.

void SetSign(BOOL) - set the previous value

CString GetPages() - This string contain the name and user data for all pages entered on design time into control

void SetPages(LPCTSTR) - used at design time


short AddPage(LPCTSTR sName) - add a new page called sName into control

BOOL DeletePage(short nIndex) - delete the page nIndex.

CString GetPageName(short nIndex) - return the name for page nIndex

short GetPage(LPCTSTR lpszPageName) - return the index of page with name lpszPageName

BOOL ActivatePage(short nIndex) - activates the page nIndex

BOOL AttachWindow(short nIndex, long pWnd) - You can assign to one page one window. If you will select the page then the window will show. So thing for deactivate page, hide the window.

BOOL SetPageName(short nIndex, LPCTSTR lpszPageName) - Rename page nIndex

void Init() - If you insert in design time some items, and at runtime you want to attach some windows, you must call Init function after attach operation. Is useful for resize all attached windows.

short GetHeight(short nIndex) - Get the height in pixel of page nIndex

void SetHeight(short nIndex, short nNewValue) - return the height in pixel of page nIndex

unsigned long GetColor(short nIndex) - return the color of page nIndex. Don't forget to cast the returnbed value as COLORREF

void SetColor(short nIndex, unsigned long newValue) - Set the new color for page nIndex to be newValue. newValue is a COLORREF type.

long GetUserData(short nIndex) - get the user data assigned to page nIndex

void SetUserData(short nIndex, long nNewValue) - attach to page nIndex one user data as LPARAM type.

void AboutBox() - invokes copyright dialog.


ActivatePage - this event occurs when the user selects a page

Click - this event occurs when user click everywhere in XFloorWnd control.

Download demo project

Download source


What is xPropertiesWnd ActiveX Control?

Everybody knows what is a property window (exactly like in Visual Basic 5.00). This window contains many properties (name and value), group by one, or more criteria. At runtime you can add, delete, change the value, the name, enable or disable of each property. Properties window can edit items (property) throw more possibility. As sample, for a name property you can change this with an edit control. If you have more possibility to choice a combo is a good idea, and so on.

Description of classes used in xPropertiesWnd ActiveX Control:

 _DXPropertiesWnd – interface with methods and properties of xPropertiesWnd.

_DXPropertiesWndEvents – interface for events of xPropertiesWnd.

CAsControls – all window controls supported by xPropertiesWnd is here.

CControlsWnd – base class for all controls that can be showed on xPropertiesWnd

CControlsWnd_CComboBox – class derived from CControlsWnd . This class manages every combo.

CControlsWnd_CBoolComboBox – class to manage a boolean combo box. (With two values: False & True). This class is derived from CControlsWnd_CComboBox.

CControlsWnd_CUserComboBox – class to manage a user combo box. Not implemented yet.

CControlsWnd_CEdit – class derived from CControlsWnd, for manages an edit control into xPropertiesWnd.

CControlsWnd_CButton – class derived from CControlsWnd, for buttons.

CPageListCtrl – class derived from CListCtrl, which manages a list page from xPropertiesWnd.

CPageListCtrlDesign – class derived from CPageListCtrl, and called only in design time.

CXFloorWnd – class generated by DevStudio. This class contain all methods and properties of xFloorWnd.

CXFloorPropertiesWnd – class derived from CXFloorWnd. This works only at runtime time

CXFloorPropertiesWndDesign – class derived from CXFloorPropertiesWnd. This works only at design time.

CXPropertiesWndApp –application class.

CXPropertiesWndCtrl – xPropertiesWnd ActiveX Control. Class derived from COleControl.

CXPropertiesWndPropPage – dialog for properties page . 


void ActivatePage(short nIndexPage) – activate page nIndexPage.

short AddPage(LPCTSTR lpszPageName) – add a new page called lpszPageName, and return the position of page

short AddProperty(LPCTSTR lpszPropertyName, LPCTSTR lpszPropertyAs, short nPropertyType) – add a new property called lpszPropertyName. lpszPropertyName can be something like this: "Page 1\Item". This means that property "Item" will be added in page named "Page1", if this will be found. lpszPropertyAs parameter can be one of the following: "Edit", "CombBox", "BoolComboBox", "Button". The property added can be enable or disable, case on nPropertyType (0 – Enable, 1 – Disable(Grayed), 2 – Disable(Black)).

BOOL DeletePage(short nIndexPage) – delete the page with index nIndexPage. Return True or False. True if page was deleted.

BOOL DeleteProperty(short nIndexPage, short nIndexProperty) – delete the property from page nIndexPage, at nIndexProperty position. Return True if successful.

BOOL _DeletePropertyByName(LPCTSTR lpszPropertyName) – delete the property called lpszPropertyName. LpszPropertyName can be in path form (Sample: "Page1 \Item")

short GetActivePage() – return the index of active page. –1 if no active page.

short GetActiveProperty(short FAR* nIndexPage) – Return the position of activate property from active page. NIndexPage will contain the value of GetActivePage. –1 if no property selected.

BOOL GetDefaultValue(short nIndexPage, short nIndexProperty, BSTR FAR* sPropertyValue) – get the value of ptoperty from page nIndexPage at nIndexProperty. The value as string will be returned in sPropertyValue. To manipulate OLE strings see SysAllocString, and AllocSysString functions from Cstring class. Return True if asked property exists.

BSTR GetDefaultValueByName(LPCTSTR lpszPropertyName) - return the value of property lpszPropertyName (Sample: "Page1\Item") as OLE string. If the return is NULL, this means that lpszPropertyName is no property, or page is not found.

short GetPage(LPCTSTR lpszPageName) – return the index of page lpszPageName. –1 if no page lpszPageName.

BSTR GetPageName(short nIndexPage) – return the name of page from nIndexPage position. NULL if no page.

long GetPagesCount() – return the count of pages from xPropertiesWnd Control.

BSTR GetPropertyAs(short nIndexPage, short nIndexProperty) – return one of the following values: "Edit", "CombBox", "BoolComboBox", "Button".

short GetPropertyCount(short nIndexPage) – return the count of properties from page nIndexPage

BOOL GetPropertyIndex(LPCTSTR lpszPropertyName, short FAR* nIndexPage, short FAR* nIndexProperty) – return true if exists property lpszPropertyName. In nIndexPage will be the page, and in nIndexProperty wil be the position of found property.

BSTR GetPropertyName(short nIndexPage, short nIndexProperty) – return the name of property from nIndexPage, at nIndexProperty position. NULL if no property.

short GetPropertyType(short nIndexPage, short nIndexProperty) – If the property from page nIndexPage at nIndexProperty position is enable, the function will return 0. Else, the returned values will be 1 or 2. 1. Both for disable property. 1 grayed property and 2 black property.

void Init() – call this function to initialize the xPropertiesWnd control.

short InsertProperty(short nIndexPage, short nIndexProperty, LPCTSTR lpszPropertyName, LPCTSTR lpszPropertyAs, short lpszProperyType) – Insert a new property with name lpszPropertyName. In this case lpszPropertyName cannot be as path form. See AddProperty method for the others parameters. One specification more. If nIndexPage == -1, means that insert will be add at the end of page.

BOOL IsProperty(short nIndexPage, short nIndexProperty) – return True is property nIndexProperty exists in nIndexPage page.

BOOL SetActiveProperty(short nIndexPage, short IndexProperty) – Set property nIndexProperty as active property. The nIndexPage page will be activate. Return true if all OK.

BOOL SetActivePropertyByName(LPCTSTR lpszPropertyName) – The same thing as SetActiveProperty(short,short).

BOOL SetDefaultValue(short nIndexPage, short nIndexProperty, LPCTSTR lpszDefaultvalue) – Set the value of property nIndexProperty from nIndexPage page to be lpszDefaultvalue

BOOL SetDefaultValueByName(LPCTSTR lpszPropertyName, LPCTSTR lpszPropertyValue) – The same thing like SetDefaultValue(short, short, LPCTSTR).

void SetPropertyName(short nIndexPage, short nIndexProperty, LPCTSTR lpszProperyName) – Rename the property nIndexProperty from nIndexPage page.

void SetPropertyType(short nIndexPage, short nIndexProperty, short nNewType) – Enable or disable the property from nIndexPage page at nIndexProperty position.


SelectPage(short nIndex) – Occurs when a new page was activated.

UnselectItem(short nIndexPage, short nIndexItem) - After a property was unselected the control generate this event.

PropertyChanging(short nIndexPage, short nIndexProperty) - Occurs at the start of edit mode (before to edit).

PropertyChanged(short nIndexPage, short nIndexProperty) - Occurs at the end of edit mode (after edit done).

ButtonClick(short nIndexPage, short nIndexProperty) – If user click a button property, the control generates ButtonClick event

LoadItems(short nIndexPage, short nIndexProperty, BSTR* lpszItems) – Before editing a combobox, this need to be filled with items. (Sample: CString items(_T("Item1\Item2")); *lpszItems = items.AllocSysString();. The separator character is ‘\’.

Download demo project

Download source


  • Attaching Window to Control

    Posted by Legacy on 03/29/2003 08:00am

    Originally posted by: Rahul

    I am trying to attach a listbox to the Xfloor control from VB .NET Can anyone please help with how to do this.

    I will be very grateful.


  • none

    Posted by Legacy on 05/27/2000 07:00am

    Originally posted by: venukumar

    we are creating ActiveX Control using MFC ActiveXControl Wizard, but here default one ellipse is comming with selected rectangle.How to remove the rectangle shpae?.
    Give your valuable suggestion.

  • Adding Windows

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

    Originally posted by: Andrew Whitten


    I was confused for a while, since I was able to work fine with the Xfloor.ocx distributed with the example.
    But when I compiled a normal debug version in Visual C++ 6, the control works, but will no longer attach Windows! I'm trying to work out why this is happening, but if anyone has an idea, then I'd love to hear.
    I'm not compiling the Unicode version (since I'm running Windows '98).



    Whilst implementing a similer control using this for reference, I had a similer problem with disappearing CWnd pointers! I just replaced them with HWND's & everythings fine.

  • Adding ATL controls

    Posted by Legacy on 08/05/1999 07:00am

    Originally posted by: Andrew Whitten

    Hi, I love this control, it's exactly what I was looking for...
    Except the problem is that when I write a composite control with ATL, and add it to XFloor, compile and click on the ATL control within the XFloor control, my applications freeze!

    I have "report all exceptions" turned on, nothing happens.

    Has this anything to do with the "Passing CWnd pointer through COM interface not safe." comment?

  • Can't run TxProp demo. MSVC 6.0 Problem?

    Posted by Legacy on 05/11/1999 07:00am

    Originally posted by: Ed Sutton

    I would really like to see the xPropertiesWnd control in action. Unfortunately, when I run the demo TxProp.exe I get a "TxProp" message box that says "Load library xPropertiesWnd.ocx failed". Is this a MSVC 6.0 comaptibility problem?

    I think the OCX was registered properly. When I built the xPropertiesWnd.ocx I got the message "RegSvr32: DllRegisterServer in .\ReleaseU\XPropertiesWnd.ocx succeeded." in the output window.

    Could I have downloaded the wrong zip files?

    I got the OCX propgrid.zip source code from the /atl/propgrid.shtml page.

    I got the demo project source code XPropertiesWndDemo.zip demo source code from the /atl/XFloorWnd.shtml page.

    I rebuilt everything using MSVC 6.0.

    Any ideas or sugestions are much appreciated.

    -Ed Sutton

  • Font size crashed in VB6

    Posted by Legacy on 04/07/1999 07:00am

    Originally posted by: A. Dunkel

    if the control works in VB6, the font size crashed in different times in the XPropertiesWnd if the mouse clicked on it.
    Why, Thanks


  • Register the control

    Posted by Legacy on 11/26/1998 08:00am

    Originally posted by: Mihai

    Before register the controls on your computer, be sure that you have already instaled on system folder the
    following files: mfc42d.dll, mfco42d.dll, msvcrtd.dll. All this because ocx files found on this site are not
    static linked with MFC and debug version. I do not make a statical version, because if u use xProp, xProp use
    xFloor, and in that way I duplicate the infos.
    The last compile of controls was under VC++ 6.0, and so the control needs the MFC dll's. How can you find the imported dll of my ocx. Just rename the ocx into dll, right click, select quicq view. There you will see all imports tables.
    Sincerely, Mihai

  • Another notice about Compile with VC++ 6.0

    Posted by Legacy on 11/10/1998 08:00am

    Originally posted by: Mihai

    If you run the release demo project, it will crash, because I forget to put static BOOL CALLBACK
    EnumWindowProc(HWND hWnd, LPARAM lParam) in class CWindowsTreeCtrl. ( In the old version, is declaration
    without CALLBACK). I updated already the demo project, so you didn't need to change this.
    Sincerely, Mihai Filimon

  • Compile with VC++ 6.0

    Posted by Legacy on 11/09/1998 08:00am

    Originally posted by: Mihai

    To copile the controls under VC++6.0,  All that you have to do with the latest versions of controls, is to
    remove the implemetnation of function AtlA2WHelper. Another thing. If you complide the demo project of
    xFloorWnd, you have to replace . with -> in place where the copiler is stopping.
    Sincerely, Mihai

  • How depressing

    Posted by Legacy on 11/08/1998 08:00am

    Originally posted by: JJ

    I Just spent the whole weekend trying to make a similiar
    control. 35% done. And it is not even close to how advanced
    this control is. Nor is it as well planned. This control is one of
    the best i have ever seen. (Of this type). Nice work!!!

    I cannot believe this only took you 2 days.
    i would love to see something you spent
    a week on...:)


  • Loading, Please Wait ...

  • You must have javascript enabled in order to post comments.

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

Most Popular Programming Stories

More for Developers

RSS Feeds

Thanks for your registration, follow us on our social networks to keep up-to-date