- move wine includes to precomp.h
[reactos.git] / reactos / dll / win32 / comdlg32 / fontdlg.c
index b6ad99c..73e7945 100644 (file)
  *
  * You should have received a copy of the GNU Lesser General Public
  * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
-#include <ctype.h>
-#include <stdlib.h>
-#include <stdarg.h>
-#include <stdio.h>
-#include <string.h>
-#include "windef.h"
-#include "winbase.h"
-#include "winnls.h"
-#include "wingdi.h"
-#include "winuser.h"
-#include "commdlg.h"
-#include "dlgs.h"
-#include "wine/debug.h"
-#include "cderr.h"
+#include <precomp.h>
 
 WINE_DEFAULT_DEBUG_CHANNEL(commdlg);
 
@@ -428,7 +415,7 @@ static int AddFontSizeToCombo3(HWND hwnd, UINT h, LPCHOOSEFONTW lpcf)
  */
 static int SetFontSizesToCombo3(HWND hwnd, LPCHOOSEFONTW lpcf)
 {
-    static const BYTE sizes[]={8,9,10,11,12,14,16,18,20,22,24,26,28,36,48,72};
+    static const BYTE sizes[]={6,7,8,9,10,11,12,14,16,18,20,22,24,26,28,36,48,72};
     int i;
 
     for (i = 0; i < sizeof(sizes)/sizeof(sizes[0]); i++)
@@ -632,9 +619,9 @@ LRESULT CFn_WMInitDialog(HWND hDlg, WPARAM wParam, LPARAM lParam,
                 memcpy(name, strColorName, sizeof(strColorName));
             }
             j=SendDlgItemMessageW(hDlg, cmb4, CB_ADDSTRING, 0, (LPARAM)name);
-            SendDlgItemMessageW(hDlg, cmb4, CB_SETITEMDATA, j, textcolors[j]);
+            SendDlgItemMessageW(hDlg, cmb4, CB_SETITEMDATA, j, textcolors[i]);
             /* look for a fitting value in color combobox */
-            if (textcolors[j]==lpcf->rgbColors)
+            if (textcolors[i]==lpcf->rgbColors)
                 SendDlgItemMessageW(hDlg,cmb4, CB_SETCURSEL,j,0);
         }
     }
@@ -994,7 +981,7 @@ LRESULT CFn_WMCommand(HWND hDlg, WPARAM wParam, LPARAM lParam,
         {
             WINDOWINFO wininfo;
 
-            lpcf->rgbColors=textcolors[i];
+            lpcf->rgbColors = SendDlgItemMessageW(hDlg, cmb4, CB_GETITEMDATA, i, 0);
             wininfo.cbSize=sizeof(wininfo);
 
             if( GetWindowInfo( GetDlgItem( hDlg, stc5), &wininfo ) )