hey fellows, please don't think i'm lazy or something, i check several resource coding references, iczelions tuts and a whole bunch of source codes, but i can't find a way to place an icon via a resource file into a certain place in a dialog box may be you guys have an idea, i'm a totally newbie
Posted on 2001-03-26 23:09:00 by Typhoon
Typhoon, define a static control and use the following function to fill it.
	
invoke SendDlgItemMessage, hDlgWin, IDS_STATIC,\
	STM_SETIMAGE, IMAGE_ICON, IconHandle

hth vesa
Posted on 2001-03-26 23:22:00 by vesa
Sorry vesa i don't get it, could you explain it to me in detail ?
Posted on 2001-03-26 23:25:00 by Typhoon
What i actually mean is, in the resource file you have the line that looks like that: ICON "warning",-1,10,20,0,0,"warning.ico" but it doesn't work that way i just wanna know how i get the icon in my dialog via that icon control if my icon is a single file
Posted on 2001-03-26 23:29:00 by Typhoon
I got it figured out vesa, so i did following in my resource file: #define ICON_WARNING 3004 ICON_WARNING ICON "mainicon.ico" to show it: CONTROL ICON_WARNING, -1, "static", SS_ICON | WS_CHILD | WS_VISIBLE, 4, 4, 0, 0 am i right or is there a better way ? thanks anyways Regards Typhoon
Posted on 2001-03-26 23:54:00 by Typhoon
oops This message was edited by smurf, on 3/27/2001 4:22:40 AM
Posted on 2001-03-27 03:20:00 by smurf
Typhoon, I meant you have in your resource file the following
   
#define	IDI_ICON 	    1
#define SS_ICON 	    3

IDI_ICON ICON "nn.ico"

CONTROL	    "", 110, "static", SS_ICON, 22, 140, 32, 32
In your code you can fill the slot with your icon using the function SendDlgItemMessage. hth vesa
Posted on 2001-03-27 05:46:00 by vesa