Tim Vale <> wrote:
> Can someone please help while I still have hair...
>
> I am trying to build a simple message box with Win32-API...
>
> use Win32::API;
> Win32::API->Import('user32', 'int MessageBox(HWND hwnd, LPCTSTR
> lpText, LPCTSTR lpCaption, UINT uType )'); $test=MessageBox(NULL, 'my
> text', 'test', MB_OK);
>
> ...but it does not like the LPCTSTR construct as it says I attempting
> to modify a read only value.
>
> I do get a box - though an error box - if I substitue LPCTSTR with an
> int.
>
> So Close - yet - So Far.
>
> Has anyone any ideas please?
Not sure if I follow you, but Win32::MsgBox seems to work OK.
use strict;
use warnings;
use Win32;
use constant MB_OK => 0;
Win32::MsgBox "My Message", MB_OK | MB_ICONSTOP, "My Title";
Win32::MsgBox 25, MB_OK | MB_ICONINFORMATION, 34;
HTH
--
Brian Raven
=================================
Atos Euronext Market Solutions Disclaimer
=================================
The information contained in this e-mail is confidential and solely for the
intended addressee(s). Unauthorised reproduction, disclosure, modification,
and/or distribution of this email may be unlawful.
If you have received this email in error, please notify the sender immediately
and delete it from your system. The views expressed in this message do not
necessarily reflect those of Atos Euronext Market Solutions.
L'information contenue dans cet e-mail est confidentielle et uniquement
destinee a la (aux) personnes a laquelle (auxquelle(s)) elle est adressee.
Toute copie, publication ou diffusion de cet email est interdite. Si cet e-mail
vous parvient par erreur, nous vous prions de bien vouloir prevenir
l'expediteur immediatement et d'effacer le e-mail et annexes jointes de votre
systeme. Le contenu de ce message electronique ne represente pas necessairement
la position ou le point de vue d'Atos Euronext Market Solutions.
_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs