User Jim O'Brien ( ( posted:

Many moons ago, this posting appeared concerning a modeless dialog box
window with an executable attached to it (sqamessage.exe).

Is this executable useful? If so, if anyone has it available and has a few
minutes, would you mind passing it along in a zip file offline to me at

Greatly greatly appreciated,

Wed, 09 Jun 1999 16:49:29 +1200
Author: Satyanarayana Tota <>
Subject: Re: Modeless Message Display for SQA Robot

Body: Hai Friends,

After seeing this message I wanted to share my experience with you people.

We are using modeless dialog box for displaying messages while Robot is
We also use this for mercury WinRunner with some modofications which is a
different story.

Here with this message I am attaching the executable file (sqamessage.exe)
and .rec file
(sqamsg.rec) how we implemented this. Also global.sbh and global.sbl

Steps to test this utility:

1) Copy the sqamessage.exe file in to "C:\" root directory
2) Copy and paste the contents of global.sbh and global.sbl to your
existing files.
(which will be under directory "sqa61/sqabas32/" )
3) Run the sqamsg.rec file

This sqamsg function also creates a SQAMSGLOG file in "C:\" root
directory, which
contains all the user messages and time sent to the modeless dialog box.

Note: It requires user32.dll on your system.

We are using this on NT and Win 95, but not tested on win 3.11. I think it
may not work on
16 bit ver.

If you got any problems in implementing this, please give me a mail.


Butler, Mark (SysDev) wrote:

'Test Procedure Header File
'Declare Custom Sub Procedures
'Declare functions required for sqamsg sub procedure

Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal
lpClassName As Any, ByVal LpWindowName As String) As Integer
Declare Function SendDlgItemMessage Lib "user32" Alias
"SendDlgItemMessageA" (ByVal hdlg As Integer, ByVal nIDDlgItem As Long,
ByVal msg As Integer, ByVal WPARAM As Any, ByVal LPARAM As String) As Long
Declare Function PostMessage Lib "user32" Alias "PostMessageA" (ByVal hwnd
As Long, ByVal wMsg As Long, ByVal wParam As String, ByVal lParam As Any)
As Long

Const WM_CLOSE = &H10
Const IDC_STATIC = 100
Const WM_SETTEXT = 12

Declare sub sqamsg (msg As String)
Content-Type: text/plain; charset=us-ascii; name="Global.sbl"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; filename="Global.sbl"

'Test Procedure Source File

' sub procedure for displaying message in modeless dialog box

sub sqamsg (msg As String)

Dim Result As Integer
Dim hWindow As Integer
Dim retValue As Long
Dim x As Integer

' Get the window handle of the SQA Box Message

hWindow = FindWindow(0," SQA Box Message")

'Run the sqamessage.exe if it is not opened already
'This if condition will be executed when you run first time

If hWindow = 0 then
hWindow = FindWindow(0," SQA Box Message")

Window SetContext, "Caption= SQA Box Message", ""
Window Click, "", "Coords=194,-14"

Window SetContext, "Caption= SQA Box Message", ""
Window Resize, "", "Coords3,131,375,178"
Window MoveTo, "", "Coords=421,387"
End If

'Open the SQAMSGLOG file in the root C:\ and write text to the file

Open "C:\SQAMSGLOG" For Append As #1
Write #1,msg,Time
Close #1
' Send the message to the Modeless Dialog box

RetValue = SendDlgItemMessage(hWindow,IDC_STATIC,WM_SETTEXT,0 ,msg)

end sub
Content-Type: text/plain; charset=us-ascii; name="Sqamsg.rec"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; filename="Sqamsg.rec"

'$Include: "global.sbh"
'$Include: "global.sbl"

Sub Main
Dim Result As Integer

'Initially Recorded: 05/25/99 14:37:46

Call sqamsg ("Opening the Notepad")

Window SetContext, "Class=Shell_TrayWnd", "Activate=0"
PushButton Click, "ObjectIndex=1"
PopupMenuIDSelect 401

Call sqamsg ("Click Ok button")

Window SetContext, "Caption=Run", ""
InputKeys "notepad"
PushButton Click, "Text=OK"

Call sqamsg ("Closing the Notepad")

Window SetContext, "Caption=Untitled - Notepad", ""
Window CloseWin, "", ""

Call sqamsg ("Completed the test")

End Sub