I did , but the color text is still disappeared.  


Thanks,


                -----Original Message-----
                From:   Eric Hansen [mailto:[EMAIL PROTECTED]]
                Sent:   Monday, July 19, 1999 10:54 AM
                To:     '[EMAIL PROTECTED]'
                Subject:        RE: [perl-win32-gui] text color

                Give this code a try if you get a chance.

                sub Window_Activate {
                    $W->BeginPaint();
                    $W->SetBKMode(1);
                    GUI::SetTextColor($W,255);
                    $W->TextOut(100,35,"This is a test");
                    $W->EndPaint();
                }

                -----Original Message-----
                From:   Khoa Doan [SMTP:[EMAIL PROTECTED]]
                Sent:   Friday, July 16, 1999 8:40 PM
                To:     '[EMAIL PROTECTED]'
                Subject:        [perl-win32-gui] text color

                I created a DialogBox with a color text.  The problem is
when another window
                (e.g. command prompt shell) covered the DialogBox and is
dragged it out so
                the DialogBox is shown up, the color text is disappeared.
I can only see
                the DiaglogBox with the color text again, if I cover another
window on the
                DialogBox where the color text supposes to be displayed, and
re-click the
                DialogBox.

                Is a way to keep the color text not to be disappeared like
that ?

                Here is my sample code:
                Use Win32::GUI;

                $W = new Win32::GUI::DialogBox(
                    -name   =>   "Window",
                    -left       =>    240,
                    -top       =>    200,
                    -width    =>    500,
                    -height   =>    300,
                );

                $W->Show();

                Win32::GUI::Dialog();

                Sub Window_Resize {
                   Textcolor();
                }

                sub Window_Activate {
                   Textcolor();
                }

                sub Window_Terminate {
                   return -1;
                }

                sub Textcolor {
                    $W->BeginPaint();
                    $W->SetBKMode(1);
                    $W->SetTextColor(0,0,255);
                    $W->TextOut(100,35,"This is a test");
                }

                Thanks,

                Khoa D.

Reply via email to