By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,931 Members | 1,519 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,931 IT Pros & Developers. It's quick & easy.

Open\Save Dialog control labels....?

P: n/a
Hi Newsgroup,

I have constructed highly customisable common dialog classes\objects.
Decided to extend the Open\Save dialog options with the ability to change
the text on all the controls. Mainly cause my boss wanted the Open File
Dialog's OK button to read 'Import', for all intensive purposes. Open\Save
dialogs where constructed purely from the Win32 API as you cannot inherit
these classes from the framework. Problem I am recounting is that the text
comes out like windings font or something completely ineligible, e.g,
okbuttontext = "Import" comes out looking like ||[]| | on the control. Can
anyone please tell me what I need to consider to get a what you see (want)
is what you get result?

The API I'm using
SendMessage(hparent, CDM_SETCONTROLTEXT, CommonDialog.IDOK, okbuttontext);

Many thanks and regards,

SpotNet.
Nov 16 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a

In case anyone was wondering how SetWindowText(IntPtr hWnd, string
controlText) works well indeed...

Regards,
SpotNet

"SpotNet" <Sp*****@msnews.grp> wrote in message
news:OQ**************@tk2msftngp13.phx.gbl...
Hi Newsgroup,

I have constructed highly customisable common dialog classes\objects.
Decided to extend the Open\Save dialog options with the ability to change
the text on all the controls. Mainly cause my boss wanted the Open File
Dialog's OK button to read 'Import', for all intensive purposes.
Open\Save dialogs where constructed purely from the Win32 API as you
cannot inherit these classes from the framework. Problem I am recounting
is that the text comes out like windings font or something completely
ineligible, e.g, okbuttontext = "Import" comes out looking like ||[]| | on
the control. Can anyone please tell me what I need to consider to get a
what you see (want) is what you get result?

The API I'm using
SendMessage(hparent, CDM_SETCONTROLTEXT, CommonDialog.IDOK, okbuttontext);

Many thanks and regards,

SpotNet.

Nov 16 '05 #2

P: n/a
SpotNet wrote:
Problem
I am recounting is that the text comes out like windings font or
something completely ineligible, e.g, okbuttontext = "Import" comes
out looking like ||[]| | on the control. Can anyone please tell me
what I need to consider to get a what you see (want) is what you get
result?

The API I'm using
SendMessage(hparent, CDM_SETCONTROLTEXT, CommonDialog.IDOK,
okbuttontext);


My guess would be that C# app sends unicode string while the O/S dialog
expects ascii...
Nov 16 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.