Page 164 - DCAP408_WEB_PROGRAMMING
P. 164

Windows Programming




                    Notes             The LoginChildWindow inherits from System.Windows.Controls.ChildWindow so you
                                       must add that as a reference

                                      A child window has the WS_CHILD style and is confined to the client area of its parent
                                       window.
                                      An application can change the parent window of an existing child window by calling the
                                       SetParent function.
                                      The system passes  a child window’s input messages directly to the child window; the
                                       messages are not passed through the parent window.

                                      A notification message includes the control’s child window identifier, which the parent
                                       uses to identify which control sent the message.
                                      Using a layered window can significantly improve performance and visual effects for a
                                       window that has a complex shape, animates its shape, or wishes to use alpha blending
                                       effects.

                                      A window that suddenly appears (pops up) when you select an option with a mouse or
                                       press a special function key is called a pop-up window.

                                   9.6 Keywords


                                   Child Window: A child window has the WS_CHILD style and is confined to the client area of its
                                   parent window.
                                   Notification Message: A notification message includes the control’s child window identifier,
                                   which the parent uses to identify which control sent the message.
                                   Pop-up Window: A window that suddenly appears (pops up) when you select an option with a
                                   mouse or press a special function key is called a pop-up window.

                                   XWindow:  xWindow  helps to  maintain child  (popup)  windows, especially  when you  need
                                   multiple child windows and each window needs different features.

                                   9.7 Review Questions

                                   1.  What do you mean by ‘Child windows’? Illustrate its uses.

                                   2.  Can a child window be visible out of the parent’s client area? Enlighten.
                                   3.  What will happen to the child Windows, if their parent is destroyed?
                                   4.  Illustrate the concept of fixed child windows.

                                   5.  What do you mean by Popup Window? Explain.
                                   6.  Which window style is used to create a popup window? Illustrate.
                                   7.  Where should the message be passed if it is not processed by the message processing logic
                                       in a message function for a child or a popup window?
                                   8.  What do you know about WM_USER message?
                                   9.  Why we use the Get Parent () function? Explain.
                                   10.  Illustrate the steps to create a child window with example.








          158                               LOVELY PROFESSIONAL UNIVERSITY
   159   160   161   162   163   164   165   166   167   168   169