Measurement-computing Personal488 rev.3.0 For DOS & Windows 3.Xi Manual de usuario Pagina 241

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 400
  • Tabla de contenidos
  • SOLUCIÓN DE PROBLEMAS
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 240
10E. C Languages II. SOFTWARE GUIDES - 10. Driver488/W31
II-226 Personal488 Users Manual, Rev. 3.0
#include iotmc60w.h
#include stdio.h
/* Global variables */
DevHandleT ieee, adc, devhandle; /* handles for IEEE devices */
char textstr[2048], response[64];
/* strings for Driver488/W31 responses*/
int PASCAL WinMain(HANDLE hInstance, HANDLE hPrevInstance, LPSTR
lpszCmdLine, int nCmdShow)
{
/*******************************************************************/
/* HANDLE hInstance; handle for this instance */
/* HANDLE hPrevInstance; handle for possible previous instances */
/* LPSTR lpszCmdLine; long pointer to exec command line */
/* int nCmdShow; Show code for main window display */
/*******************************************************************/
MSG msg; /* MSG structure to store your messages */
int nRc; /* return value from Register Classes */
strcpy(szAppName, EXAMPLE3");
hInst = hInstance;
if (!hPrevInstance) {
/* register window classes if first instance of application */
if ((nRc = nCwRegisterClasses()) == -1) {
/* registering one of the windows failed */
LoadString(hInst, IDS_ERR_REGISTER_CLASS, szString,
sizeof(szString));
MessageBox(NULL, szString, NULL, MB_ICONEXCLAMATION);
return nRc;
}
}
/* create applications Main window */
hWndMain = CreateWindow(
szAppName /* Window class name */
Driver488/W31 Simple Example, /* Windows title */
WS_CAPTION | /* Title and Min/Max */
WS_SYSMENU | /* Add system menu box */
WS_MINIMIZEBOX | /* Add minimize box */
WS_MAXIMIZEBOX | /* Add maximize box */
WS_THICKFRAME | /* thick sizeable frame */
WS_CLIPCHILDREN | /* dont draw in child windows areas */
WS_OVERLAPPED,
CW_USEDEFAULT, 0, /* Use default X, Y */
CW_USEDEFAULT, 0, /* Use default X, Y */
NULL, /* Parent windows handle */
NULL, /* Default to Class Menu */
hInst, /* Instance of window */
NULL); /* Create struct for WM_CREATE */
if (hWndMain == NULL) {
LoadString(hInst, IDS_ERR_CREATE_WINDOW, szString,
sizeof(szString));
MessageBox(NULL, szString, NULL, MB_ICONEXCLAMATION);
return IDS_ERR_CREATE_WINDOW;
}
ShowWindow(hWndMain, nCmdShow); /* display main window */
while (GetMessage(&msg, NULL, 0, 0)) { /* Until WM_QUIT message */
TranslateMessage(&msg);
DispatchMessage(&msg);
}
Vista de pagina 240
1 2 ... 236 237 238 239 240 241 242 243 244 245 246 ... 399 400

Comentarios a estos manuales

Sin comentarios