By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,189 Members | 903 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,189 IT Pros & Developers. It's quick & easy.

MessageBox c++

P: 1
Hello guys,

Just to note off, i've spent the last 3 years working in Visual Basics, so I have these really bad habbits in c++ right now, heh, however I'm working on it.


Right I have the real down basic question, when someone clicks on a button I want a messagebox to appear on the screen.

My current code has this



Expand|Select|Wrap|Line Numbers
  1.         }
  2. #pragma endregion
  3.     private: System::Void button1_Click(System::Object^  sender, System::EventArgs^  e) {
  4.  
  5.  
  6.  
  7.              }
  8.     };
  9. }
  10.  
  11.  
Now I spent a little time trying to find the simple code to add a box when the user clicks on the button1, I found this, which I believe is the code?

Expand|Select|Wrap|Line Numbers
  1. MessageBox(NULL,"CTRL+BREAK received!","CEvent",MB_OK);
  2.  
However it didnt work when I place it underneath the ' e){ '

could someone please point me in the correct direction.

Thanks!
Sep 29 '06 #1
Share this Question
Share on Google+
3 Replies


Banfa
Expert Mod 5K+
P: 8,916
However it didnt work when I place it underneath the ' e){ '
Didn't work how what errors did you get?
Sep 29 '06 #2

P: 41
maybe you forgot to declare it
Sep 29 '06 #3

P: 1
If you use Microsoft Visual C++ try to delete the "NULL," in your MessageBox. Eg.: MessageBox("AKU BISA TOH!!!!!","INFORMATIONNNNIS",MB_OK);
Oct 19 '06 #4

Post your reply

Sign in to post your reply or Sign up for a free account.