Class Library Reference

From Win32++

Library Reference

Classes

CAnimation A class used to create an animation control.
CBitmap A class used to create a bitmap resource. CBitmapInfoPtr A class used to create the BITMAPINFO structure. CBrush A class used to create a brush resource. CButton A class used to create a button control. CClientDC The class used to device contect for the client area of the window. CCmdBar The class used to create a command bar control. (Windows CE only). CComboBox A class used to create a combo box control. CComboBoxEx A class used to create a ComboBoxEx control. CContainer A class used for docking tabbed window. CCriticalSection The class used for thread synchronisation. CDateTime This class is used to create a date and time picker control. CDC This class is used to simplify working with device contexts and GDI graphics. CDialog The class responsible for creating modal and modeless dialogs. It can also be used to create dialog applications. CDockContainer The class is used to create docking containers. CDocker The class used for a docking window. Docking windows can also be used as splitter windows. CEdit A class used to create an edit control. CFile A class used to read from and write to files. CFont A class used to create a font resource. CFrame The class used to create a frame window. The frame window has a menu, toolbar, and a status bar. The client area of the frame window is occupied by a separate CWnd window, often called the view window. CGDIObject The base class for GDI objects including CBitmap, CBrush, CFont, CPalette, CPen, and CRgn. CHeader A class used to create a header control. CHotKey A class used to create a hot key control. CImageList A class used to create and manage Image Lists. CIPAddress The class used to create an IP address control. CListBox A class used to create a list-box control. CListView A class that is used to create a List-View control. CMDIChild The class for MDI child windows. All MDI children should be inherited from this class. CMDIFrame The class for MDI frames. CMemDC The class used to create memory device context. CMenu The class used to create and modify menus. CMenuBar The class used to create the menubar. A menubar is a specialized toolbar which mimics the behaviour of a menu. It is usually used within a rebar control. CMetaFileDC A class used to create metafile device context. CMonthCalendar A class used to create a month calendar control. CPaintDC A class used to create device context for the WM_PAINT message. CPalette A class used to create a palette resource. CPen A class used to create a pen resource. CPoint A class that can be used in place of a POINT structure. CProgressBar A class used to create a progress bar control. CPropertyPage The class used to create a property page. A property sheet has one or more property pages. CPropertySheet The class used to create a property sheet. CReBar The class used to create a rebar control. CRect A class that can be used in place of a RECT structure. CRgn A class used to create a region. CRibbon The class used to add a Window 7 ribbon framework to a window. CRibbonFrame The class used to create a frame window with a Window 7 ribbon framework. A menu and toolbar will be used if the operating system doesn't support the ribbon. CRichEdit A class used to create a rich edit control. CScrollBar A class used to create a scroll bar control. CSize A class that can be used in place of a SIZE structure. CSlider The class used to create a slider control (sometimes referred to as a track bar control). CSocket The class used for networking. CSpinButton The class used to create a spin button control (sometimes referred to as an up down control). CStatic The class used to create a static control. CStatusBar The class used to create a status bar. CString The class used to create and modify character strings. CTab The class used to create a Tab control. CTabbedMDI The class used for Tabbed MDI window. CTaskDialog The class used for to create a Task Dialog. CToolBar The class used to create a rebar control. CToolTip The class used to create a tool tip control. CTreeView A class used to create a Tree-View control. CWceFrame The class used to create a frame window on Pocket PCs. (Windows CE only). CWebBrowser The class used to create a web browser in a window. CWinApp The class responsible for initializing Win32++, and also provides the message loop. You  inherit from this class to start the application. CWindowDC The class used to create a device context for the entire window, including the non-client area. CWinException A class which handles exceptions. CWinThread The class used to to create worker threads and GUI threads. A window can run in a GUI thread. CWnd The CWnd class represents a window. CWnd handles such things as window creation and window destruction, as well as determining how the window messages are handled. Shared_Ptr A smart pointer that can be used in a STL container such as a vector.

 

Global Functions

Defined in winutils.h
GetApp
CWinApp* GetApp();
Returns a pointer to the CWinApp derrived class.
GetCursorPos
CPoint GetCursorPos();
Returns a CPoint containing the cursor position.
GetComCtlVersion
int GetComCtlVersion();
Returns an integer which indicates the version of of the ComCtl32.dll used.
GetSizeofMenuItemInfo
UINT GetSizeofMenuItemInfo();
Returns the correct size of the MENUITEMINFO structure for all versions of windows.
GetSizeofNonClientMetrics
UINT GetSizeofNonClientMetrics();
Returns the correct size of the NONCLIENTMETRICS structure for all versions of windows.
GetWinVersion
int GetWinVersion();
Returns an integer indicating the version of windows running.
IsAeroThemed
BOOL IsAeroThemed();
Returns TRUE if Aero themes are being used.
IsXPThemed
BOOL IsXPThemed();
Returns TRUE if XP themes are being used.
IsLeftButtonDown
BOOL IsLeftButtonDown();
Returns TRUE if the left mouse button is pressed.
lstrcpyn
LPTSTR lstrcpyn(LPTSTR lpstrDest, LPCTSTR lpstrSrc, int nLength);
Copies a specified number of characters from a source string to a destination string.
LoadCommonControls
void LoadCommonControls();
Registers and initializes certain common control window classes.
TRACE
void TRACE(LPCSTR str);
void TRACE(LPCWSTR str);
Sends a string to the debug/output pane, or an external debugger.
 
String Conversion Functions
A2BSTR Converts an ANSI string to a BSTR string.
A2OLE Converts an ANSI string to an OLE string.
A2T Converts an ANSI string to a TCHAR string.
A2W Converts an ANSI string to a WCHAR string.
OLE2A Converts an OLE string to an ANSI string.
OLE2T Converts an OLE string to a TCHAR string.
OLE2W Converts an OLE string to a WCHAR string.
T2A Converts a TCHAR string to an ANSI string.
T2BSTR Converts a TCHAR string to a BSTR string.
T2OLE Converts a TCHAR string to an OLE string.
T2W Converts a TCHAR string to a WCHAR string.
W2A Converts a WCHAR string to an ANSI string.
W2BSTR Converts a WCHAR string to a BSTR string.
W2OLE Converts a WCHAR string to an OLE string.
W2T Converts a WCHAR string to a TCHAR string.
 
Defined in cstring.h
LoadString
CString LoadString(UINT nID);
Retrieves a string resource and returns the result as a CString.
 
Defined in webbrowser.h
GetPidlLength
UINT GetPidlLength(LPITEMIDLIST pidl);
Returns the length of the Item Identifier List. Item Identifier Lists identify the names of files and folders within the shell namespace.

Macros

GET_X_LPARAM Retrieves the signed x-coordinate from the given LPARAM value.
GET_Y_LPARAM Retrieves the signed y-coordinate from the given LPARAM value.
MAX Returns the higher of two values.
MIN Returns the lower of two values.
NO_USING_NAMESPACE Define this macro to suppress using the Win32xx namespace.

Type declarations

tString typedef std::basic_string<TCHAR> tString;
tStringStream typedef std::basic_stringstream<TCHAR> tStringStream;
BitmapPtr typedef Shared_Ptr<CBitmap> BitmapPtr;
BrushPtr typedef Shared_Ptr<CBrush> BrushPtr;
DCPtr typedef Shared_Ptr<CDC> DCPtr;
GDIPtr typedef Shared_Ptr<CGDIObject> GDIPtr;
FontPtr typedef Shared_Ptr<CFont> FontPtr;
ImageListPtr typedef Shared_Ptr<CImageList> ImageListPtr;
MenuPtr typedef Shared_Ptr<CMenu> MenuPtr;
PalettePtr typedef Shared_Ptr<CPalette> PalettePtr;
PenPtr typedef Shared_Ptr<CPen> PenPtr;
RgnPtr typedef Shared_Ptr<CRgn> RgnPtr;
WndPtr typedef Shared_Ptr<CWnd> WndPtr;

Messages

UWM_CLEANUPTEMPS
const UINT UWM_CLEANUPTEMPS = RegisterWindowMessage(_T("UWM_CLEANUPTEMPS"));
Message - posted to cleanup temporary CDCs, CWnds etc.
UWM_DOCKACTIVATE
#define UWM_DOCKACTIVATE (WM_APP + 0x3F01)
Message - sent to dock ancestor when a docker is activated or deactivated.
UWM_DOCKDESTROYED
#define UWM_DOCKDESTROYED (WM_APP + 0x3F02)
Message - posted when docker is destroyed.
UWM_DRAWRBBKGND
#define UWM_DRAWRBBKGND (WM_APP + 0x3F03)
Message - sent by rebar to parent to perform background drawing. Return TRUE if handled.
UWM_DRAWSBBKGND
#define UWM_DRAWSBBKGND (WM_APP + 0x3F04)
Message - sent by statusbar to parent to perform background drawing. Return TRUE if handled.
UWM_GETFRAMEVIEW
#define UWM_GETFRAMEVIEW (WM_APP + 0x3F05)
Message - returns the HWND of the frame's view window.
UWM_GETMBTHEME
#define UWM_GETMBTHEME (WM_APP + 0x3F06)
Message - returns a pointer to MenuBarTheme.
UWM_GETRBTHEME
#define UWM_GETRBTHEME (WM_APP + 0x3F07)
Message - returns a pointer to ReBarTheme.
UWM_GETSBTHEME
#define UWM_GETSBTHEME (WM_APP + 0x3F08)
Message - returns a pointer to StatusBarTheme.
UWM_GETTBTHEME
#define UWM_GETTBTHEME (WM_APP + 0x3F09)
Message - returns a pointer to ToolBarTheme.
UWM_POPUPMENU
#define UWM_POPUPMENU (WM_APP + 0x3F0A)
Message - creates the menubar popup menu.
UWM_TBRESIZE
#define UWM_TBRESIZE (WM_APP + 0x3F0B)
Message - sent by toolbar to parent. Used by the rebar.
UWM_TBWINPOSCHANGING
#define UWM_TBWINPOSCHANGING (WM_APP + 0x3F0C)
Message - sent to parent. Toolbar is resizing.
UWM_UPDATECOMMAND
#define UWM_UPDATECOMMAND (WM_APP + 0x3F0D)
Message - sent before a menu is displayed. Used by OnUpdate.
UWM_WINDOWCREATED
const UINT UWM_WINDOWCREATED = RegisterWindowMessage(_T("UWM_WINDOWCREATED"));
Message - posted when a window is created or attached.
UWN_BARSTART
#define UWN_BARSTART (WM_APP + 0x3F0E)
Notification - docker bar selected for move.
UWN_BARMOVE
#define UWN_BARMOVE (WM_APP + 0x3F0F)
Notification - docker bar moved.
UWN_BAREND
#define UWN_BAREND (WM_APP + 0x3F10)
Notification - end of docker bar move.
UWN_DOCKSTART
#define UWN_DOCKSTART (WM_APP + 0x3F11)
Notification - about to start undocking.
UWN_DOCKMOVE
#define UWN_DOCKMOVE (WM_APP + 0x3F12)
Notification - undocked docker is being moved.
UWN_DOCKEND
#define UWN_DOCKEND (WM_APP + 0x3F13)
Notification - docker has been docked.
UWN_TABCHANGED
#define UWN_TABCHANGED (WM_APP + 0x3F14)
Notification - tab size or position changed.
UWN_TABDRAGGED
#define UWN_TABDRAGGED (WM_APP + 0x3F15)
Notification - tab is being dragged.
UWN_UNDOCKED
define UWN_UNDOCKED (WM_APP + 0x3F16)
Notification - sent by docker when undocked.