Windows Programming--Child windows and child window controls

Source: Internet
Author: User

Directory:

    • The interaction of the child window with the main window
    • child window Controls
    1. Control 1
    2. Control 2

The interaction of the child window with the main window

Create window to: Register window type and create corresponding window instance

1      //Registration Window Type2Wndclass.style = Cs_hredraw |Cs_vredraw;3Wndclass.lpfnwndproc =WndProc;4Wndclass.cbclsextra =0 ;5Wndclass.cbwndextra =0 ;6Wndclass.hinstance =hinstance;7Wndclass.hicon =LoadIcon (NULL, idi_application);8Wndclass.hcursor =loadcursor (NULL, idc_arrow);9Wndclass.hbrbackground =(Hbrush) getstockobject (White_brush);TenWndclass.lpszmenuname =NULL; OneWndclass.lpszclassname =Szappname; A  -      if(! RegisterClass (&wndclass)) -      { theMessageBox (NULL, TEXT ("This program requires Windows nt!"),  - Szappname, mb_iconerror); -           return 0 ; -}
Registration Window Type
1 //Creating a Window instance2hwnd = CreateWindow (Szappname,//window class name3TEXT ("The Hello program"),//Window Caption4Ws_overlappedwindow,//window Style5Cw_usedefault,//Initial x position6Cw_usedefault,//Initial y position7Cw_usedefault,//Initial x Size8Cw_usedefault,//Initial y size9Null//parent Window HandleTenNull//Window menu Handle OneHINSTANCE,//Program Instance handle ANULL);//Creation Parameters -       - ShowWindow (hwnd, icmdshow); theUpdateWindow (HWND);
Creating a Window instance

Windows Programming--Child windows and child window controls

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.