Dialog operation

Windows dialog boxes according to their relationship with the parent window, divided into two categories:

1.modal dialog box, so that in addition to the parent window until the end of the dialog box

2.modeless dialog, co-operation with its parent window

 

In order to do a dialog box, the programmer must:

 

1. The dialog box template (dialog template). This is the appearance of a dialog defined in RC files in various ways to determine the size of the dialog box, shape, internal controls, location and so on.

2. Dialog function (dialog message). It is similar to the window function, and usually processes WM_INITDLALOG WM_COMMAND two messages. The controls in the dialog box are also small windows, each with its own window function, they communicate the message to its managers (ie the parent window box). All the components of the control messages are transmitted WM_COMMAND, then by the control assembly and the parameters which distinguish which advertisement. Activation and end Model dialog box, by the DialogBox Dialog and two API functions

                                       

 DEF file (module definition files): Windows program requires a module definition file, the memory characteristic module name, procedure section and information section area of the district,
block stacking ( heap ) the size of the stack ( Stack ) size, all the callback function names .. . , and so on down the registration


Resource description file ( .RC )
RC file is place a text description of the resource. Commonly used resources as much as nine, respectively, ICON , CURSOR ,
BITMAP , FONT , DIALOG , the MENU , ACCELERATOR , STRING , the VERSIONINFO . Also
there may be constantly adding new resources, such as Visual C ++ 4.0 on more than called TOOLBAR resources. This is
some text description subject to RC compiler, it generates a binary code that can be used. 


 

Guess you like

Origin www.cnblogs.com/liu6666/p/12594322.html