home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS - Coast to Coast / simteldosarchivecoasttocoast2.iso / wpj_mag / wpjv1n4.zip / ROD.ZIP / RODSAPP.C < prev    next >
C/C++ Source or Header  |  1993-01-27  |  2KB  |  68 lines

  1. //*********************************************************
  2. //*
  3. //* rodsapp.c: performs all initialization for first instance
  4. //*           of application.
  5. //*
  6. //*********************************************************
  7.  
  8. #define    NOCOMM
  9. #define    _WINDOWS
  10.  
  11. #include    <windows.h>
  12. #include <stdlib.h>
  13. #include "rodsapp.h"
  14.  
  15. BOOL InitApplication(HANDLE hInstance)
  16. {
  17.     /* local variables */
  18.     static char        szClassName[]= "RODSAPP";
  19.     WNDCLASS            wc;
  20.  
  21.     /* fill in the WNDCLASS structure */
  22.     wc.style=            0;
  23.     wc.lpfnWndProc=    MainWndProc;
  24.     wc.cbClsExtra=        0;
  25.     wc.cbWndExtra=        0;
  26.     wc.hInstance=        hInstance;
  27.     wc.hIcon=            LoadIcon(NULL, IDI_APPLICATION);
  28.     wc.hCursor=            LoadCursor(NULL, IDC_ARROW);
  29.     wc.hbrBackground=    COLOR_WINDOW+1;
  30.     wc.lpszMenuName=    MAKEINTRESOURCE(IDM_RODMENU);
  31.     wc.lpszClassName=    szClassName;
  32.  
  33.     /* register the window class */
  34.     if(!RegisterClass(&wc))
  35.         return(FALSE);
  36.  
  37. } /* InitApplication */
  38.  
  39. //**************************************************************************>
  40.  
  41. BOOL InitInstance(HANDLE hInstance, int nCmdShow)
  42. {
  43.     /* local variables */
  44.     static char    szClassName[]= "RODSAPP";
  45.     HWND    hWnd;
  46.  
  47.     /* create the application main window */
  48.     hWnd= CreateWindow(szClassName,
  49.                                 "DLL Demo",
  50.                                 WS_OVERLAPPEDWINDOW,
  51.                                 CW_USEDEFAULT,
  52.                                 CW_USEDEFAULT,
  53.                                 CW_USEDEFAULT,
  54.                                 CW_USEDEFAULT,
  55.                                 NULL,
  56.                                 NULL,
  57.                                 hInstance,
  58.                                 NULL);
  59.  
  60.     /* draw and show window */
  61.     ShowWindow(hWnd, nCmdShow);
  62.     UpdateWindow(hWnd);
  63.  
  64.     return(TRUE);
  65.  
  66. } /* InitInstance */
  67.  
  68.