Resources, dialog boxes, controls
Excuse me, Sir, how can I get to Lewisham?
- Demonstration
- The main window:
- in the background: London Underground Plan (the image can be downloaded here)
- the image fits the entire client area
- non-sizeable, non-scrollable
- appropriate menu option opens the modal dialog
- The dialog:
- the dialog displays the zoomed part of the map
- the middle point of the image showed in dialog should be the same as the point behind it on the main window
- the scrollbar on the dialog changes the zoom value (the number of the zoom values
can be limited and small)
- the dialog can be closed with a button which lies on it; the system menu is not available on the dialog
- Technical requirements:
- all drawing should be flicker-free
- all created GDI objects must be deleted
- objects selected as current on DC must not be deleted
- the bitmap should be stored in and taken from the resources
- Hints:
- DialogBox()
- WM_HSCROLL, SetScrollPos(), SetScrollRange(), SB_CTL
- LoadBitmap(), CreateCompatibleDC(), CreateCompatibleBitmap(), BitBlt(), StretchBlt()
- Approximate points:
- displaying the map in the main window 4.0
- dialog box functionality (with displaying the image) 4.0
- zooming the image with the scroll bar 2.0