Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

changing text in a Win32::GUI message box

Status
Not open for further replies.

AMiSM

Technical User
Jan 26, 2006
128
US
I've looked through previous postings, but this exact thing doesn't seem to have come up.
Given this snippet:

use Win32::GUI;
$box = Win32::GUI::MessageBox(undef, "Message", "Title", MB_OK);

...how do I change the text in the box as needed AFTER the box has been created? I'm needing the Win32::GUI equivalent of Tk's $widget->configure(-option=>"value")
 
That seems to follow the MS VB api to MsgBox, and to my knowledge you call it when you need it
Code:
use Win32::GUI;
$box = Win32::GUI::MessageBox(undef, "Message", "Title", MB_OK);
$box = Win32::GUI::MessageBox(undef, "Message2", "Title2", MB_OK);
should cause two message boxes to fire in sequence. No reason you can't write a function to call when you need it
Code:
sub MessageBox {
($msg, $title)=@_;
$box = Win32::GUI::MessageBox(undef, $msg, $title, MB_OK);
}

What I'm saying is, I don't think it's an instance you can reuse

Paul
------------------------------------
Spend an hour a week on CPAN, helps cure all known programming ailments ;-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top