SQLtestN: Windows NT-Based GUI Sample

Click to open or copy the files for the SQLtestN sample.

This is a SQL Data Server sample program for use in the Windows NT graphical environment.

Win32 can have several copies of your application running at the same time. The variable hInst keeps track of which instance of the application this is so that processing will be to the correct window.

You only need to initialize the application once. After it is initialized, all other copies of the application will use the same window class, and do not need to be separately initialized.

Main Functions

Function Description
WinMain Calls initialization function, processes message loop.
SqlTestInit Initializes window data and registers window.
SqlTestWndProc Processes messages.
AboutSQL Processes messages for "About" dialog box.
SelectSQL Processes input of author name.
ConnectSQL Processes input of server name and connects to server.

Building SDK Samples

This sample uses the following keywords:

aboutsql; appendmenu; checkforscroll; connectsql; createwindow; dbbind; dbclose; dbcmd; dberrhandle; dbexit; dbfreelogin; dbinit; dblocklib; dblogin; dbmsghandle; dbnextrow; dbopen; dbresults; dbsetluser; dbsetlversion; dbsqlexec; dbunlocklib; dbuse; dbwinerrorhandler; dbwinmessagehandler; defwindowproc; dialogbox; dispatchmessage; enddialog; getclientrect; getdc; getdlgitemtext; getmessage; getparent; getstockobject; getsystemmenu; gettextmetrics; loadcursor; loadicon; localalloc; localfree; messagebox; postmessage; postquitmessage; registerclass; releasedc; scrollwindow; selectsql; senddlgitemmessage; sendmessage; showwindow; sprintf; sqltestinit; sqltestprocessresults; sqltestwndproc; switch; textout; translatemessage; updatewindow; validaterect; winmain