Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 176
  • Last Modified:

customized message box?

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
vchellam
Asked:
vchellam
1 Solution
 
AlexVirochovskyCommented:
You may simple make Dialog, with
Static Text Control, Icon and some Buttons(Ok, Cancel ,Retry..)
0
 
gelbertCommented:
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
 
vchellamAuthor Commented:
well i am using dialog box already but it has its own problem, so i can use only messagebox
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
Shay050799Commented:
well the easiest way is to catch the message in CWinApp derived windows
OnMessageBox
0
 
vchellamAuthor Commented:
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
 
Shay050799Commented:
u mean that u want
to catch the messages before they are posted ?
0
 
vchellamAuthor Commented:
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
 
SteveGTRCommented:
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now