From eba2c792e9e095941d4960919297eaf2a1d7d574 Mon Sep 17 00:00:00 2001 From: Francois Boisvert Date: Sat, 4 Sep 1999 14:28:49 +0000 Subject: [PATCH] Fixed the height of items in the lookin combobox of the filedlg95. --- dlls/commdlg/cdlg_En.rc | 6 +++--- dlls/commdlg/filedlg95.c | 11 +++++++---- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/dlls/commdlg/cdlg_En.rc b/dlls/commdlg/cdlg_En.rc index 98e19fb111a..5032475db4d 100644 --- a/dlls/commdlg/cdlg_En.rc +++ b/dlls/commdlg/cdlg_En.rc @@ -249,9 +249,9 @@ FONT 8, "helv" EDITTEXT IDC_FILENAME,54,110,158,15,ES_AUTOHSCROLL LTEXT "File &name:",IDC_FILENAMESTATIC,3,111,36,10 LTEXT "Files of &type",IDC_FILETYPESTATIC,3,128,41,10 - LTEXT "", IDC_SHELLSTATIC,3,21,273,84,SS_SUNKEN | NOT WS_VISIBLE | NOT WS_GROUP |WS_EX_TRANSPARENT + LTEXT "", IDC_SHELLSTATIC,3,21,273,84,SS_SUNKEN | NOT WS_VISIBLE | NOT WS_GROUP |WS_EX_TRANSPARENT | WS_TABSTOP LTEXT "Look &in",IDC_LOOKINSTATIC,3,5,29,10 - COMBOBOX IDC_LOOKIN,50,1,137,93,CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_LOOKIN,50,1,137,55,CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP PUSHBUTTON "Up",IDC_UPFOLDER,194,1,15,15,BS_ICON | BS_CENTER | BS_VCENTER PUSHBUTTON "New",IDC_NEWFOLDER,213,1,15,15,BS_ICON | BS_CENTER | BS_VCENTER CONTROL "I",IDC_LIST,"Button",BS_AUTORADIOBUTTON | BS_ICON | BS_CENTER | BS_VCENTER | BS_PUSHLIKE,233,1,15,15 @@ -274,7 +274,7 @@ FONT 8, "helv" LTEXT "Save as &type",IDC_FILETYPESTATIC,3,128,41,10 LTEXT "", IDC_SHELLSTATIC,3,21,273,84,SS_SUNKEN | NOT WS_VISIBLE | NOT WS_GROUP |WS_EX_TRANSPARENT LTEXT "Save &in",IDC_LOOKINSTATIC,3,5,29,10 - COMBOBOX IDC_LOOKIN,50,1,137,93,CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_LOOKIN,50,1,137,55,CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP PUSHBUTTON "Up",IDC_UPFOLDER,194,1,15,15,BS_ICON | BS_CENTER | BS_VCENTER PUSHBUTTON "New",IDC_NEWFOLDER,213,1,15,15,BS_ICON | BS_CENTER | BS_VCENTER CONTROL "I",IDC_LIST,"Button",BS_AUTORADIOBUTTON | BS_ICON | BS_CENTER | BS_VCENTER | BS_PUSHLIKE,233,1,15,15 diff --git a/dlls/commdlg/filedlg95.c b/dlls/commdlg/filedlg95.c index e19c9f31728..19d086d00fb 100644 --- a/dlls/commdlg/filedlg95.c +++ b/dlls/commdlg/filedlg95.c @@ -96,6 +96,8 @@ typedef struct tagLookInInfo SendMessageA(hwnd,CB_GETCOUNT,0,0); #define CBShowDropDown(hwnd,show) \ SendMessageA(hwnd,CB_SHOWDROPDOWN,(WPARAM)show,0); +#define CBSetItemHeight(hwnd,index,height) \ + SendMessageA(hwnd,CB_SETITEMHEIGHT,(WPARAM)index,(LPARAM)height); const char *FileOpenDlgInfosStr = "FileOpenDlgInfos"; /* windows property description string */ @@ -518,12 +520,12 @@ BOOL WINAPI GetFileDialog95W(LPOPENFILENAMEW ofn,UINT iDlgType) if (ofn->lpstrInitialDir) { fodInfos->ofnInfos.lpstrInitialDir = (LPSTR)MemAlloc(lstrlenW(ofn->lpstrInitialDir)+1); - lstrcpyWtoA(fodInfos->ofnInfos.lpstrInitialDir,ofn->lpstrInitialDir); + lstrcpyWtoA((LPSTR)fodInfos->ofnInfos.lpstrInitialDir,ofn->lpstrInitialDir); } if (ofn->lpstrTitle) { fodInfos->ofnInfos.lpstrTitle = (LPSTR)MemAlloc(lstrlenW(ofn->lpstrTitle)+1); - lstrcpyWtoA(fodInfos->ofnInfos.lpstrTitle,ofn->lpstrTitle); + lstrcpyWtoA((LPSTR)fodInfos->ofnInfos.lpstrTitle,ofn->lpstrTitle); } fodInfos->ofnInfos.Flags = ofn->Flags|OFN_WINE|OFN_UNICODE; fodInfos->ofnInfos.nFileOffset = ofn->nFileOffset; @@ -531,14 +533,14 @@ BOOL WINAPI GetFileDialog95W(LPOPENFILENAMEW ofn,UINT iDlgType) if (ofn->lpstrDefExt) { fodInfos->ofnInfos.lpstrDefExt = (LPSTR)MemAlloc(lstrlenW(ofn->lpstrDefExt)+1); - lstrcpyWtoA(fodInfos->ofnInfos.lpstrDefExt,ofn->lpstrDefExt); + lstrcpyWtoA((LPSTR)fodInfos->ofnInfos.lpstrDefExt,ofn->lpstrDefExt); } fodInfos->ofnInfos.lCustData = ofn->lCustData; fodInfos->ofnInfos.lpfnHook = (LPOFNHOOKPROC)ofn->lpfnHook; if (ofn->lpTemplateName) { fodInfos->ofnInfos.lpTemplateName = (LPSTR)MemAlloc(lstrlenW(ofn->lpTemplateName)+1); - lstrcpyWtoA(fodInfos->ofnInfos.lpTemplateName,ofn->lpTemplateName); + lstrcpyWtoA((LPSTR)fodInfos->ofnInfos.lpTemplateName,ofn->lpTemplateName); } /* Initialise the dialog property */ fodInfos->DlgInfos.dwDlgProp = 0; @@ -1453,6 +1455,7 @@ static HRESULT FILEDLG95_LOOKIN_Init(HWND hwndCombo) liInfos->iMaxIndentation = 0; SetPropA(hwndCombo, LookInInfosStr, (HANDLE) liInfos); + CBSetItemHeight(hwndCombo,0,GetSystemMetrics(SM_CYSMICON)); /* Initialise data of Desktop folder */ COMDLG32_SHGetSpecialFolderLocation(0,CSIDL_DESKTOP,&pidlTmp);