Solved

basics......

Posted on 1998-08-28
5
121 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
  • 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Importing Special Characters in Dynamics GP Through Integration Manager 3 89
scoreUp challenge 14 69
Annoying "thing" blocks my view 4 131
Work with App store 7 92
Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
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.
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

749 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