home *** CD-ROM | disk | FTP | other *** search
- /*Filename: USERSRC.C */
- /*"CHILDWIN" Generated by WindowsMAKER */
- /*Author: Bill G. */
-
- /* Everything generated by WindowsMAKER except these 2 lines */
- /* of comments and 2 lines in the BLD_WM_CREATEMsg function. */
-
- #include <WINDOWS.H>
- #include "CHILDWIN.H"
-
-
- HWND BLD_Child1DlgFunc(hWnd,message,wParam,lParam) /* Startup procedure for modeless dialog box */
- HWND hWnd;
- unsigned message;
- WORD wParam;
- LONG lParam;
- {
-
- message; /* Type of message. */
- wParam; /* 16 bits of message specific information. */
- lParam; /* 32 bits of message specific information. */
-
- if(Child1hDlg)
- {
- SetFocus(Child1hDlg);
- return Child1hDlg;
- }
- Child1lpProc = MakeProcInstance(BLD_Child1DlgProc,hInst);
- Child1hDlg = CreateDialog(hInst, (LPSTR)"CHILDWINDOW1", hWnd, Child1lpProc);
- if (Child1hDlg==0)
- MessageBox(hWnd,"CHILDWINDOW1"," Cannot Create Dialog Box",
- MB_OK | MB_SYSTEMMODAL);
- else
- ShowWindow(Child1hDlg,SW_SHOW);
- return Child1hDlg;
- }
-
- BOOL FAR PASCAL BLD_Child1DlgProc(hDlg, iMessage, wParam, lParam) /* Modeless dialog box procedure */
- HWND hDlg;
- unsigned iMessage;
- WORD wParam;
- LONG lParam;
- {
- lParam; /* 32 bits of message specific information. */
- switch(iMessage)
- {
- case WM_INITDIALOG:
- break;
- case WM_NCDESTROY:
- FreeProcInstance(Child1lpProc);
- Child1hDlg = 0;
- break;
-
- case WM_COMMAND:
- switch(wParam)
- {
- case IDOK:
- DestroyWindow(hDlg);
- break;
- case IDCANCEL:
- DestroyWindow(hDlg);
- break;
- }
- break;
-
- default:
- return FALSE; /* Didn't process the message */
- break;
- }
- return TRUE;
- }
-
-
-
-
-
-
- HWND BLD_Child2DlgFunc(hWnd,message,wParam,lParam) /* Startup procedure for modeless dialog box */
- HWND hWnd;
- unsigned message;
- WORD wParam;
- LONG lParam;
- {
-
- message; /* Type of message. */
- wParam; /* 16 bits of message specific information. */
- lParam; /* 32 bits of message specific information. */
-
- if(Child2hDlg)
- {
- SetFocus(Child2hDlg);
- return Child2hDlg;
- }
- Child2lpProc = MakeProcInstance(BLD_Child2DlgProc,hInst);
- Child2hDlg = CreateDialog(hInst, (LPSTR)"CHILDWINDOW2", hWnd, Child2lpProc);
- if (Child2hDlg==0)
- MessageBox(hWnd,"CHILDWINDOW2"," Cannot Create Dialog Box",
- MB_OK | MB_SYSTEMMODAL);
- else
- ShowWindow(Child2hDlg,SW_SHOW);
- return Child2hDlg;
- }
-
- BOOL FAR PASCAL BLD_Child2DlgProc(hDlg, iMessage, wParam, lParam) /* Modeless dialog box procedure */
- HWND hDlg;
- unsigned iMessage;
- WORD wParam;
- LONG lParam;
- {
- lParam; /* 32 bits of message specific information. */
- switch(iMessage)
- {
- case WM_INITDIALOG:
- break;
- case WM_NCDESTROY:
- FreeProcInstance(Child2lpProc);
- Child2hDlg = 0;
- break;
-
- case WM_COMMAND:
- switch(wParam)
- {
- case IDOK:
- DestroyWindow(hDlg);
- break;
- case IDCANCEL:
- DestroyWindow(hDlg);
- break;
- }
- break;
-
- default:
- return FALSE; /* Didn't process the message */
- break;
- }
- return TRUE;
- }
-
-
-
- long BLD_WM_CREATEMsg(hWnd,message,wParam,lParam) /* Procedure for message processing */
- HWND hWnd;
- unsigned message;
- WORD wParam;
- LONG lParam;
- {
- BLD_Child1DlgFunc(hWnd,message,wParam,lParam); /* This line added manually */
- BLD_Child2DlgFunc(hWnd,message,wParam,lParam); /* This line added manually */
- return DefWindowProc(hWnd, message, wParam, lParam);
- }
-
- int BLD_AboutDlgFunc(hWnd,message,wParam,lParam) /* Startup procedure for modal dialog box */
- HWND hWnd;
- unsigned message;
- WORD wParam;
- LONG lParam;
- {
- FARPROC lpProc;
- int ReturnValue;
-
- message; /* Type of message. */
- wParam; /* 16 bits of message specific information. */
- lParam; /* 32 bits of message specific information. */
-
- lpProc = MakeProcInstance(BLD_AboutDlgProc,hInst);
- ReturnValue = DialogBox(hInst, (LPSTR)"ABOUTCHILDWIN", hWnd, lpProc);
- FreeProcInstance(lpProc);
- if (ReturnValue==-1)
- MessageBox(hWnd,"ABOUTCHILDWIN"," Cannot Create Dialog Box",
- MB_OK | MB_SYSTEMMODAL);
- return ReturnValue;
- }
-
- BOOL FAR PASCAL BLD_AboutDlgProc(hDlg, iMessage, wParam, lParam) /* Modal dialog box procedure */
- HWND hDlg;
- unsigned iMessage;
- WORD wParam;
- LONG lParam;
- {
- lParam; /* 32 bits of message specific information. */
- switch(iMessage)
- {
- case WM_INITDIALOG:
- break;
-
- case WM_COMMAND:
- switch(wParam)
- {
- case IDOK:
- EndDialog(hDlg, IDOK);
- break;
- case IDCANCEL:
- EndDialog(hDlg, IDCANCEL);
- break;
- }
- break;
-
- default:
- return FALSE; /* Didn't process the message */
- break;
- }
- return TRUE;
- }
-
-