Trouble compiling simple program

Hi all, Im having a bit of trouble compiling a simple program (just a window) in visual c++ (the full version, not express). I'm guessing there must be something I need to do or setup to get it working but I just dont see what it is. The same code compiles just fine in codeblocks and visual c++ express. I wanna use visual c++ for the resource editor. Anyone has any idea why this is?

Here's the full code. Its just a message box btw. Thanks.


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#include <windows.h>

INT WINAPI wWinMain(HINSTANCE hInst,
			HINSTANCE hPrevInst,
			LPWSTR lpCmdLine,
			INT nShowCmd)

{
	int nResult=MessageBox(NULL,
			"An example of Cancel,Retry,Continue",
			"Hello Message Box!",
			MB_ICONERROR|MB_ABORTRETRYIGNORE);
	
	switch(nResult)
	{
		case IDABORT:
			// 'Abort' was pressed
			break;
		case IDRETRY:
			// 'Retry' was pressed
			break;
		case IDIGNORE:
			// 'Ignore' was pressed
			break;
	}

	return 0;
}
Dis you create a "Win32 Console Application" project, or a "Win32 Project"? You'll need the latter.
I did choose win32 project. Like I said, Im able to compile the code fine in codeblocks and visual c++ (express edition). For some reason, it just doesnt work in the full version.
Topic archived. No new replies allowed.