57 afx_msg
int OnCreate(LPCREATESTRUCT lpCreateStruct);
58 afx_msg
void OnSize(
UINT nType,
int cx,
int cy);
59 afx_msg
void MeasureItem(LPMEASUREITEMSTRUCT lpMeasureItemStruct);
60 afx_msg
void OnNMClick(NMHDR *pNMHDR, LRESULT *pResult);
67 virtual ~ToggleListView();
69 DECLARE_DYNCREATE(ToggleListView)
73 virtual
void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct);
CONST PIXELFORMATDESCRIPTOR UINT
virtual BOOL PreCreateWindow(CREATESTRUCT &cs)
Sets some window styles before the window is created.
int GetToggleState(int index)
Gets the state of an item in the list.
void SetToggleState(int index, int toggleState, bool notify=false)
Sets the state of an item in the list.
virtual void OnStateChanged(int index, int toggleState)
void SetToggleIcons(LPCSTR disabled=NULL, LPCSTR on=NULL, LPCSTR off=NULL)
Sets the tree icons to dispay for each of the three states.
afx_msg void OnNMClick(NMHDR *pNMHDR, LRESULT *pResult)
Toggles the state of an item when the user clicks in the window.
void Draw3dRect(HDC hDC, RECT *rect, HBRUSH topLeft, HBRUSH bottomRight)
Draws a 3d rectangle using the given brushes this code was taken from the gui editor.
typedef HDC(WINAPI *PFNWGLGETCURRENTREADDCARBPROC)(void)
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct)
Called as the window is being created and initializes icons and window styles.
afx_msg void MeasureItem(LPMEASUREITEMSTRUCT lpMeasureItemStruct)
Returns the size of each item in the toggle list.
A simple list view that supports a toggle button.
afx_msg void OnSize(UINT nType, int cx, int cy)
Called when the window is being resized.
virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct)
Responsible for drawing each list item.