News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Captions in Dialogs

Started by RuiLoureiro, November 02, 2008, 12:12:03 PM

Previous topic - Next topic

RuiLoureiro

Hi,
     how do i change the caption defined in resource file.
     i want the same dialog box but with 2 different captions.
     Thanks
Rui

Guybrush

have u tried  SetWindowText ?

MichaelW

Rui,

I'm not sure I understand the question. I think the obvious answer would be to create two resource definitions that differ only in the dialog caption. Guybrush's suggestion would probably be easier, and if you did it from the WM_INITDIALOG handler, since WM_INITDIALOG is sent before the dialog is displayed, the original caption would never be seen.
eschew obfuscation

Mark Jones

Hi Rui, if you are tinkering with multiple languages, may I suggest trying GoASM. GoASM will allow UNICODE string literals inside the code. Please see its documentation for more details.
"To deny our impulses... foolish; to revel in them, chaos." MCJ 2003.08

Vortex

Quotei want the same dialog box but with 2 different captions.

What do you mean with two different captions?

jj2007

Another elegant way to build bilingual apps is an init file built as follows:

[Dlg_EN]
mt=MyTitle
mc1=My first control

[Dlg_FR]
mt=Mon titre
mc1=Mon premier control

The read/write privateprofile functions are pretty easy to implement. You just specify the section name, and loop through the individual control strings.

RuiLoureiro

#6
Guybrush, MichaelW, Mark, jj2007:

         Thank you for your helps
         
I have 2 functions that i can call from the menu (iten1 and iten2).
Both begin calling the same dialog box to choose some params. used by both
But i want to know from where i call it
(from iten1 then one caption; from iten2 another caption)

MichaelW,
         i havent tried yet «SetWindowText, hWnd, pCaption»
         but i think your help works: using it in WM_INITDIALOG
         thank you  :U

        EDIT: it works, problem solved. Thanks
Rui