• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 242
  • Last Modified:

Localized Message Box

I have written a program which displays english/japanese dialog box depending on current locale information.
The dialog box is loaded from a  dll. This Dialog box contains some edit box to input some integers with range specified(using class wizard).

My problem is that :

When I run this program in japanese machine and  the  integer entered in the dialog box is not in the specified range and    "OK" button is pressed  the message box  comes up in "English"  asking to enter the integer in the given range. All other strings are in Japanese

Any one know how to change Validation  message  to Japanese.

1 Solution
do the Validation  of the range by yourself. Fast and easy!
well u are usinf probably DDX to check the range, if that right, windows is using its default messagebox, which probably in english.

try to check the range by yourself, erase the DDX/DDV entry for the range, and check the range by your self after the focus is lost from the edit control.
that way you'll be able to place a customize message box
pran071199Author Commented:
I  cannot accept this answer.

I have lot of edit box with validation check  in diffrent files.If I have to do validtaion check myself I will have to add  code.

Anyone know how to solve it without changing the code or with minimum code change..

Tommy HuiEngineerCommented:
All of the validators use AfxMessageBox to display their messages. AfxMessageBox() in turn calls your application's DoMessageBox() which is a virtual function you can override. The default behavior is to call ::MessageBox(). You can override DoMessageBox() to do whatever you want.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

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.

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