Monday 28 November 2011

What is a static child window in C programming

What is a static child window

A static child window is a window control that does not accept mouse or keyboard input. Typical examples of static child windows are rectangles, frames, a window’s background or border, and static text (labels) that appear on-screen. Typically, it makes no sense to process mouse or keyboard events when dealing with static controls.

A static control can be created by specifying the “static” class in the Windows API CreateWindow() function
call. Here is an example of a field label that is created by invoking the CreateWindow() function: 

hwndNameLabel = CreateWindow (“static”, “Customer Name:”,
WS_CHILD | WS_VISIBLE | SS_LEFT,
0, 0, 0, 0,
hwnd,
50,
hInstance, NULL) ;

This example creates a field label in the window with the caption “Customer Name:.” This field label would probably coincide with a window of the edit class that would accept the user’s input of the customer’s name.
 
Cross Reference:
XXI.28: What is window subclassing?

No comments:

Post a Comment