Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS Tech Support » System font problem! Collapse All
Subject Author Date
Bangjun Lei Jan 19, 2008 - 4:17 AM

Dear Sir./Madam.,

I successfully used your system to develope my software. The developed software works pretty good on my computer (English WinXP). However, when I bring my software to some other systems for example a Chinese WinXP. It turns out the font becomes bigger and therefore quite some of my CExtLabel objects are not displayed correctly (the texts simply run out of the boundary and therefore the ends are not displayed).

Do you have any solutions for this? I noticed in your FunnyBar example when you change the font all controls can automatically resize to adjust automatically with the font size change. Can you show me how I can achieve this step by step ?

Thanks very much!

Technical Support Jan 19, 2008 - 12:13 PM

Menus, toolbars and menu bar windows automatically compute their layouts. These windows are designed to have computable on-the-fly sizes even without ability to specify their initial or persistent sizes. The dialog child controls are created using preliminary known sizes in DLUs (dialog units dependent on the font property of the dialog template resource). If you create two versions of some dialog template resource for two different languages (English and Chinese) and specified different texts and sizes for labels on the dialog form, then you will see the correctly displayed dialog in both languages. If you are talking about one label control with some initially set English text and sizes and then you assign Chinese text to it using CWnd::SetWindowText() MFC API or ::SetWindowText() Win32 API, then you are also responsible to resize this label window for making it displaying the new text correctly.