Krzysztof Mossakowski
Windows Programming
2005 - Tasks
Text drawing
Sample task
Alignment of the text
Demonstration
Działanie programu:
draw rectangle during dragging of the mouse
draw text "I love Windows API" in the rectangle
center it horizontally
center it vertically using otmMacAscent parameter (see the demonstration)
use "Times New Roman" font
dragging started in the window must be able to successfully continue outside the window
store information about drawn rectangle
maximum number of rectangles: 50
right click - remove all rectangles
Hints:
DrawTextEx()
GetOutlineTextMetrics()
SetCapture(), ReleaseCapture()