Commit b2e7e5c3 authored by Alexandre Julliard's avatar Alexandre Julliard

wordpad: Set the window small icon, and get rid of old icons.

parent 07638618
......@@ -52,14 +52,5 @@ IDB_FORMATBAR BITMAP "formatbar.bmp"
/* @makedep: wordpad.ico */
IDI_WORDPAD ICON "wordpad.ico"
/* @makedep: rtf.ico */
IDI_RTF ICON "rtf.ico"
/* @makedep: wri.ico */
IDI_WRI ICON "wri.ico"
/* @makedep: txt.ico */
IDI_TXT ICON "txt.ico"
/* @makedep: zoom.cur */
IDC_ZOOM CURSOR "zoom.cur"
......@@ -703,17 +703,8 @@ static void preview_exit(HWND hMainWnd)
static void set_fileformat(WPARAM format)
{
HICON hIcon;
HINSTANCE hInstance = GetModuleHandleW(0);
fileFormat = format;
if(format & SF_TEXT)
hIcon = LoadIconW(hInstance, MAKEINTRESOURCEW(IDI_TXT));
else
hIcon = LoadIconW(hInstance, MAKEINTRESOURCEW(IDI_RTF));
SendMessageW(hMainWnd, WM_SETICON, ICON_BIG, (LPARAM)hIcon);
set_bar_states();
set_default_font();
target_device(hMainWnd, wordWrap[reg_formatindex(fileFormat)]);
......@@ -2618,7 +2609,7 @@ int CALLBACK WinMain(HINSTANCE hInstance, HINSTANCE hOldInstance, LPSTR szCmdPar
{
INITCOMMONCONTROLSEX classes = {8, ICC_BAR_CLASSES|ICC_COOL_CLASSES|ICC_USEREX_CLASSES};
HACCEL hAccel;
WNDCLASSW wc;
WNDCLASSEXW wc;
MSG msg;
RECT rc;
UINT_PTR hPrevRulerProc;
......@@ -2638,11 +2629,13 @@ int CALLBACK WinMain(HINSTANCE hInstance, HINSTANCE hOldInstance, LPSTR szCmdPar
wc.cbWndExtra = 4;
wc.hInstance = hInstance;
wc.hIcon = LoadIconW(hInstance, MAKEINTRESOURCEW(IDI_WORDPAD));
wc.hIconSm = LoadImageW(hInstance, MAKEINTRESOURCEW(IDI_WORDPAD), IMAGE_ICON,
GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), LR_SHARED);
wc.hCursor = LoadCursor(NULL, IDC_IBEAM);
wc.hbrBackground = GetSysColorBrush(COLOR_WINDOW);
wc.lpszMenuName = MAKEINTRESOURCEW(IDM_MAINMENU);
wc.lpszClassName = wszMainWndClass;
RegisterClassW(&wc);
RegisterClassExW(&wc);
wc.style = CS_HREDRAW | CS_VREDRAW;
wc.lpfnWndProc = preview_proc;
......@@ -2650,11 +2643,12 @@ int CALLBACK WinMain(HINSTANCE hInstance, HINSTANCE hOldInstance, LPSTR szCmdPar
wc.cbWndExtra = 0;
wc.hInstance = hInstance;
wc.hIcon = NULL;
wc.hIconSm = NULL;
wc.hCursor = LoadCursor(NULL, IDC_IBEAM);
wc.hbrBackground = GetSysColorBrush(COLOR_WINDOW);
wc.lpszMenuName = NULL;
wc.lpszClassName = wszPreviewWndClass;
RegisterClassW(&wc);
RegisterClassExW(&wc);
registry_read_winrect(&rc);
hMainWnd = CreateWindowExW(0, wszMainWndClass, wszAppTitle, WS_CLIPCHILDREN|WS_OVERLAPPEDWINDOW,
......
......@@ -185,11 +185,8 @@
#define IDB_FORMATBAR 101
#define IDI_WORDPAD 102
#define IDI_RTF 103
#define IDI_WRI 104
#define IDI_TXT 105
#define IDC_ZOOM 106
#define IDC_ZOOM 103
#define STRING_ALL_FILES 1400
#define STRING_TEXT_FILES_TXT 1401
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment