home *** CD-ROM | disk | FTP | other *** search
/ Borland Programmer's Resource / Borland_Programmers_Resource_CD_1995.iso / fonts / cw_src / altexe / hello.c < prev    next >
Encoding:
C/C++ Source or Header  |  1995-05-19  |  1.3 KB  |  65 lines

  1. #include "c:\windev\include\windows.h"
  2.  
  3. long FAR PASCAL HelloWndProc(HWND, unsigned, WORD, LONG);
  4.  
  5. void FAR PASCAL CyrStart();
  6. void FAR PASCAL CyrStop();
  7.  
  8. extern    int nSwitch;
  9.  
  10. char szAppName[]= "AltKeyb";
  11. int     legal_use= TRUE;
  12.  
  13. HWND    hMainWnd;
  14. HWND    hMainDlg= NULL;
  15. HANDLE    hInst;
  16.  
  17.  
  18. int PASCAL WinMain (hInstance, hPrevInstance, lpszCmdLine, nCmdShow)
  19.     HANDLE hInstance, hPrevInstance;
  20.     LPSTR  lpszCmdLine;
  21.     int    nCmdShow;
  22. {
  23.     HWND        hWnd;
  24.     MSG         msg;
  25.  
  26.     if (hPrevInstance) {
  27.        return FALSE;
  28.     }
  29.  
  30. //    legal_use = TRUE;
  31. //    GetWindowsDirectory ((LPSTR)&legal_use, 2);
  32. //    MessageBox (NULL, (LPSTR) &legal_use, "Drive", NULL);
  33. //      legal_use = Chk();
  34.  
  35.     if (!init(hInstance))
  36.         return FALSE;
  37.  
  38.     hWnd = CreateWindow ((LPSTR) szAppName,
  39.            (LPSTR) szAppName,
  40.            WS_TILEDWINDOW,
  41.            0, 0, 0, 0,
  42.            (HWND)   NULL,
  43.            (HMENU)  NULL,
  44.            (HANDLE) hInstance,
  45.            (LPSTR)  NULL);
  46.  
  47.     hMainWnd= hWnd;
  48.     hInst= hInstance;
  49.  
  50.     SetText();
  51.     CyrStart(hWnd, legal_use, nSwitch);
  52.  
  53.     ShowWindow(hWnd, SW_SHOWMINIMIZED);
  54.  
  55.     while (GetMessage ((LPMSG) &msg, NULL, 0, 0) && !IsDialogMessage(hMainDlg, &msg))
  56.         {
  57.     TranslateMessage (&msg);
  58.         DispatchMessage (&msg);
  59.     }
  60.  
  61.     CyrStop();
  62.  
  63.     return (int) msg.wParam;
  64. }
  65.