Visual C++ and MFC Programming 2nd Edition

(Martin Jones) #1

Chapter 15: Fundamental Controls Visual C++ and MFC Fundamentals


}
else if( pScrollBar->GetDlgCtrlID() == 42 )
{
font.CreatePointFont(180, "Wingdings");
m_Country.SetFont(&font);
}

CDialog::OnHScroll(nSBCode, nPos, pScrollBar);
}


  1. Test the application by executing it and trying to click the arrow buttons on the scroll
    bar controls

  2. Close the application and return to MSVC


14.2.2..The Client Area....................................................................................


Besides the identifier, we learned that, to create a control, you must provide it with
“physical” presence. If you add the control visually, it assumes the position where you
place it. If you are programmatically creating the control, you must know how much
space its parent window is making available to its children before even deciding about its
location and dimensions.

To provide its parental support to the child controls, the parent window allocates an
amount of space in a rectangular shape called the client area:
Free download pdf