Advertisement

message box

Started by November 11, 2000 12:22 PM
11 comments, last by pizzaman 24 years, 2 months ago
quote: Original post by pizzaman

im sorry i didnt mean to jump on you like that, but how is he right i dont really understand. i think i do have an int main and i dont make a console application. i can get it to work now though. thanks for your help guys


Ofcourse he''s right! You don''t have an int main, you have an int WINAPI WinMain. They''re two totally different things!! And it was a console application, because the linker coudn''t find the main function!!
One thing to watch is not to program functions into winmain because when I started, I didn''t realized winMain was a function and it wouldn''t compile "Local function definitions are illegal" doh!
Peon
Advertisement
Actually, you don't even need to call WinMain, at least if you're using MingW32, which is what I use (w/bloodshed's ide)

This works fine with that:
#include void main(){MessageBox(NULL, "...Caption Goes -->HERE<--", "Title goes -->HERE<-- and the...", MB_OK + MB_ICONEXCLAMATION);}     


Also, I've noticed that most references tell you to bitwise OR ("|") the last parameters together, but MingW32 lets you simply add them, which seems a little more readable, to me, anyways... I wonder if this is just for this compiler, or is it standard... does anyone know?

Edited by - cliffhawkens on November 23, 2000 2:50:37 AM
[email=erydo@gdnmail.net" style="color: #ff0000; text-decoration:none; cursor:help;](o= erydo =o)[/email]

This topic is closed to new replies.

Advertisement