Page 71 - DCAP408_WEB_PROGRAMMING
P. 71
Unit 4: Windows Controls
if( !hWndComboBox ) Notes
{
MessageBox(hWndDlg,
“Could not create the combo box”,
“Failed Control Creation”,
MB_OK);
return FALSE;
}
return TRUE;
case WM_COMMAND:
switch(wParam)
{
case IDCANCEL:
EndDialog(hWndDlg, 0);
}
break;
}
return FALSE;
}
//—————————————————————————————————————
2. Test the application
3. Click the Close button to dismiss it
Self Assessment
Fill in the blanks:
10. If the user doesn’t locate the desired item in the list, he or she can click the ........................
arrow or press Esc.
11. The first argument of the CreateWindow() or the second argument of the ........................
functions must be COMBOBOX passed as a string.
4.8 Scroll Bars
A scroll bar is an object that permits the user to navigate either left and right or up and down,
either on a document or on a section of the window. A scroll bar occurs as a long bar with a
(small) button at each end. Among these buttons, there is a moveable bar known as a thumb. To
scroll, the user can click one of the buttons or grab the thumb and drag it:
LOVELY PROFESSIONAL UNIVERSITY 65