well lets start with the obvious. the identifier for the resource is assigned by VS when you add the dialog. If you go to resource view and right click the dialog then select properties one of the items in the window (near the bottom) will be the identifier.
This number isnt arbitrary. The value used on the resource (the dialog itself) and the value used in the call to DialogBox MUST be the same.
The best thing for you to try now would be a call to GetLastError. heres what you should do
SetLastError(0);
DialogBox(...);
GetLastError();
obviously place in your code. you can place the value in a string and MsgBox it. Once you have that value click on tools->Error lookup and place the value in. It will give you a descriptive message (allbeit cryptic sometimes) of what went wrong.
Let me know what value you get and we'll go from there.
P.S check your dialog proc remember you MUST return TRUE to the WM_INITDIALOG message of the dialog isnt created and DialogBox fails (similar to WM_CREATE for a window).