Author Topic: Drawing on NoteBook with wxClientDC  (Read 3758 times)

himaja

  • Guest
Drawing on NoteBook with wxClientDC
« on: July 25, 2006, 08:48:02 pm »

Hi,

I'm trying to draw a graph on a page of a NoteBook, and it's just not working for me. I modified the "Widgets" sample given with wxWidgets as follows:

void GraphPage::OnMotion(wxMouseEvent& event)
{
    if(event.Dragging())
    {

        wxClientDC dc(this);
        wxPen pen(*wxRED, 1);
        dc.SetPen(pen);
        dc.DrawPoint(event.GetPosition());
        dc.SetPen(wxNullPen);

    wxLogMessage("mouse event");
    }

}

The Log message appears, but nothing else does. I've tried other samples from the book "Cross Platform GUI Programming with wXWidgets" on this page, but nothing seems to appear. Could someone explain to me what I am doing wrong?

Thanks,
Himaja.

Offline Ceniza

  • Developer
  • Lives here!
  • *****
  • Posts: 1441
    • CenizaSOFT
Re: Drawing on NoteBook with wxClientDC
« Reply #1 on: July 25, 2006, 10:11:39 pm »
Please use http://wxforum.shadonet.com/ to post your questions about wxWidgets.