www.digitalmars.com         C & C++   DMDScript  

c++.windows.32-bits - Loading Icon in windows console

reply "Max Veen" <marove wanadoo.nl> writes:
Hi all,

Is there anybody who knows how to load an Icon in the window title bar
different from the default icon.
I work with the DMC IDDE, and it concerns 32 bit Windows Console
applications.

Help would be greatful,

Max Veen

-- 
Max Veen

Keislagen 96
4823 KM Breda
Tel. 076-5412017
Mar 09 2004
parent Jan Knepper <jan smartsoft.us> writes:
Must be the Dutch... ;-)

MSDN:

WM_SETICON Message

--------------------------------------------------------------------------------

An application sends the WM_SETICON message to associate a new large or 
small icon with a window. The system displays the large icon in the 
ALT+TAB dialog box, and the small icon in the window caption.

Syntax


To send this message, call the SendMessage function as follows.
lResult = SendMessage(      // returns LRESULT in lResult     (HWND) 
hWndControl,      // handle to destination control     (UINT) 
WM_SETICON,      // message ID     (WPARAM) wParam,      // = (WPARAM) 
() wParam;    (LPARAM) lParam      // = (LPARAM) () lParam; );
Parameters

wParam
Specifies the type of icon to be set. This parameter can be one of the 
following values.
ICON_BIG
Set the large icon for the window.
ICON_SMALL
Set the small icon for the window.
lParam
Handle to the new large or small icon. If this parameter is NULL, the 
icon indicated by wParamis removed.
Return Value

The return value is a handle to the previous large or small icon, 
depending on the value of wParam. It is NULL if the window previously 
had no icon of the type indicated by wParam.




Remarks

The DefWindowProc function returns a handle to the previous large or 
small icon associated with the window, depending on the value of wParam.

Message Information

Header Declared in Winuser.h, include Windows.h
Minimum operating systems Included in Windows 95, Windows NT 4.0

See Also

Windows Overview, DefWindowProc, WM_GETICON

Max Veen wrote:
 Hi all,
 
 Is there anybody who knows how to load an Icon in the window title bar
 different from the default icon.
 I work with the DMC IDDE, and it concerns 32 bit Windows Console
 applications.
 
 Help would be greatful,
 
 Max Veen
 
-- ManiaC++ Jan Knepper But as for me and my household, we shall use Mozilla... www.mozilla.org
Mar 09 2004