Hi all,
While getting ready for the upcoming Xmas holidays ....

I am writing an application that collects video from network cameras and 
displays the content via a "Graphic" control, I would also like to display 
additional information over the images (i.e. Date and Time etc. etc.).
To achieve my goal I am using a second overlayed "Graphic" control with 
transparent background on which I write the needed information via:

<snippet>
    if(defined $$refGUIObj){
        my $DC = $$refGUIObj->GetDC();
        # Write text trasparently
        $DC->BkMode($Transparent);
        $DC->SelectObject(new Win32::GUI::Font(
                            -name => $Font,
                            -size => $FontSize,
                            -bold => 0,
                          )
        );
        $DC->BackColor(0);
        $DC->TextColor($FgColor);
        $DC->TextOut($X, $Y, $Text);
        $DC->Validate();
    }
</snippet>

Unfortunately every new instance overwrites the previous "TextOut". I have 
attempted to handle it inside the Paint event via:

<snippet>
        my $clip_rgn = Win32::GUI::Region->CreateRectRgn( $l, $t, $r, $b );
        $dc->SelectClipRgn($clip_rgn); 
</snippet>

But only to obtain a yes redrawn window but with the "default" gray background.

Thank you in advance for any assistance you can offer,

Giuseppe

PS For multiple reasons I cannot write directly on the image, hence the need 
for a transparent "overlay" on which to handle all extra information.  


------------------------------------------------------------------------------
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/

Reply via email to