Icon for console windows

svn path=/trunk/; revision=7774
This commit is contained in:
Gé van Geldorp 2004-01-19 20:14:28 +00:00
parent 2a9ae29ea6
commit ac9931e8b5
5 changed files with 23 additions and 8 deletions

View file

@ -1,4 +1,4 @@
/* $Id: win32csr.h,v 1.2 2004/01/11 17:31:15 gvg Exp $
/* $Id: win32csr.h,v 1.3 2004/01/19 20:14:28 gvg Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
@ -13,6 +13,7 @@
#include <windows.h>
extern HANDLE Win32CsrApiHeap;
extern HINSTANCE Win32CsrDllHandle;
NTSTATUS FASTCALL Win32CsrInsertObject(PCSRSS_PROCESS_DATA ProcessData,
PHANDLE Handle,

View file

@ -1,4 +1,4 @@
/* $Id: dllmain.c,v 1.3 2004/01/11 17:31:16 gvg Exp $
/* $Id: dllmain.c,v 1.4 2004/01/19 20:14:28 gvg Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
@ -23,6 +23,7 @@ extern VOID STDCALL PrivateCsrssManualGuiCheck(LONG Check);
/* GLOBALS *******************************************************************/
HANDLE Win32CsrApiHeap;
HINSTANCE Win32CsrDllHandle;
static CSRSS_EXPORTED_FUNCS CsrExports;
static CSRSS_API_DEFINITION Win32CsrApiDefinitions[] =
@ -77,6 +78,11 @@ DllMain(HANDLE hDll,
DWORD dwReason,
LPVOID lpReserved)
{
if (DLL_PROCESS_ATTACH == dwReason)
{
Win32CsrDllHandle = hDll;
}
return TRUE;
}

View file

@ -1,4 +1,4 @@
/* $Id: guiconsole.c,v 1.7 2004/01/11 17:31:16 gvg Exp $
/* $Id: guiconsole.c,v 1.8 2004/01/19 20:14:28 gvg Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
@ -682,7 +682,7 @@ GuiInit(VOID)
{
HDESK Desktop;
NTSTATUS Status;
WNDCLASSW wc;
WNDCLASSEXW wc;
Desktop = OpenDesktopW(L"Default", 0, FALSE, GENERIC_ALL);
if (NULL == Desktop)
@ -705,6 +705,7 @@ GuiInit(VOID)
return FALSE;
}
wc.cbSize = sizeof(WNDCLASSEXW);
wc.lpszClassName = L"Win32CsrCreateNotify";
wc.lpfnWndProc = GuiConsoleNotifyWndProc;
wc.style = 0;
@ -715,23 +716,28 @@ GuiInit(VOID)
wc.lpszMenuName = NULL;
wc.cbClsExtra = 0;
wc.cbWndExtra = 0;
if (RegisterClassW(&wc) == 0)
wc.hIconSm = NULL;
if (RegisterClassExW(&wc) == 0)
{
DPRINT1("Failed to register notify wndproc\n");
return FALSE;
}
wc.cbSize = sizeof(WNDCLASSEXW);
wc.lpszClassName = L"Win32CsrConsole";
wc.lpfnWndProc = GuiConsoleWndProc;
wc.style = 0;
wc.hInstance = (HINSTANCE) GetModuleHandleW(NULL);
wc.hIcon = LoadIconW(NULL, (LPCWSTR) IDI_APPLICATION);
wc.hCursor = LoadCursorW(NULL, (LPCWSTR) IDC_ARROW);
wc.hIcon = LoadIconW(Win32CsrDllHandle, MAKEINTRESOURCEW(1));
wc.hCursor = LoadCursorW(NULL, MAKEINTRESOURCEW(IDC_ARROW));
wc.hbrBackground = NULL;
wc.lpszMenuName = NULL;
wc.cbClsExtra = 0;
wc.cbWndExtra = 0;
if (RegisterClassW(&wc) == 0)
wc.hIconSm = LoadImageW(Win32CsrDllHandle, MAKEINTRESOURCEW(1), IMAGE_ICON,
GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON),
LR_SHARED);
if (RegisterClassExW(&wc) == 0)
{
DPRINT1("Failed to register console wndproc\n");
return FALSE;

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

View file

@ -36,3 +36,5 @@ BEGIN
VALUE "Translation", 0x409, 1200
END
END
1 ICON DISCARDABLE res/terminal.ico