467,882 Members | 1,157 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,882 developers. It's quick & easy.

Open\Save Dialog control labels....?

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
  • viewed: 2076
Share:
2 Replies

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
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.

Similar topics

1 post views Thread by Prosonman | last post: by
2 posts views Thread by William Gill | last post: by
4 posts views Thread by Dalan | last post: by
10 posts views Thread by John Baker | last post: by
1 post views Thread by Laxmikant Rashinkar | last post: by
2 posts views Thread by Giovane Calabrese | last post: by
3 posts views Thread by solar | last post: by
reply views Thread by Allen Maki | last post: by
reply views Thread by MrMoon | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.