Rather than a graphic, try using a normal window that's created as a child window. I do the following to draw various charts:

  $newwindow = new Win32::GUI::Window (
      -parent      => $parent,
      -name        => $name,
      -pos         => $pos,
        -size        => $size,
      -popstyle    => WS_CAPTION | WS_SIZEBOX,
      -pushstyle   => WS_CHILD | WS_CLIPCHILDREN,
      -pushexstyle => WS_EX_CLIENTEDGE,
      -hscroll     => 1,
      -class       => $class,
      -onScroll    => \&Generic_Scroll,
      -onTimer     => \&MoveOutTest,
        -onMouseMove => \&Generic_MouseMove,
        -onPaint     => \&Generic_Paint,
   );

You should have access to all the mouse events and it behaves just like a graphic window. It'll contain scroll bars and have a sunken edge, but just remove those options.

Cheers,

Jeremy.


> Date: Thu, 18 Dec 2008 18:16:33 -0600
> From: ash@es-ash.net
> To: jez_white@hotmail.com; perl-win32-gui-users@lists.sourceforge.net
> Subject: RE: [perl-win32-gui-users] Painting non-graphical controls
>
> No, as Win32::GUI::Graphic controls don't provide a mouseOver or mouseOut
> event, I'm stuck with trying to modify the zorder or finding an alternative
> method.
>
> It's a form of 'trainer' (thats very very generalized) for an MMO. The
> original application had a userbase of about 5000 people.
>
>
> On Thu, 18 Dec 2008 22:14:02 +0000, Jeremy White <jez_white@hotmail.com>
> wrote:
> >
> > Hi,
> >
> > My 2cents. Can't you create a dynamic control (within a transparent
> > window) that is created on the fly when the user moves a mouse over an
> > 'image' of the control?
> >
> > Can you say what the app is?
> >
> > Cheers,
> >
> > jez.
> >
> >
> >> Date: Wed, 17 Dec 2008 02:07:40 -0600
> >> From: ash@es-ash.net
> >> To: perl-win32-gui-users@lists.sourceforge.net
> >> Subject: [perl-win32-gui-users] Painting non-graphical controls
> >>
> >> Combobox isn't responsive to either mouse or keyboard when placed on top
> > of
> >> a background GUI::Graphic object. If placed without the graphic, they're
> >> responsive.
> >>
> >> As far as I know, I'm forced to custom paint the images to the window
> >> because they're .pngs with alpha.
> >>
> >> Method #1
> >> Used winMain_Paint {} to draw my graphics onto the window as desired,
> > but
> >> non-image controls aren't displayed or rendered properly..
> >>
> >> Method #2
> >> This version reads from an .ini to generate graphic controls on-the-fly,
> >> assigning custom paint handlers to them while simply creating comboBoxes
> >> after all graphics have been created (so they're visible, otherwise
> > they're
> >> covered by the graphic controls)
> >> The problem with this method is that any controls that are placed on the
> >> window after the graphic controls aren't interactive. (Doesn't respond
> > to
> >> keyboard nor mouse)
> >>
> >> Is there any way around either of these methods?
> >>
> >> The idea solution would be a way of forcing the ComboBox control to be
> > 'on
> >> top' of all other controls, I just haven't figured out a way in the week
> > or
> >> so I've been buried in this project.
> >>
> >> This is for a heavily skinned app that's very widely used, I'd greatly
> >> appreciate any help you could offer.
> >> -- Ash
> >>
> >>
> >>
> >
> ------------------------------------------------------------------------------
> >> SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas,
> > Nevada.
> >> The future of the web can't happen without you. Join us at MIX09 to
> > help
> >> pave the way to the Next Web now. Learn more and register at
> >>
> >
> http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
> >> _______________________________________________
> >> Perl-Win32-GUI-Users mailing list
> >> Perl-Win32-GUI-Users@lists.sourceforge.net
> >> https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users
> >> http://perl-win32-gui.sourceforge.net/
> >
> > _________________________________________________________________
> > Get a birdís eye view of the world with Multimap
> > http://clk.atdmt.com/GBL/go/115454059/direct/01/
> --
> *{] Ashrien [}*
>


Great search results, great prizes. BigSnapSearch.com Search now