Regedit GUI enhancements with new Windows-like icons.

This commit is contained in:
Thomas Weidenmueller 2004-01-20 01:33:02 +00:00 committed by Alexandre Julliard
parent c378ade958
commit a34dc5b53a
5 changed files with 1566 additions and 82 deletions

View file

@ -1,7 +1,10 @@
Makefile
folder1.bmp
folder2.bmp
folder3.bmp
bin.ico
computer.ico
folder.ico
folderopen.ico
regedit.exe.dbg.c
regedit.exe.spec.c
regedit.ico
rsrc.res
string.ico

View file

@ -23,9 +23,12 @@ C_SRCS = \
RC_SRCS = rsrc.rc
RC_BINSRC = resource.rc
RC_BINARIES = \
folder1.bmp \
folder2.bmp \
folder3.bmp
bin.ico \
computer.ico \
folder.ico \
folderopen.ico \
regedit.ico \
string.ico
PLTESTS = \
tests/regedit.pl

View file

@ -31,16 +31,18 @@
#define IDS_LIST_COLUMN_LAST 93
#define IDD_ABOUTBOX 103
#define IDS_APP_TITLE 103
#define IDI_REGEDIT 107
#define IDI_REGEDIT 100
#define IDI_SMALL 108
#define IDC_REGEDIT 109
#define IDC_REGEDIT_FRAME 110
#define IDR_REGEDIT_MENU 130
#define IDD_DIALOG1 131
#define IDB_OPEN_FILE 132
#define IDI_OPEN_FILE 132
#define IDD_DIALOG2 132
#define IDB_CLOSED_FILE 133
#define IDB_ROOT 134
#define IDI_CLOSED_FILE 133
#define IDI_ROOT 134
#define IDI_STRING 135
#define IDI_BIN 136
#define IDR_POPUP_MENUS 137
#define IDC_LICENSE_EDIT 1029
#define ID_REGISTRY_EXIT 32770

File diff suppressed because it is too large Load diff

View file

@ -41,9 +41,9 @@ int Image_Root;
static LPTSTR pathBuffer;
#define CX_BITMAP 16
#define CY_BITMAP 16
#define NUM_BITMAPS 3
#define CX_ICON 16
#define CY_ICON 16
#define NUM_ICONS 3
static BOOL get_item_path(HWND hwndTV, HTREEITEM hItem, HKEY* phKey, LPTSTR* pKeyPath, int* pPathLen, int* pMaxLen)
{
@ -165,28 +165,28 @@ static BOOL InitTreeViewItems(HWND hwndTV, LPTSTR pHostName)
static BOOL InitTreeViewImageLists(HWND hwndTV)
{
HIMAGELIST himl; /* handle to image list */
HBITMAP hbmp; /* handle to bitmap */
HICON hico; /* handle to icon */
/* Create the image list. */
if ((himl = ImageList_Create(CX_BITMAP, CY_BITMAP,
FALSE, NUM_BITMAPS, 0)) == NULL)
if ((himl = ImageList_Create(CX_ICON, CY_ICON,
ILC_MASK, 0, NUM_ICONS)) == NULL)
return FALSE;
/* Add the open file, closed file, and document bitmaps. */
hbmp = LoadBitmap(hInst, MAKEINTRESOURCE(IDB_OPEN_FILE));
Image_Open = ImageList_Add(himl, hbmp, NULL);
DeleteObject(hbmp);
hico = LoadIcon(hInst, MAKEINTRESOURCE(IDI_OPEN_FILE));
Image_Open = ImageList_AddIcon(himl, hico);
hbmp = LoadBitmap(hInst, MAKEINTRESOURCE(IDB_CLOSED_FILE));
Image_Closed = ImageList_Add(himl, hbmp, NULL);
DeleteObject(hbmp);
hico = LoadIcon(hInst, MAKEINTRESOURCE(IDI_CLOSED_FILE));
Image_Closed = ImageList_AddIcon(himl, hico);
hbmp = LoadBitmap(hInst, MAKEINTRESOURCE(IDB_ROOT));
Image_Root = ImageList_Add(himl, hbmp, NULL);
DeleteObject(hbmp);
hico = LoadIcon(hInst, MAKEINTRESOURCE(IDI_ROOT));
Image_Root = ImageList_AddIcon(himl, hico);
/* Fail if not all of the images were added. */
if (ImageList_GetImageCount(himl) < 3) return FALSE;
if (ImageList_GetImageCount(himl) < NUM_ICONS)
{
return FALSE;
}
/* Associate the image list with the tree view control. */
TreeView_SetImageList(hwndTV, himl, TVSIL_NORMAL);