-
- // VZ: this is some experimental code which may be used to get the
- // TVS_CHECKBOXES style functionality for comctl32.dll < 4.71.
- // AFAIK, the standard DLL does about the same thing anyhow.
-#if 0
- if ( m_windowStyle & wxTR_MULTIPLE )
- {
- wxBitmap bmp;
-
- // create the DC compatible with the current screen
- HDC hdcMem = CreateCompatibleDC(NULL);
-
- // create a mono bitmap of the standard size
- int x = ::GetSystemMetrics(SM_CXMENUCHECK);
- int y = ::GetSystemMetrics(SM_CYMENUCHECK);
- wxImageList imagelistCheckboxes(x, y, false, 2);
- HBITMAP hbmpCheck = CreateBitmap(x, y, // bitmap size
- 1, // # of color planes
- 1, // # bits needed for one pixel
- 0); // array containing colour data
- SelectObject(hdcMem, hbmpCheck);
-
- // then draw a check mark into it
- RECT rect = { 0, 0, x, y };
- if ( !::DrawFrameControl(hdcMem, &rect,
- DFC_BUTTON,
- DFCS_BUTTONCHECK | DFCS_CHECKED) )
- {
- wxLogLastError(wxT("DrawFrameControl(check)"));
- }
-
- bmp.SetHBITMAP((WXHBITMAP)hbmpCheck);
- imagelistCheckboxes.Add(bmp);
-
- if ( !::DrawFrameControl(hdcMem, &rect,
- DFC_BUTTON,
- DFCS_BUTTONCHECK) )
- {
- wxLogLastError(wxT("DrawFrameControl(uncheck)"));
- }
-
- bmp.SetHBITMAP((WXHBITMAP)hbmpCheck);
- imagelistCheckboxes.Add(bmp);
-
- // clean up
- ::DeleteDC(hdcMem);
-
- // set the imagelist
- SetStateImageList(&imagelistCheckboxes);
- }
-#endif // 0
-