Review Questions for GUI class

Class 1

  1. What function does a Windows program start with?
  2. Describe an Event
  3. Describe a Message
  4. What is a message queue?
  5. What is a message loop?
  6. What is a Window Procedure?
  7. What is a Window Class? Give 3 examples
  8. What does the CreateWindow function do?
  9. What does the RegisterClass window do?
  10. What is WM_PAINT? WM_DESTROY?

Class 2

  1. Name at least 3 different window classes
  2. What does MessageBox do?
  3. Given the 'Hello world' program, what portion of the program (in the source code) is is likely to change from one Windows program to another?
  4. Describe each parameter received by a window procedure ('WndProc')
  5. What are IDI_APPLICATION and IDC_ARROW?
  6. What steps are the minimum for handling WM_PAINT?
  7. When creating a child window, how do you specify who it's parent is?
  8. When creating a child window, how do you specify a class (like from #1)?

 Class 3

  1. Describe 3 things needed to be done, to add a menu to a program
  2. How do you enable or disable a menu item?
  3. How do you check or uncheck a menu item?
  4. What is an HMENU
  5. What is SendMessage? What are it's parameters?
  6. What is a 'Device Context'?
  7. What is WM_COMMAND, and what is it's purpose?
  8. Describe the basic process of creating your own Window Class

  Class 4

  1. Name 2 ways commonly used to get an HDC (handle to a Device Context)
  2. What is GDI?
  3. Name at least 3 GDI objects (handles) commonly used with a DC.
  4. What is an enumeration function?
  5. What do CreatePen, and CreateFont do?
  6. What does SelectObject do?
  7. What does DeleteObject do?
  8. Why should you be careful when using the same local variable in a case statements that handle two different window messages?
  9. What is a mapping mode?
  10. What is 'twips' mapping mode? What is a Twip?

   Class 5

  1. What is a notification message?
  2. Describe any 4 notification messages for a specif type of window class.
  3. In the CreateFont function, a font height of -240, might imply what?
  4. What is the 'Font Mapper'?
  5. What, is your favorite color? Blue... no, green! AAARRRGGGHHHH!

   Class 6

  1. What is the difference between a modal and modeless dialog box?
  2. How do you create, and lay-out controls on, a dialog box?
  3. What code is needed to display a Dialog box?
  4. What code is needed to close a dialog box?
  5. How do you determine how a user closed a dialog (ie, OK or Cancel)?
  6. How does the dialog return it's 'close value' to your code?
  7. Do dialog box WndProc functions call DefWindowProc, like normal window procedures?
  8. What is WM_INITDIALOG?
  9. What is GetDlgItem?
  10. How do you pass information to, and get data from, a dialog?

   Class 7

  1. Describe the difference between a memory handle and a pointer
  2. What are the four steps of memory management in Win16
  3. Whats better, using handles: 100 handles to 100 bytes apiece or 10 handles to 1000 bytes apiece?
  4. What functions are new to Win32
  5. Should you use malloc/new and free/delete in Win16?
  6. Should you use malloc/new and free/delete in Win32?
  7. Describe, basically, Virtual Memory.

Sorry... Stuff somewhere between classes 8 and 14

  1. What is the SDK?
  2. What is MFC?
  3. What is AppWizard?
  4. What is ClassWizard?
  5. Describe the purpose of the CDocument class
  6. Describe the purpose of the CView class
  7. What is the difference between CView and CFormView
  8. What is the CDC class?
  9. Name atleast 2 functions in the CDC class
  10. How do you respond to messages and notification commands, using MFC?
  11. What does this mean: //{{ and //}}?
  12. Name and briefly describe the 5 classes created for you by VC++ for an SDI or MDI program.
  13. Name atleast 4 collection classes of MFC
  14. Name and describe atleast 2 functions of those collection classes
  15. What is the Serialize routine?
  16. When is Serialize called?
  17. What is CObject?
  18. Name and describe atleast 3 functions from the CString class
  19. What class helps give access to a database?
  20. What class helps give access to a table (file) in a database?
  21. Describe the purpose of the OnDraw function, and what class it's in.
  22. Describe the purpose of the OnNewDocument function, and what class it's in.
  23. How does a view get a pointer to it's associated document?

 

    Class 15

  1. What is a CDialog?
  2. Name 2 functions of the CDialog class
  3. What does UpdateData do?
  4. How do you add a data member variable and map it to an on-screen control?