473,388 Members | 1,215 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

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
2 2333

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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Prosonman | last post by:
Hi, What is the best way to transfer variables to and from a dialog box? My project consists of a form with a number of controls, lets say three Labels, when a label is clicked it opens a dialog...
2
by: William Gill | last post by:
I have created a widget that extends Frame() and contains labels, checkboxes, and entrys. I am trying to use tkSimpleDialog.Dialog to create a modal display of this widget, but am running into...
4
by: Dalan | last post by:
I have been using a module for printing labels in Access 97, and although it works fine, I would like to add a small enhancement to it. The module allows for setting the number of labels to print...
10
by: John Baker | last post by:
Hi: I have a user who has labels that are set up 3 across and 11 vertical (which is unusual at best), and he wants me to print names and addresses on them. I have already set up for labels 10...
1
by: Laxmikant Rashinkar | last post by:
Hello, from inside a button handler, I am launching a dialog box that contains lables and text boxes. The dialog box is launched using dlg.Show(). In this situation the contents of the text...
2
by: Giovane Calabrese | last post by:
( aspx + vb ) hi everyone ! I really need make that function work ! im brazilian , and i want to make a multilanguage system , that function above must look at all ASPX take the labels ID and...
3
by: solar | last post by:
Is there a way that a user can set the position for a single label to print within an Access Label report? I guess I would like something like what is available in Word where the user can select...
6
by: Ron | last post by:
Hi, I know Access allows for easy construction of a report setup to print labels from a table/query, etc. I've done that one. It works pretty well for what I need. However, is there an...
0
by: Allen Maki | last post by:
I wonder if you could help. The event handler code below, will allow the user to change the phone number and write it on a label of a message box. I want to replace the message box with a dialog...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.