Solved

basics......

Posted on 1998-08-28
5
127 Views
Last Modified: 2013-11-19
hello,

I am very new to c/c++/mfc programming.  I was wondering, can someone explain how to do the following things for me?

1) Display a basic message box.  It seems like there has to be a better way than creating a separate dialog box with a static member in it.

2) Show those icons that you have no doubt seen in the message box (the stop icon for example).

3) Lastly, is there a way to make a dialog box always on top?

Thanks for your patience with these simple questions.
0
Comment
Question by:child_prodigy
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
5 Comments
 
LVL 6

Accepted Solution

by:
thresher_shark earned 200 total points
ID: 1321439
Answer coming...
0
 
LVL 6

Expert Comment

by:thresher_shark
ID: 1321440
>> 1) Display a basic message box.  It seems like there has to be a better way than creating a separate dialog box with a static member in it.

Sure.  If you are using MFC, then use the MessageBox member function:

MessageBox ("Hello world!");

There is also a standard Windows API function called MessageBox that you need to use in non-window classes.

Continues...
0
 
LVL 6

Expert Comment

by:thresher_shark
ID: 1321441
>> 2) Show those icons that you have no doubt seen in the message box (the stop icon for example).

Try this:
MessageBox ("Hello World", "Hi", MB_OK | MB_ICONSTOP);
- or -
MessageBox ("Hello World", "Hi", MB_OK | MB_ICONEXCLAMATION);
0
 
LVL 6

Expert Comment

by:thresher_shark
ID: 1321442
>> 3) Lastly, is there a way to make a dialog box always on top?
Use:
SetWindowPos (&wndTopMost, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);

Remember, to learn all this faster, look up these functions in the online help.

If you have any questions, please ask.  Thanks!
0
 

Author Comment

by:child_prodigy
ID: 1321443
Thanks a ton!
0

Featured Post

 Watch the Recording: Learning MySQL 5.7

MySQL 5.7 has a lot of new features. If you've dabbled with an older version of MySQL, it is definitely worth learning.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

622 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question