-
-void MyFrame::OnTest(wxCommandEvent& event)
-{
-}
-
-void MyFrame::OnPaint(wxPaintEvent& event)
-{
- wxPaintDC dc(this);
-
- wxMemoryDC dcMem;
- wxSize size(GetClientSize());
- dcMem.SelectObject(wxBitmap(size.x, size.y, -1));
-
- dcMem.SetBackground(wxBrush(wxColour(0, 0, 255), wxSOLID));
- dcMem.SetTextForeground(wxColour(0, 255, 0));
- dcMem.SetTextBackground(wxColour(0, 0, 0));
- dcMem.SetBackgroundMode(wxSOLID);
- dcMem.Clear();
- dcMem.DrawText("Hello, wxWindows!", 10, 10);
-
- wxPoint ptOrig(0, 0);
- dc.Blit(ptOrig, size, &dcMem, ptOrig);
-
- dcMem.SelectObject(wxNullBitmap);
-}