Page 60 - DCAP408_WEB_PROGRAMMING
P. 60

Windows Programming




                    Notes
                                          Example: Examples would be WM_CLOSE or WM_ACTIVATE.
                                   The wParam and lParam arguments can be supplementary (Win32) messages.

                                   The WinExec() function is used to execute an application. Its syntax is:
                                   UINT  WinExec(LPCSTR  lpCmdLine,  UINT  uCmdShow);
                                   The lpCmdLine argument states the name or path of the application you want to exhibit. The
                                   uCmdShow states how the application should be exhibited. It utilizes the same values as the
                                   CWnd::ShowWindow() member function.

                                   Practical Learning: Using Buttons

                                   1.  To generate a new application, on the main menu, click File -> New Project...
                                   2.  Click MFC Application and set the name to AppLauncher1
                                   3.  Click OK

                                   4.  In the first page of the MFC Application Wizard, click Next
                                   5.  In the second page, click Dialog Based
                                   6.  Click Next
                                   7.  In the third page, set the Title Name to Application Launcher

                                   8.  Click Next
                                   9.  Click Finish
                                   10.  On the dialog, click the TODO line and press Delete
                                   11.  As the OK button is selected, press Delete

                                   12.  As the Cancel button is selected, press Delete
                                   13.  In the Toolbox, click the Button control    and click the lower section of the dialog box


































          54                                LOVELY PROFESSIONAL UNIVERSITY
   55   56   57   58   59   60   61   62   63   64   65