Solved

customized message box?

Posted on 2000-03-01
8
171 Views
Last Modified: 2010-04-02
Hello guys

can i used my own resource id in the messagebox function? i don't want the one provided by windows

thanks
venky
0
Comment
Question by:vchellam
[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
8 Comments
 
LVL 14

Expert Comment

by:AlexVirochovsky
ID: 2573306
You may simple make Dialog, with
Static Text Control, Icon and some Buttons(Ok, Cancel ,Retry..)
0
 
LVL 8

Expert Comment

by:gelbert
ID: 2573430
Have you tried to create resource and then use in in message box?
It worked for strings with me. It may work for icons, ..
0
 

Author Comment

by:vchellam
ID: 2573551
well i am using dialog box already but it has its own problem, so i can use only messagebox
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 3

Expert Comment

by:Shay050799
ID: 2573845
well the easiest way is to catch the message in CWinApp derived windows
OnMessageBox
0
 

Author Comment

by:vchellam
ID: 2573975
catch and do what? i am sorry i didn't get u shay.

well one thing can solve my problem,
is there any way my all my messages by handled by windows itself, i don't want it to go to my parent window!

like i have a Cdialog which i am displaying as message box but what i see is all my messages go through it parent window which is mainframe? how do i stop this?
0
 
LVL 3

Expert Comment

by:Shay050799
ID: 2573984
u mean that u want
to catch the messages before they are posted ?
0
 

Author Comment

by:vchellam
ID: 2574012
nope, what happening is i have a dialog box, in my case its very tedious, they have done it long back and don't want to change!

i create my parent dialog box and i haven't done the do modal for that!
Before doing DoModal we set the mainframe wnd of the application to the dialog created. before domodal i check connections with some other things and if it fails i put a message box in my own format. Message box is a another dialog we created, so i am passing null as parent of the message box dialog which eventually becomes mainframe window which is not yet created.

so when the message dialog box displays, if i try to move the mouse or any operation it throws as exception and after debugging i found it goes to parent class pretranslate function but parent class(mainframe window) is NULL.

so i want to handle the messages in poped up dialog box only. how do i do that?

i hope above things made sense to u
0
 
LVL 30

Accepted Solution

by:
SteveGTR earned 50 total points
ID: 2574402
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
c++ substatte a varabe for a string in a LPCTSTR statment 8 94
Unable to start eclipse ? 17 163
c++, dynamic object by json 1 60
I could not set window to top 4 40
Unlike C#, C++ doesn't have native support for sealing classes (so they cannot be sub-classed). At the cost of a virtual base class pointer it is possible to implement a pseudo sealing mechanism The trick is to virtually inherit from a base class…
Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

763 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