- wxBitmap checkBmp(width, height);
- wxRect rect (0, 0, width, height);
-
- wxRendererNative& renderer = wxRendererNative::Get();
-
- // create no checked image
- {
- // first create bitmap in a memory DC
- wxMemoryDC memDC(checkBmp);
- memDC.Clear();
- // then draw a check mark into it
- renderer.DrawCheckBox(this, memDC, rect, 0);
- } // select checkBmp out of memDC
-
- states->Add(checkBmp);
-
- // create checked image
- {
- wxMemoryDC memDC(checkBmp);
- renderer.DrawCheckBox(this, memDC, rect, wxCONTROL_CHECKED);
- }
-
- states->Add(checkBmp);