comdlg32: Replaced file dialog house icon with the shell icon for desktop.
This commit is contained in:
parent
d222e8edf1
commit
ee09534c27
Binary file not shown.
Before Width: | Height: | Size: 1.3 KiB |
|
@ -71,9 +71,6 @@ PD32_PORTRAIT ICON pd32_portrait.ico
|
||||||
/* @makedep: pd32_landscape.ico */
|
/* @makedep: pd32_landscape.ico */
|
||||||
PD32_LANDSCAPE ICON pd32_landscape.ico
|
PD32_LANDSCAPE ICON pd32_landscape.ico
|
||||||
|
|
||||||
/* @makedep: 800.bmp */
|
|
||||||
800 BITMAP DISCARDABLE LOADONCALL "800.bmp"
|
|
||||||
|
|
||||||
/* @makedep: folder.ico */
|
/* @makedep: folder.ico */
|
||||||
FOLDER ICON folder.ico
|
FOLDER ICON folder.ico
|
||||||
|
|
||||||
|
|
|
@ -1320,15 +1320,16 @@ static LRESULT FILEDLG95_InitControls(HWND hwnd)
|
||||||
{VIEW_LIST, FCIDM_TB_SMALLICON, TBSTATE_ENABLED, BTNS_BUTTON, {0, 0}, 0, 0 },
|
{VIEW_LIST, FCIDM_TB_SMALLICON, TBSTATE_ENABLED, BTNS_BUTTON, {0, 0}, 0, 0 },
|
||||||
{VIEW_DETAILS, FCIDM_TB_REPORTVIEW, TBSTATE_ENABLED, BTNS_BUTTON, {0, 0}, 0, 0 },
|
{VIEW_DETAILS, FCIDM_TB_REPORTVIEW, TBSTATE_ENABLED, BTNS_BUTTON, {0, 0}, 0, 0 },
|
||||||
};
|
};
|
||||||
TBADDBITMAP tba[2];
|
static const TBADDBITMAP tba = {HINST_COMMCTRL, IDB_VIEW_SMALL_COLOR};
|
||||||
|
|
||||||
RECT rectTB;
|
RECT rectTB;
|
||||||
RECT rectlook;
|
RECT rectlook;
|
||||||
FileOpenDlgInfos *fodInfos = GetPropA(hwnd,FileOpenDlgInfosStr);
|
|
||||||
|
|
||||||
tba[0].hInst = HINST_COMMCTRL;
|
HIMAGELIST toolbarImageList;
|
||||||
tba[0].nID = IDB_VIEW_SMALL_COLOR;
|
SHFILEINFOA shFileInfo;
|
||||||
tba[1].hInst = COMDLG32_hInstance;
|
ITEMIDLIST *desktopPidl;
|
||||||
tba[1].nID = 800;
|
|
||||||
|
FileOpenDlgInfos *fodInfos = GetPropA(hwnd,FileOpenDlgInfosStr);
|
||||||
|
|
||||||
TRACE("%p\n", fodInfos);
|
TRACE("%p\n", fodInfos);
|
||||||
|
|
||||||
|
@ -1378,9 +1379,19 @@ static LRESULT FILEDLG95_InitControls(HWND hwnd)
|
||||||
/* FIXME: use TB_LOADIMAGES when implemented */
|
/* FIXME: use TB_LOADIMAGES when implemented */
|
||||||
/* SendMessageW(fodInfos->DlgInfos.hwndTB, TB_LOADIMAGES, IDB_VIEW_SMALL_COLOR, HINST_COMMCTRL);*/
|
/* SendMessageW(fodInfos->DlgInfos.hwndTB, TB_LOADIMAGES, IDB_VIEW_SMALL_COLOR, HINST_COMMCTRL);*/
|
||||||
SendMessageW(fodInfos->DlgInfos.hwndTB, TB_SETMAXTEXTROWS, 0, 0);
|
SendMessageW(fodInfos->DlgInfos.hwndTB, TB_SETMAXTEXTROWS, 0, 0);
|
||||||
SendMessageW(fodInfos->DlgInfos.hwndTB, TB_ADDBITMAP, 12, (LPARAM) &tba[0]);
|
SendMessageW(fodInfos->DlgInfos.hwndTB, TB_ADDBITMAP, 12, (LPARAM) &tba);
|
||||||
SendMessageW(fodInfos->DlgInfos.hwndTB, TB_ADDBITMAP, 1, (LPARAM) &tba[1]);
|
|
||||||
|
|
||||||
|
/* Retrieve and add desktop icon to the toolbar */
|
||||||
|
toolbarImageList = (HIMAGELIST)SendMessageW(fodInfos->DlgInfos.hwndTB, TB_GETIMAGELIST, 0, 0L);
|
||||||
|
SHGetSpecialFolderLocation(hwnd, CSIDL_DESKTOP, &desktopPidl);
|
||||||
|
SHGetFileInfoA((LPCSTR)desktopPidl, 0, &shFileInfo, sizeof(shFileInfo),
|
||||||
|
SHGFI_PIDL | SHGFI_ICON | SHGFI_SMALLICON);
|
||||||
|
ImageList_AddIcon(toolbarImageList, shFileInfo.hIcon);
|
||||||
|
|
||||||
|
DestroyIcon(shFileInfo.hIcon);
|
||||||
|
CoTaskMemFree(desktopPidl);
|
||||||
|
|
||||||
|
/* Finish Toolbar Construction */
|
||||||
SendMessageW(fodInfos->DlgInfos.hwndTB, TB_ADDBUTTONSW, 9, (LPARAM) tbb);
|
SendMessageW(fodInfos->DlgInfos.hwndTB, TB_ADDBUTTONSW, 9, (LPARAM) tbb);
|
||||||
SendMessageW(fodInfos->DlgInfos.hwndTB, TB_AUTOSIZE, 0, 0);
|
SendMessageW(fodInfos->DlgInfos.hwndTB, TB_AUTOSIZE, 0, 0);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue