Click here to Skip to main content
13,005,920 members (91,645 online)
Rate this:
Please Sign up or sign in to vote.
See more:
Hello guys,

My question is really simple I want to change the text on messagebox buttons to something else

for example I want to make 'yes' button say 'sure'

can I do this ?

I did google this some while ago and I remember I couldnt find anything helpful so if somebody get me a google result it will be Embarrassing :-)

thanks in advance
Posted 13-Apr-11 22:18pm
Tarun.K.S 14-Apr-11 4:24am
I am not sure whether that's possible but you can make a custom window for it.
SAKryukov 14-Apr-11 22:51pm
That would much more appropriate thing to do (not for the novice by the way), compared to the method based on Hook, even though it's quite creative.
a1mimo 14-Apr-11 4:32am
I know that, but its just I am too lazy and curious about it :-)
Thank you,
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

It is indeed possible.
There is a ready made class for this, here on CodeProject.
Just use the CodeProject Search feature!
Good luck!

If you really can't find it... try here: Localizing System MessageBox[^]
a1mimo 14-Apr-11 5:01am
Thank you Toli
I actually tried your advice and I was just reading it, you are a big help :-)
Tarun.K.S 14-Apr-11 5:56am
Wow so it works!
girish sp 14-Apr-11 7:04am
toli-i thought its not possible..easy way to do..good answer!!my 5
SAKryukov 14-Apr-11 22:49pm
Great article (my 5 for the reference), great illustration of "Windows must die". Created absolutely inflexible MessageBox, but the Hook beats it.
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

I believe calling Win32 API is only one way how to achieve this. If I remember correctly this could be done by using SendMessage API function. But it needs to know handle of the "window"(button) intended for caption change.
a1mimo 14-Apr-11 4:34am
can you suggest me an article or something to do so? I would appreciate this
Thank you,
Rampas Tomas 14-Apr-11 4:39am
I found it just 2 clicks from here :)
a1mimo 14-Apr-11 5:00am
Thanks Rampas
I got it I appreciate your help :-)
girish sp 14-Apr-11 7:04am
my 5!!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170628.1 | Last Updated 14 Apr 2011
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100