Menu, modal dialog boxes
Sample task
Gradient, clipping using text outline
- Demonstration
- Functionality:
- client area filled using gradient
- clipping region set using text's outline
- allow to resize the window
- menu:
- File\Exit
- Dialogs\Text dialog (Ctrl+T) - open dialog box for setting the text
- Dialogs\Color dialog (Ctrl+C) - open dialog box with gradient's settings
- Technical issues:
- Text dialog
- text box
- 'Font' button - open common font dialog box
- 'OK' button - accept changes
- 'Cancel' button
- Color dialog
- 2 radio buttons - the type of the gradient: vertical or horizontal
- 2 buttons for changing gradient's colors (open common color dialog box)
- bitmaps 16px x 16px on buttons with chosen colors
- buttons 'OK', 'Cancel'
- always initialize dialog boxes with current settings
- additional keyboard shortcuts
- Alt+H - horizontal gradient
- Alt+V - vertical gradient
- IMPORTANT: GradientFill() function must be used
- avoid flickering
- Hints:
- GradientFill
- BeginPath, EndPath
- ChooseColor
- ChooseFont
- DialogBox
- BM_SETIMAGE