Hello all -
 
        I'm attempting to use the windows API function "DrawIcon" to draw one
of the stock icons (i.e. Warning, Information, Error, etc) into a dialog
box.  I'm having a heck of a time.  
 
   I'm loading the DrawIcon function using the Win32::API package, but
 the Win32::GUI  issue is that I can't seem to draw to the device
context (or at least get it to show up) of either my dialog or a
Win32::Graphic object.  I've tried just drawing a line using one of the
methods defined in Win32::GUI::DC, but it doesn't seem to show up
either.  So I'm thinking the root of my problem might be that I'm
attempting to draw incorrectly.  Unfortunately I don't have my original
code available, but it goes something like this:
 
 $Dialog = new Win32::GUI::DialogBox( -name => "DialogBox",
                                      -text => "DialogBox",
                                      -width => 400,
                                      -height => 400);
 
 [ add things to the dialog box ]
 
 and then [either this or my code to grab a stock Icon and call
 DrawIcon]:
 
 $Dialog->GetDC->MoveTo(0, 0);
 $Dialog->GetDC->LineTo(100, 100);
 $Dialog->GetDC->Validate;
 $Dialog->Show;
 Win32::GUI::Dialog;
 
 I've tried all sorts of other things as well, such as calling
 InvalidateRect and Update on my Dialog object, and creating a Graphic
 object and using it's GetDC method.  If anyone has any hints, they 
would be greatly appreciated.  
 
   The basic idea here is just to be able to use those icons in a dialog
 that's more complex than the standard DialogBox function, I need to
have a few text inputs and such, but I need those icons as well.  If
anyone knows of an easier way to do this, I'm all ears.
 
 Thanks a bunch,
 
 chris


-- 
--
  The shortest distance between two points is under construction.

    -- Noelie Alito


Reply via email to