Solved

MessageBoxEx function

Posted on 1997-05-02
7
364 Views
Last Modified: 2013-11-20
There is Win32 API function "MessageBoxEx". The last it parameter specifies the language in which to display the text contained in the predefined push buttons. I tried to call function with different language ID. However all time text appear in system language. I use English Pan European Windows'95 version. So buttons text is always English. But I need change language to another. Of course, I wrote my own MessageBox function analog which do what I want. But I want to know what must I do to compel API function work correctly.
0
Comment
Question by:AVaulin
[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
  • 3
  • 3
7 Comments
 
LVL 4

Expert Comment

by:mbhakta
ID: 1301280
Install a Win 95 version of say, Norwegian or Chinese windows and try your code on that install.
0
 
LVL 4

Author Comment

by:AVaulin
ID: 1301281
I tried to run my program in different system language Win95. And of course the result is: all buttons text are in new language. But I want that buttons text will be different with system (MessageBoxEx function must give me this possible).
0
 
LVL 4

Expert Comment

by:mbhakta
ID: 1301282
What are the ID's of your button. If you want Ok , Cancel buttons to have the same text no matter what language you are using try changing their ID's from IDOK to ID_OK etc. This way the text on the buttons will not change.
0
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!

 
LVL 4

Author Comment

by:AVaulin
ID: 1301283
How can I change buttons ID for say MessageBoxEx( ..., ..., ..., MB_YESNOCANCEL, ...) ?
0
 
LVL 4

Expert Comment

by:mbhakta
ID: 1301284
I would suggest if you want to do something like that you better create your own messagebox. It is a mess to do it on Windows Message boxes. I surely can be done in several different way but it is not worth the effort.
0
 
LVL 4

Author Comment

by:AVaulin
ID: 1301285
I already wrote my own MessageBox (see question text). Nevertheless I want know about MessageBoxEx function. I can tell next story: I use English Windows'95 and Russian Microsoft Word. All Word MessageBox buttons text is Russian (instead say Explorer where text is English). Recently I install RoboHelp program (by Blue Sky Software). This program is Word macro collection. There are MessageBox calls in it. And what I see? All buttons text is Russian!!! I don't think that Blue Sky Software knows Russian language. So Word can do what I want. Why I can't?
0
 
LVL 1

Accepted Solution

by:
strobert earned 50 total points
ID: 1301286
According to:

PRB: Only One Language Can Be Used on MessageBoxEx Pushbuttons
Article ID: Q152670
Revision Date: 28-JUN-1996

STMPTOMS
When MessageBoxEx is called, regardless of the value of wLanguageID (the last parameter of MessageBoxEx), the pushbutton text can only be displayed in the native language of the operating system.

(if you can't get the article from www.microsoft.com, I can send it to you)

the last parameter is ignored, under 95, the system default is always used, under NT, they show up blank if a language other than the system default is used.

Sounds like Office isn't using MessageBox???

0

Featured Post

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!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Windows Drag & Drop Location 2 117
repeatSeparator  java  challenge 13 59
while loop over for loop 7 119
x-bar in Google Sheets 2 129
Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

739 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