On 7/27/07, Vitaliy Margolen wine-devel@kievinfo.com wrote:
Nigel Liang wrote:
On 7/25/07, Vitaliy Margolen wine-devel@kievinfo.com wrote:
Nigel Liang wrote:
diff --git a/programs/winecfg/En.rc b/programs/winecfg/En.rc index 5972c3b..e61bf29 100644 --- a/programs/winecfg/En.rc +++ b/programs/winecfg/En.rc @@ -200,6 +200,11 @@ BEGIN CONTROL "Link to:",IDC_LINK_SFPATH,"Button",BS_AUTOCHECKBOX|WS_TABSTOP|WS_DISABLED,15,195,50,13 EDITTEXT IDC_EDIT_SFPATH,65,195,145,13,ES_AUTOHSCROLL|WS_TABSTOP|WS_DISABLED PUSHBUTTON "Browse",IDC_BROWSE_SFPATH,215,195,30,13,WS_DISABLED
- GROUPBOX " Menu Font ",IDC_STATIC,8,216,244,50
- LTEXT "Font: ",IDC_STATIC,20,230,40,10
- COMBOBOX IDC_MENUFONT_COMBO,55,228,186,30,CBS_DROPDOWNLIST|CBS_SORT|WS_VSCROLL|WS_TABSTOP
- LTEXT "Size: ",IDC_STATIC,20,249,40,10
- COMBOBOX IDC_MENUFONT_SIZECOMBO,55,247,50,30,CBS_DROPDOWNLIST|WS_VSCROLL|WS_TABSTOP
END
There is already a drop down list where you can select menu and the "Font" button. You should use those instead. Of course you will need to make it work for all other items that might have font as an option (like a caption, window, etc).
The underlying mechanism used to change menu fonts is totally different from the other controls. The whole group of controls grouped within the "Appearance" box is associated with setting color styles with calls to uxtheme.dll functions. The controls that I added with this patch wrote changes into win.ini using the Get/WriteProfileString functions. I think it would confuse people if the two were mixed together....
No, that part of winecfg has nothing to do with theming. Check the underlying code. Also I'm not sure what are you trying to archive with writing to win.ini? Wine reads all the settings from registry, and that's where it should go. Of course for that you should be using appropriate function - SystemParametersInfo.
Vitaliy.
I see what you mean now. The original way of modifying win.ini was taken from various posts on the web suggesting an easy way to adjust menu font size. (http://www.winehq.org/pipermail/wine-users/2004-May/013945.html for instance) Setting it with SystemParametersInfo seems like a much better way to integrate this function in winecfg. I'll make the changes and resubmit.
Thanks! -Nigel