Make sure that the code.pas file is showing in the code editor. Add the UCase function declaration after the Add declaration.
procedure UCase( wnd : hWnd ) ; export ; {$ifdef WIN32} stdcall ; {$endif}
The UCase function looks like this. Add it after the Add function.
procedure UCase( wnd : hWnd );
var
buff : array[0..256] of char;
begin
if GetApwString( 'str' , buff , 256 , wnd ) = true then
begin
StrUpper( buff );
SetApwString( 'str' , buff , wnd );
end;
end;
This function gets the value of the 'str' variable, converts it to upper case and resets it.
Add UCase to the exports list in the project file, and compile the dll. Start a new APW file and load the UCase function
Function name: UCase
Arguments: word
Returns: void
Add this code to a calc icon:
str := "Hello" UCase( WindowHandle )
Run the file and str will now be equal to "HELLO"
On to: Finding the Authorware window
Back to: The Set and GetApwString functions Start