Solutiion: Calling WIN32 API Functions

Solutiion: Calling WIN32 API Functions

Post by Tony Rom » Thu, 07 Dec 2000 13:24:26

Thanks to all the people who responded to my call for help.

When calling the MessageBoxA external function it is important to include
the 4096 style value. This ensures that all other Windows applications are
inaccessible until the message box is displayed and the user responds.

   RETURNS=short ;
   ARG 1 input num  format=pib4. byvalue;
   ARG 2 input char format=$cstr200.;
   ARG 3 input char format=$cstr200.;
   ARG 4 input num  format=pib4. byvalue;

and this SCL code fragment
      text = 'Export schon ge?ffnet';


      rc = MODULEN('*e','MessageBoxA',0,text,'Problem', style);
(code courtesy of Andreas Grueninger)

Tony Romeo

AXA Australia, ISG - Data Services

---------------------- Forwarded by Tony Romeo/MEL/NMLA/NMH on 06/12/2000
02:11 pm ---------------------------

01/12/2000 07:17 pm

Subject:  Calling WIN32 API Functions

I have an SAS/AF application written in Frame/SCL running on Windows 95
which makes use of the WIN32 API function to display a message box (with
the OK and CANCEL buttons).

Under SAS 6.12 the message box would display correctly but under SAS 8.1
the message box is not given the focus (ie. you need to minimize the SAS
application so that the message box becomes visible).

Has anyone had similar problems?

Thanks in advance,

Tony Romeo

AXA Australia, ISG - Data Services

Important Note
This email (including any attachments) contains information which is
confidential and may be subject to legal privilege.  If you are not
the intended recipient you must not use, distribute or copy this
email.  If you have received this email in error please notify the
sender immediately and delete this email. Any views expressed in this
email are not necessarily the views of AXA.   Thank you.