From: Chris I. <ch...@sp...> - 2002-07-19 13:21:35
|
If anyone could give me some advice on this, I'd really appreciate it. I'm trying to load a windows system icon so that I can later draw it with *DC::DrawIcon. This code: $this->{icon} = Wx::Icon->new(wxICON_QUESTION, wxBITMAP_TYPE_ICO_RESOURCE); Dies with an error to saying that wxPerl cannot find the overloaded function (I've tried several other variations on this as well, from the wxWindows online docs). However, if I just do: $this->{icon} = Wx::Icon->new(); $this->{icon}->LoadFile(wxICON_QUESTION, wxBITMAP_TYPE_ICO_RESOURCE); It doesn't die. But then when I go to draw it: sub OnPaint { my ($this, $event) = @_; my $dc = Wx::PaintDC->new($this); $dc->DrawIcon($this->{icon}); } It crashes when it gets to DrawIcon. I've tried sticking the OnPaint both inside of my dialog directly, and inside of a Wx::Panel. Anyone have any ideas? Thanks in advance, Chris |