hi, all:


I met a problem: the following is the detail:

During registering the WC struct, I use LoadIcon.

invoke LoadIcon, NULL,IDI_ICON1

IDI_ICON1, I have define in rsrc.rc.

but I found the return value eax is 0, so the ICON can
't display in my window caption.


who can give me a hand,

thinx in advance
Posted on 2002-06-20 20:45:05 by jerrygao2001
    [*]How did you define IDI_ICON1 in your .rc file?
    [*]Is the IDI_ICON1 on your .asm file have the same value declared in your .rc file?
    [*]Did you include the .res file during the linking stage?
Posted on 2002-06-20 21:03:30 by stryker
if the resource compiler doesn't get a line

#define IDI_ICON 101

it will generate an icon resource with string id "IDI_ICON". So check this.
Posted on 2002-06-21 02:41:43 by japheth
Jerry,

I think the problem is that you pass NULL to the first argument of the function...

hInstance
Handle to an instance of the module whose executable file contains the icon to be loaded. This parameter must be NULL when a standard icon is being loaded.


You should rather pass an hInstance variable to it...
Posted on 2002-06-21 02:49:38 by JCP
Umm, I've solved his problem here http://www.asmcommunity.net/board/index.php?topic=6182 :grin:
Posted on 2002-06-21 02:55:33 by stryker
Here we see the need for explicit topics name. :tongue:
Posted on 2002-06-21 03:00:24 by JCP