My program fails the DialogBoxParam call with ERROR_RESOURCE_NAME_NOT_FOUND.

Would someone be so kind as to help me sort out what's wrong?.

RadASM project attached.
Posted on 2003-07-22 16:13:06 by peanut
BTW peanut,

You must include the dlg's rc file AFTER the menu's rc file i.e.

#include <Res\mainMnu.rc>
#include <Res\mainDlg.rc>

Also you are using a ListView which is a Common Control, it is good practice to InitCommonCtrls >
include Comctl32.inc

includelib Comctl32.lib

icc QWORD 03FFF00000008h

invoke InitCommonControlsEx,OFFSET icc
Posted on 2003-07-22 16:38:54 by donkey
Thanks donkey

I had no idea the menu rc had to come first (obviously).

And i did forget the InitCommonCtrls.
Posted on 2003-07-22 17:26:45 by peanut
Hi peanut,

You have a dependancy chain. You are using an equate in the Dialog RC that is defined in the Menu.RC so it has to come first. This is normally not a problem unless you enter a Menu Name in the menu dialog (IDR_MENU in your case). If you had just entered 10000 and put 10000 in the menu field of the dialog editor it would probably not have been a problem. Generally I avoid named resources, prefering the numeric only as it has no dependancy chain between resource scripts.
Posted on 2003-07-22 17:35:20 by donkey