|
|
|
date: Wed, 16 Jul 2008 16:18:01 -0700,
group: microsoft.public.platformsdk.shell
back
Icon Control in Dialogbox template
I am creating dialogbox in resource file.
In the book by Charles Petzold, "Programmin Windows", it says that
dialogbox can have control type "ICON", its class is static, window style is
SS_ICON.
Example is
ICON "generic", IDC_ICON, 20,20
or
ICON "generic", IDC_ICON, 20,20,40,40,SS_ICON
as shown below
AC1LESS DIALOGEX 600, 0, 96, 299
STYLE DS_SETFONT | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
FONT 8, "MS Sans Serif", 0, 0, 0x1
BEGIN
ICON "generic", IDC_ICON, 20,20
PUSHBUTTON "OK",IDOK,5,284,24,11,BS_CENTER | WS_GROUP
END
When I implement this in my code it does not compile.
Is this form obsolete, or out of date ?
Is there a latest information about inserting icon in the dialogbox?
I am using C/C++ language on WindowsXP platform
Thank you,
ChangChiTheGraphics
date: Wed, 16 Jul 2008 16:18:01 -0700
author: ChangChiTheGraphics
Re: Icon Control in Dialogbox template
ChangChiTheGraphics wrote:
> AC1LESS DIALOGEX 600, 0, 96, 299
> STYLE DS_SETFONT | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
> FONT 8, "MS Sans Serif", 0, 0, 0x1
> BEGIN
> ICON "generic", IDC_ICON, 20,20
Despite the syntax given in the documentation, it seems that the width and height values are in fact not optional. So at a minimum you would have to write:
ICON "generic", IDC_ICON, 20,20,0,0
--
Jim Barry, MVP (Windows SDK)
date: Sat, 19 Jul 2008 16:18:34 +0100
author: Jim Barry
|
|