Package Win32::GUI::Graphic

Back to the Packages


new Win32::GUI::Graphic(PARENT, %OPTIONS)

Creates a new Graphic object; can also be called as PARENT->AddGraphic(%OPTIONS). Class specific %OPTIONS are:



Sent when the Graphic object needs to be repainted. Note that you need to use GetDC() to get the DC of the Graphic object where you do your paint work, and then Validate() the DC to inform Windows that you painted the DC area (otherwise it will continue to call the Paint event continuously). Example:

  sub Graphic_Paint {
      my $DC = $Window->Graphic->GetDC();
      $DC->MoveTo(0, 0);
      $DC->LineTo(100, 100);