messagebox function not working

Started by
11 comments, last by Alex Swinney 19 years, 5 months ago
its not working

//my first windows program

#define WIN32_LEAN_AND_MEAN

#include <windows.h>
#include <windowsx.h>

//Winmain
int WINAPI WinMain(HINSTANCE hinstance,
				   HINSTANCE hprevinstance,
				   LPATR lpcmdline,
				   int ncmshow)
{
	//make a message box
	MessageBox(NULL, "My power is great",
					 "my first program",
					 MB_OK | MB_ICONEXXLAMATION);
	//end program!!
	return 0;
}
errors:
c:\Documents and Settings\matt\My Documents\Visual Studio Projects\gs\op.cpp(11) : error C2061: syntax error : identifier 'LPATR'
c:\Documents and Settings\matt\My Documents\Visual Studio Projects\gs\op.cpp(13) : error C2731: 'WinMain' : function cannot be overloaded
        c:\Documents and Settings\matt\My Documents\Visual Studio Projects\gs\op.cpp(9) : see declaration of 'WinMain'
c:\Documents and Settings\matt\My Documents\Visual Studio Projects\gs\op.cpp(17) : error C2065: 'MB_ICONEXXLAMATION' : undeclared identifie

-----------------------------------Panic and anxiety Disorder HQ
Advertisement
Looks like you've got some basic spelling mistakes: LPATR should probably be LPSTR and MB_ICONEXXLAMATION should probably be MB_ICONEXCLAMATION.
it got rid of those three errors but now its saying cannot open file 'd3d9.lib'
-----------------------------------Panic and anxiety Disorder HQ
Looks like it's still not finding all those library files..

Are you using VC++ 6.0 or 7.0?
I WISH SOMEONE WOULD FIX THE DAMNED LOGIN!
Quote:Original post by Alex Swinney
Looks like it's still not finding all those library files..

Are you using VC++ 6.0 or 7.0?

vc++7.0
-----------------------------------Panic and anxiety Disorder HQ
Quote:Original post by hothead
Quote:Original post by Alex Swinney
Looks like it's still not finding all those library files..

Are you using VC++ 6.0 or 7.0?

vc++7.0


Ok..

1) Goto Tools menu, click on Options.
2) Under the options dialog box, click on projects folder
3) Once there, click on VC++ Directories
4) Tell me all the directories that are listed on the right side (verbatim)

[EDIT]
You should have these listed: (where C: is your local hard drive)

C:\DXSDK\Lib
$(VCInstallDir)\lib
$(VCInstallDir)atlmfc\lib
$(VCInstallDir)PlatformSDK\lib\prerelease
$(FrameworkSDKDir)lib
[/EDIT]
I WISH SOMEONE WOULD FIX THE DAMNED LOGIN!
okay heres the stuff that I put in there
C:\DXSDK\lib
-----------------------------------Panic and anxiety Disorder HQ
Quote:Original post by Alex Swinney
Quote:Original post by hothead
Quote:Original post by Alex Swinney
Looks like it's still not finding all those library files..

Are you using VC++ 6.0 or 7.0?

vc++7.0


Ok..

1) Goto Tools menu, click on Options.
2) Under the options dialog box, click on projects folder
3) Once there, click on VC++ Directories
4) Tell me all the directories that are listed on the right side (verbatim)

[EDIT]
You should have these listed: (where C: is your local hard drive)

C:\DXSDK\Lib
$(VCInstallDir)\lib
$(VCInstallDir)atlmfc\lib
$(VCInstallDir)PlatformSDK\lib\prerelease
$(FrameworkSDKDir)lib
[/EDIT]

yeah it has those
-----------------------------------Panic and anxiety Disorder HQ
Were they placed under 'Library Files'?

Here's a picture of what I mean, where the red arrow shows the types of files..

http://home.comcast.net/~aswinney14/lib.jpg
I WISH SOMEONE WOULD FIX THE DAMNED LOGIN!
Quote:Original post by Alex Swinney
Were they placed under 'Library Files'?

Here's a picture of what I mean, where the red arrow shows the types of files..

http://home.comcast.net/~aswinney14/lib.jpg

no were they supposed to be?Because I put them under executables.
-----------------------------------Panic and anxiety Disorder HQ

This topic is closed to new replies.

Advertisement