Messagebox
-
sorry for asking a very elementary question but i m new to VC++ Can there be a messagebox without any buttons?? green_trees
-
sorry for asking a very elementary question but i m new to VC++ Can there be a messagebox without any buttons?? green_trees
I think, there will Always be Button/s around it... You need to Fill In the Last Parameter...
-
I think, there will Always be Button/s around it... You need to Fill In the Last Parameter...
-
Anonymous wrote: well, can u point the main difference between MessageBox and AfxMessageBox? AfxMessageBox - a global function. MessageBox - a method available within a CWnd derived class You cannot call MessageBox within a non CWnd derived class. Ex: class A { public: void Display() { // error MessageBox(...); // should be AfxMessageBox(...) } }; But in this example class A { public: void Display() { MessageBox(...); // OK, juts like calling this->MessageBox(..) AfxMessageBox(...) // ok } };
-
Anonymous wrote: well, can u point the main difference between MessageBox and AfxMessageBox? AfxMessageBox - a global function. MessageBox - a method available within a CWnd derived class You cannot call MessageBox within a non CWnd derived class. Ex: class A { public: void Display() { // error MessageBox(...); // should be AfxMessageBox(...) } }; But in this example class A { public: void Display() { MessageBox(...); // OK, juts like calling this->MessageBox(..) AfxMessageBox(...) // ok } };
Jose Cezar S. Ynion wrote: But in this example class A { public: void Display() { MessageBox(...); // OK, juts like calling this->MessageBox(..) AfxMessageBox(...) // ok } Sorry for that this should be: class B:public CDialog { public: void Display() { MessageBox(...); // OK, just like calling this->MessageBox(..) AfxMessageBox(...) // ok }
-
sorry for asking a very elementary question but i m new to VC++ Can there be a messagebox without any buttons?? green_trees
Why would you want this? How would the user close the message box without buttons? If you are performing some background processing and will close the box yourself, then you don't want a message box. You want a modeless dialog box.
Ryan
"Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
-
For starters,
AfxMessageBox()
is an MFC wrapper around the Win32MessageBox()
function. WithMessageBox()
, you supply the parent window, the caption, and the message text. WithAfxMessageBox()
, the parent window and the caption are handled automatically.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen