Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Windows font size change resize dialog box

Status
Not open for further replies.

tonywebb

Programmer
Jul 17, 2000
1
GB
I have a number of picture controls holding bitmaps on a dialog box, around the picture controls are button controls. When the user changes the font size in windows from the Display Properties window, changing from Small to Large font the dialog box grows, this happens even when no text is used in the dialog box! The buttons are also resized to hold the new font size, this moves them in relation to the bitmaps. Is it possible to force a dialog box to a set size in pixels, or at runtime change the point size of the font used by the buttons? <br><br>Thanks Tony
 
Dear Tony,<br><br>&gt; Is it possible to force a dialog box to a set size in pixels<br><br>Look at CWnd::MoveWindow() and CWnd::SetWindowPos() to start with. You might also want to read up on 'Dialog Units' which is how dialogs deal in 'size'. There may be some issues there that will effect your specific problem/solution.<br><br>&gt; at runtime change the point size of the font used by the buttons? <br><br>Yes you can change the font in any window. Using MFC it is the CWnd::SetFont() member function that will do this.<br><br>-pete
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top