Hebrew Text on controls

Hello,
I am using controls (VC 6.0), such as form.
I want to change the caption of the form of something including Hebrew text.
I see on design time that everything is OK
(I have changed the form font to : david, which can be seen as Hebrew), and
when I run the program,
I see that Hebrew is not displayable (it display gurbish).

Thanks :)



0
nospam203 (1)
12/12/2006 11:18:51 PM
vc.mfc 33608 articles. 0 followers. Follow

5 Replies
539 Views

Similar Articles

[PageSpeed] 13

This should have worked, if that font has Hebrew characters in positions 00..FF.  When you
say you changed the form font, do you mean at design time?  Are you sure this is the font
actually in effect at the time the control is running?

Try this in your OnInitDialog for your form

#ifdef _DEBUG
	CFont * f = GetFont(); // retrieve the current font
	ASSERT(f != NULL);
	LOGFONT lf;
	f->GetLogFont(&lf);
	TRACE("Font = %s\n", lf.lfFaceName);
#endif

Note that even in Unicode mode you don't put _T() in TRACE statements because the macro
supplies the _T() for you.  If it prints out a name other than the one you expect, that's
what happened.  As t *why* it happened, we can then explore that if this is what happened.

If it *is* the font, and you are running an 8-bit app, it should have worked.
				joe

On Tue, 12 Dec 2006 15:18:51 -0800, "Eitan M" <nospam@nospam_please.com\> wrote:

>Hello,
>I am using controls (VC 6.0), such as form.
>I want to change the caption of the form of something including Hebrew text.
>I see on design time that everything is OK
>(I have changed the form font to : david, which can be seen as Hebrew), and
>when I run the program,
>I see that Hebrew is not displayable (it display gurbish).
>
>Thanks :)
>
>
Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
0
newcomer (15975)
12/12/2006 4:38:03 PM
On InitDialog I did :
> #ifdef _DEBUG
> CFont * f = GetFont(); // retrieve the current font
> ASSERT(f != NULL);
> LOGFONT lf;
> f->GetLogFont(&lf);
> TRACE("Font = %s\n", lf.lfFaceName);
> #endif

It is actually the font david I have changed (lf.lfFaceName = david).
(I have also tried hebrew fonts, such miram,
 and still, the same problem).

Thanks :)


0
12/13/2006 9:56:18 AM
I just tried a couple experiments.  Apparently the font which is set does not affect the
caption.  I tried several different fonts and nothing changed.

There's a SetParametersInfo, which specifies what font to use for captions, but this will
apply to every window in the system.

There's also a function DrawCaption, which draws a caption bar and uses a DC as input, and
presumably if you selected your font into this you could do it.  Key here is that it
appears that this has to be done in the OnNcPaint handler, and life just got very, very
complicated.

I may experiment with this a bit if I have time.
					joe
On Wed, 13 Dec 2006 11:56:18 +0200, "Eitan M" <no_spam_please@nospam_please.com> wrote:

>On InitDialog I did :
>> #ifdef _DEBUG
>> CFont * f = GetFont(); // retrieve the current font
>> ASSERT(f != NULL);
>> LOGFONT lf;
>> f->GetLogFont(&lf);
>> TRACE("Font = %s\n", lf.lfFaceName);
>> #endif
>
>It is actually the font david I have changed (lf.lfFaceName = david).
>(I have also tried hebrew fonts, such miram,
> and still, the same problem).
>
>Thanks :)
>
Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
0
newcomer (15975)
12/13/2006 5:16:15 PM
"Joseph M. Newcomer" <newcomer@flounder.com> wrote in message 
news:67b0o2dgfp0oit3ui0godotghbgue16jk1@4ax.com...
>I just tried a couple experiments.  Apparently the font which is set does 
>not affect the
> caption.  I tried several different fonts and nothing changed.
>
> There's a SetParametersInfo, which specifies what font to use for 
> captions, but this will
> apply to every window in the system.
>
> There's also a function DrawCaption, which draws a caption bar and uses a 
> DC as input, and
> presumably if you selected your font into this you could do it.  Key here 
> is that it
> appears that this has to be done in the OnNcPaint handler, and life just 
> got very, very
> complicated.

1) I didn't find OnNcPaint.
2) I need it for the dialog-form and for controls (such as button).
3) Isn't any simplier way doing so (It obviously work on VB 6.0, I don't see 
any reason it shouldn/t work on VC. 6.0), and not doing this by code ?

Thanks :) 


0
12/14/2006 9:01:50 AM
Why not?  I ntyped it in to MSDN and it came up in the index before I finished typing!

Controls are easy.  Just call SetFont (and set the RTLREADING style and other applicable
styles).  It's the caption bar that's the problem.

VB often does its own thing and ignores the support of the OS.  So VB might well have its
own OnNcPaint handler and not use the built-in OS caption-bar-painting logic.  It wouldn't
surprise me.  VB does all kinds of weird stuff.
					joe

On Thu, 14 Dec 2006 11:01:50 +0200, "Eitan M" <no_spam_please@nospam_please.com> wrote:

>
>"Joseph M. Newcomer" <newcomer@flounder.com> wrote in message 
>news:67b0o2dgfp0oit3ui0godotghbgue16jk1@4ax.com...
>>I just tried a couple experiments.  Apparently the font which is set does 
>>not affect the
>> caption.  I tried several different fonts and nothing changed.
>>
>> There's a SetParametersInfo, which specifies what font to use for 
>> captions, but this will
>> apply to every window in the system.
>>
>> There's also a function DrawCaption, which draws a caption bar and uses a 
>> DC as input, and
>> presumably if you selected your font into this you could do it.  Key here 
>> is that it
>> appears that this has to be done in the OnNcPaint handler, and life just 
>> got very, very
>> complicated.
>
>1) I didn't find OnNcPaint.
>2) I need it for the dialog-form and for controls (such as button).
>3) Isn't any simplier way doing so (It obviously work on VB 6.0, I don't see 
>any reason it shouldn/t work on VC. 6.0), and not doing this by code ?
>
>Thanks :) 
>
Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
0
newcomer (15975)
12/14/2006 6:03:10 PM
Reply:

Similar Artilces:

Using Logical OR on text in Conditional Formatting
I have a column with various text entries. I have created a conditional formatting rule for each type of entry but the formatting can be grouped together, so I would like a Conditional Formatting rule that says: If string contains "foo" or "bar" then colour red If string does not contain "yibble" or "wibble" then make bold etc. Any idea how I can do this rather thasn having to manage over 30 rules with each one looking for a single text entry type. Thanks Darius Try a formula of =OR(A2="foo",A2="bar") =AND(A2<>"y...

Control Outlook Calendar permissions
Hi Is it possible to use Exchange 2003 to control or set users calendar permissions? I want to set the default permissions to reviewer on all users calendars. Or is there another way to set this. Thanks RajiA See http://www.slipstick.com/exchange/permissions.htm for various ways to do this. -- Sue Mosher, Outlook MVP Author of Microsoft Outlook Programming - Jumpstart for Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx "Raji Arulambalam" <rajia@ebopremove-megovt.nz> wrote in message news:ep8koS1GEHA.2004@TK2MSFTNGP...

Color code quoted text
Is there no way to color code quoted text in the standard message reading view? I've searched high and low and can't seem to find anything about this. The newsreader in Opera does a terrific job of this, as do many other programs. Bob Graham Yes, but since you decided to keep secret the version of Outlook you are = using, all bets are off. --=81 Milly Staples [MVP - Outlook] Post all replies to the group to keep the discussion intact. All unsolicited mail sent to my personal account will be deleted without reading. =20 After furious head scratching, rvgrahamsevatenein@sbcglobal...

No text in email body
mail delivered to my mail account has no text in the message body. This just started happening in the last few days ?? HELP !!! ...

Version Control with Dynamics.vba
Does anyone have a good system for version control with dynamics vba programming? I have had problems with dynamics.vba becoming corrupted in the past - I lost work each and every time. It was suggested to me that Sourcesafe, ironically, was the culprit. I don't know for certain that that was the case. At any rate, Dynamics.vba, Forms.dic, Reports.dic, .frxs and ..frms all need to be under version control. Any recommendations or comments would be appreciated. ...

Text to Columns?
In my spreadsheet, from cells F1 to CA1, I have a list of titles. At the beginning of each of these titles is the words Out of Stock/. I would like to know if there is an easier way to get rid of these words other than text to columns. Right now, I insert a column next to one with text and use Text to Columns and choose "/" as my separator, and then I have to go back and delete all of the unwanted cells. I didn't mind doing this once, but now that I have to do it weekly, I need to find a faster way. TIA This is what it looks like now. F1 ...

How can I capatalize text in a column?
I would like to select a column to incorporate only upper case letters. How do I do this? I would dump the column into Word then do Format - Change Case - UPPERCASE then dump it back into Excel. I do not see this feature in Excel. "dgysr" wrote: > I would like to select a column to incorporate only upper case letters. How > do I do this? will you get your desired results if you use the =UPPER() formula in another column? "dgysr" wrote: > I would like to select a column to incorporate only upper case letters. How > do I do this? ...

Text box disappears on chart
I added a text box to a chart and when I click off of it, the text box disappears (goes behind the chart). I have tried Bring to Front and Bring Forward, and it may or may not stay visible and print. I have clicked on the frame of the text box (it changes pattern) and tried Bring to Front - same problem. Any ideas? Carole O The text box is on the worksheet, not the chart. To fix the problem, Select the text box, and choose Edit>Cut Select the chart (you'll see handles on its corners and sides) Choose Edit>Paste, to paste the text box onto the chart. Click away from the char...

when i type i am not seeing any text in Outlook 2003
I am using Microsoft Outlook 2003, I don't know what happened but when I try to send an email nothing appears instead I only see read error lines on the screen. I have tried everything but nothing works. I cannot type because no text appears on my screen. I am not able to send emails. Please help!! After typing a couple of words that you do not see, try to highlight the area where you typed.What happens? Is your font colour set to white? Peter "tigka98@hotmail.com" <tigka98@hotmail.com@discussions.microsoft.com> wrote in message news:777622D7-4C61-432B-B8AD-5...

Restructuring text data in excel? Pivot?
Hi! I have a large sum och data in the order below: Choice Course 1 Course 2 Course 3 Course 4 1 Name 1 Name 3 Name 2 Name 1 2 Name 3 Name 4 Name 4 Name 3 3 Name 5 I would like to structure it differently to the format below: Choice 1 2 3 Name 1 Course 1 Course 4 Name 2 Course 3 Name 3 Course 1 Course 2 Course 4 Name 4 Course 2 Course 3 Name 5 Course 1 Is this possible? I have been trying to use pivottables without any luck. Cheers and thanks, Pete Pivottables work with numbers (sum of, max of, average of). They won't work with text. And I don'...

Read Text File into Excel Using VBA
Hi All, I'm a new VBA programmer. I know how to pull an entire text file into an Excel Spreadsheet, but I only want specific information from the text file not the entire text file. What I have is about 25 text files stored in a folder, let's say C:\test. Each file is named by a property address as follows: 209 MAIN ST.txt 213 MAIN ST.txt 111 ELM ST.txt 2356 WOOD AVE.txt On the 11th row of each file is as follows: Property Address:209 MAIN ST On the 31st row of each file is as follows: Total Value:30500 What I would like to do is read each file located in the "C:\test folder...

How to customize the length of text preview in desktop alert
How to customize the length of text preview in desktop alert ...

force Excel to treat numbers as text
Sorry I searched this and no one seems to have a solution. I trie pre-defiming columns as text but it gets over-riden by the paste. Past Special doesn't do the trick.. paste special as text on tabular data coming from a web site puts mos of the data in the first column. It no longer spreads the columns o pasted data into its own excel columns the tabular data, tab delimited, I want to 'copy&paste' looks lik this: 1) OGRODOWICZ MARK M47 6306 BROOKLYN NY 533 446 41 24:00 23:25 7:3 20:58 2) CHAO DUSTIN M35 3738 NEW YORK NY 534 447 155 24:02 23:47 7:40 23:1 The paste should...

Using text in a cell in a formula
I need to have a formula use the text of adjacent cells to determine where to look for values. I want to grab data from multiple datasheets but I don't want to have to type the sheet name in every formula, I want the formula to grab the name of the sheet from an adjacent cell. i.e. I need a formula like =if(sheet1!B2>0,100,""), but I need a function that will fill in the sheet name from the text value of an adjacent cell that would have the sheet name in it as I will be doing this for multiple cells on the same sheet. see your other post -- Biff Microsoft...

Removing text from cells
Hi, I have a spreadsheet with a list of reference numbers in column A. The numbers are like this. AAA/12345/Smith J Mr What I want to do is remove the text after the last / eg. Smith J Mr. I have thousands of cells I need to remove this on. Please help. Thanks. Hi Craig are all the entries the same number of characters for the first two sections, AAA/12345/ BBB/67890/ etc if so you can do this using a "helper" column - in column B type ==LEFT(A1,10) and then double click on the fill handle (bottom right hand side of cell) to fill down now copy column B click on A1 and ch...

unwanted control toolbox
I use Word as my email editor in Outlook. From time to time, and apparently only for some email messages, Outlook automatically adds the "control toolbox" toolbar to the message reply window. Typically, in addition to the toolbar, a small box of some sort opens in the text box portion of the message window. I have no need for the toolbar or the additional box, but even after I eliminate the toolbar and close the additional box I typically find that every time I open a new message window the toolbar and box reappear. Is there some way to prevent this from happening? ...

File Dialog Explorer style + manipulate existing controls #3
First, thx for your replies on my first question. I ave another question: in my application I have an online-language-switch option, where the user can switch between the languages German, English and French. Can i manipulate the buttons and labels of the modern file-open-dialog at runtime? I don't want to add new controls only manipulate the existing one (setting correct language texts). Is this possible with the file dialog which uses explorer style? thx ...

setup a text box as a lined page
I'd like to simulate text on lined paper. Is it possible in Word or Publisher? Thanks Find a lined paper background or graphic, put it on the Master page. On the the publication page create a text box. View, turn on baseline guides. Go to Arrange, Layout guides, baseline tab, adjust it to match your lined graphic. Select the text box, Format, paragraph, check align text to baseline guides. http://images.google.com/images?hl=en&q=lined+paper&gbv=2 -- Mary Sauer MSFT MVP http://office.microsoft.com/ http://msauer.mvps.org/ news://msnews.microsoft.com "tridev" <tr...

I'm having problems inserting text files from notepad
When I try to insert a text file created in notepad, which contains characters such as £, $ or letters with symbols over them, into a text box in Publisher 2003 it comes up with a File Conversion window, and the options to choose the Text encoding option. This didnt happen in our older version of Publisher, on our old PCs. We have new PC running Windows XP and Office Professional 2003 and I want to be able to insert the files without this window appearing. I have checked the registry and CharacterSet value is set to ANSI. Any suggestions on what is happening and how I can correct...

Sort Column by Text Color or BackGrd Color
Does anyone have a method that allows you to sort by Text Color or by Background Color? Darn! It's so cold here in Massachussetts that my fingers hit the wrong key. Check out Chip Pearson's page. http://www.cpearson.com/excel/SortByColor.htm Good Luck, Mark Graesser mark_graesser@yahoo.com ----- Ken Dickens wrote: ----- Does anyone have a method that allows you to sort by Text Color or by Background Color? Ken, The principle is to create a UDF to calculate the Colorindex and add it to an adjacent column, and then sort by that column. Chip Pea...

Need to change text to csv
My credit card company has an export feature. One of the options is ".csv (Excel). This used to give me a nice clean spreadsheet with each column of information in a separate Excell column. I guess it converted on the fly or something. But now it seems to be a "comma delimited text file" In other words, only the first Excel cell in each row has data in it, and it looks like this in each row (the first row has headings). 1,"03/24/2005","HARVARD CS","Credit","$39.95". What can I do to get all those comma delimited items into sep...

Excel Spreadsheet w/ ActiveX control on website
I am posting a link to an excel spreadsheet to our website. The spreadsheet contains dropdown boxes and when the spreadsheet is downloaded from the site and you click on the drop down a box pops up that says in order to use the activex control you must open another window. This is okay, (not ideal) but when I close the 2nd window the web page is blank. 1. Do you know of a way around the pop up to open a 2nd window, and 2. why is the web page blank when the 2nd excel window is closed and how can I correct that? Misty1 -- James ...

How to control Word to open files in Draft layout and Document Map
I can't find how to control this. Sometimes for a long period all documents open in Draft mode which is what I want but sometimes they open in other layout modes and I have to constantly switch to Draft layout mode. Also the same happens with the Document Map view that appear on the left side. I used to have all documents open with that Document Map view but currently for about a month all documents open with Thumbnails view and I have to always switch to Document Map view every time. Ross_123 wrote: > I can't find how to control this. Sometimes for a long period all ...

Can't get a value from a querry into a forms text box
I have a main Shippin Control table, and a main Shipping Control form with description of cargo and quantity text boxes. I have a querry which is a join of tblValues and tblShipping_Control. The SQL is below SELECT Shipping_Control.DescriptionofCargo, Shipping_Control.CargoQty, tblValues.Value, ([Shipping_Control].[CargoQty]*[tblValues].[Value]) AS CommercialValue, Shipping_Control.ShippingDate, Shipping_Control.ShipTo, Shipping_Control.ShipFrom, Shipping_Control.CollectionNoteNo, Shipping_Control.PackingListNo, Shipping_Control.ShipmentID, Shipping_Control.Customer FROM Ship...

Text Rotation in Word 2007
I am trying to rotate a small text box in Word 2007. In Word Help, it says under "Rotate a picture, shape, text box, or WordArt " :- "Click the picture shape, text box or WordArt that you want to rotate. Do one of the following: Drag the rotation handle" But I can not find the rotation handle - I am going mad trying to get it to work. Sorry for being such an idiot, but can someone tell me what I am doing wrong? In addition, under the Text Box Format Menu, there is a 'Rotate' button which when you click it has all the options greyed out except &#...