|
|
Thanks you all. Its working OK.
|
|
|
|
|
Hi everyone,
I am using OLEDB APIs (such as CTable, CDynamicAccessor etc) for retrieving data from a text file (say abc.txt).
The problem is while retrieving date value.
When date in "Regional and Language Options in Control Panel" is "M/d/yyyy" format, GetValue of CDynamicAccessor returns correct date value. If i change date format to "d/M/yyyy", GetValue returns NULL.
Can anyone tell me the reason for this behaviour?
Thanks
-- modified at 3:17 Monday 9th July, 2007
|
|
|
|
|
What format is the date value inside the text file?
The problem recognising D/M/Y versus M/D/Y is that there are a large number of values (where both M and D are <= 12) where it cannot be categorically determined which format is in use.
If the data driver you are using is expecting M/d/yyyy, then in theory you could call SetThreadLocale() while you do the retrieval, and set it back again afterwards, but there's no guarantee that it isn't using LOCALE_SYSTEM_DEFAULT or LOCALE_USER_DEFAULT, rather than calling GetThreadLocale() internally.
Steve S
Developer for hire
|
|
|
|
|
Steve S wrote: What format is the date value inside the text file?
"M/d/yyyy" format
Any solution??
|
|
|
|
|
I am developing a multilingual software. In my software I can changed language to Arabic. So I install a "Arabic" input method. When I tried to input Arabic in one of my CEdit control, the CEdit didn't accept Arabic.
It seems OK, if I type Arabic here.
Arabic: سيبسايبعهصقثعخرتؤمترهقفثتمبتخشهقثهعخ
Is there any special property of CEdit that I need to set? Expect somebody could help me solve this problem.
|
|
|
|
|
Why you dont use of CRichEdit?
|
|
|
|
|
create a font using arabic character set and set the font to the edit box. then u can display the arabic font in editbox.
Regards,
Ram
|
|
|
|
|
I think we have a little problem if he creates a font for editbox it will be work but if he runs his program on the a computer that has arabic language for OS so I think he will be problem.
|
|
|
|
|
Please check whether you have enabled this option
control panel->Regional and Language Settings-> Language Tab-> Tick the check box "Install files for East Asian languages"
|
|
|
|
|
1. Have you enabled this language on your computer at first place? (Internet explorer/FF has it inbuilt)
2. If 1 is done, then is your application Unicode?
3. If 2 is true, then what do you mean by your CEdit control did not accept Arabic?
Anything I will say you will bring it down to whatever you want.
- Le Centriste
|
|
|
|
|
1.What do you mean "enabled this language"?
I have add "Arabic language" & "Arabic input method" in "Console Panel->Regional Options". Is it OK?
2.How to see whether my application is unicode?
|
|
|
|
|
Peter, Chan wrote: have add "Arabic language" & "Arabic input method" in "Console Panel->Regional Options". Is it OK?
That's it. Now, are you able to type in Arabic language in notepad?
Peter, Chan wrote: 2.How to see whether my application is unicode?
I am asking if you've done an ANSI build or an Unicode build of your application. What happens when you type Arabic in the application that you built? Do you see question marks to appear instead of Arabic?
Nobody can give you wiser advice than yourself. - Cicero
|
|
|
|
|
I can type Arabic in notepad. But I can't type it in my application. When type Arabic, it displays nothing.
|
|
|
|
|
Again, does your application understand Unicode? Have you got _MBCS or _UNICODE defined in the preprocessor definition? See here if you don't understand what I am asking you about.
Nobody can give you wiser advice than yourself. - Cicero
|
|
|
|
|
Now it really works. I can input Arabic in CEdit.
But it seems that VC6.0 doesn't support unicode input while coding. I can't input Arabic directly in the code.
Visual Studio.net will support unicode well.
|
|
|
|
|
Dear all,
I would like to display japanese character in my editbox, and the no of characters should be 32. that means its not 32 japanese characters. its 32 keyboard strokes. If a user enters 32 keyboard strokes, then the edit box shouldnt display the character which was pressed after 32.
Can anyone please help me on this?
Thanks in advance.
Regards,
Ram
|
|
|
|
|
It's been a long time since I did C++, but surely it should be easy to handle the event and maintain a character count? Of course, make sure to _reduce_ the count if the user hits Backspace/Del. Also, you shouldn't increase the count if a non-char key, like Ctrl or the arrow keys was pressed.
Also, pay attention to the paste operation!
Cheers,
Vıkram.
After all is said and done, much is said and little is done.
|
|
|
|
|
I was trying to catch the character by the onchangeeditbox() function. But if i press a char in keyboard it doesnt come to that function. after i press enter only it will go to that function. thats why i couldnt able to count the no of chars.
Regards,
Ram
|
|
|
|
|
Hi,
I donot know whether u have tried this. CEdit::SetLimitText(32)
|
|
|
|
|
ya i tried this too. I set a limit to 32. may be let me explain a bit about japanese fonts using English keyboard. the OS will wait until a user presses enter to confirm the char. otherwise all the typed characters will be in buffer. So once i reach 32 charecters, i can still type characters without pressing enter. if i press enter, anything more than 32 chars will be truncated off.
Regards,
Ram
|
|
|
|
|
Normally, SetLimitText() will not allow more than the specified characters. It doesnot require pressing enter key. Iam not sure about japanese fonts. If SetlimitText doesnot work i thing u need to handle many windows events like WM_KEYDOWN, ...
|
|
|
|
|
As you earlier said that the control comes to onchangeeditbox() only when you press ENTER key, then let the control come to this function. Afterwards you can take the data of Edit box in some array and do the necessary manipulation in array i.e make the data 32 character long....and then display the data in this modified array in Edit box.
|
|
|
|
|
hi i am loading an bmp image in a button. in windows vista the image background color differs from the dialog color. how to rectify this. pls help me
|
|
|
|
|
You loaded a bitmap on the button now what is different of background?
|
|
|
|