Open\Save Dialog control labels....?

  • Thread starter Thread starter SpotNet
  • Start date Start date
S

SpotNet

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.
 
In case anyone was wondering how SetWindowText(IntPtr hWnd, string
controlText) works well indeed...

Regards,
SpotNet
 
SpotNet said:
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...
 
Back
Top