Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
platform
active.directory
adsi
adsi.iis-admin
base
com_ole
complus_mts
component_svcs
database
directx
gdi
graphics_mm
internet.client
internet.server
internet.server.isapi-dev
localization
mapi
messaging
msi
mslayerforunicode
multimedia
networking
networking.ipv6
sdk_install
security
shell
telephony.tapi_2
telephony.tapi_3
telephony.tsp
telephony.wte
tools
ui
ui_shell
win_base_svcs
win16
  
 
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

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us