Click here to Skip to main content
16,008,750 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralCapturing/Saving the selected dialog Pin
aparajita11-Jun-04 14:54
aparajita11-Jun-04 14:54 
GeneralRe: Capturing/Saving the selected dialog Pin
Anonymous11-Jun-04 15:06
Anonymous11-Jun-04 15:06 
GeneralRe: Capturing/Saving the selected dialog Pin
Johan Rosengren11-Jun-04 21:08
Johan Rosengren11-Jun-04 21:08 
QuestionHow to intercepting a video stream using directx Pin
fjrg7611-Jun-04 14:37
fjrg7611-Jun-04 14:37 
QuestionHow do you stop EditBox from displaying partial characters ? Pin
Defenestration11-Jun-04 14:33
Defenestration11-Jun-04 14:33 
AnswerRe: How do you stop EditBox from displaying partial characters ? Pin
bikram singh11-Jun-04 21:52
bikram singh11-Jun-04 21:52 
GeneralRe: How do you stop EditBox from displaying partial characters ? Pin
Defenestration12-Jun-04 0:03
Defenestration12-Jun-04 0:03 
GeneralAppeding text in rich edit control on Japanese/chinese OS Pin
rajeev_kc11-Jun-04 12:38
rajeev_kc11-Jun-04 12:38 
I am facing problem is displaying the set of strings in rich edit control in Jananese/Chinese OS.

I am using rich edit control in my application to display some dynamic text based on some result. I am using WTL for my application development. The code what I have written works fine on eng and other lang OS except lang that supports DBCS. The code would go something like this:

TCHAR szTestName[MAX_PATH];
memset(szTestName, 0, sizeof(szTestName));
TCHAR szTestName[MAX_PATH];
memset(szTestName, 0, sizeof(szTestName));

_tcscpy(szTestName, _T("Test Name"));
_tcscpy(szTestResult, _T("Test Result"));

m_crichEditctrl.AppendText(szTestName);
m_crichEditctrl.AppendText(szLineFeedChar); // "\n"
m_crichEditctrl.AppendText(szTestResult);

Here I am trying to add "Test Name" in the first line and "Test Result" in the second line. The issue what I am facing is the line feed char is getting inserted after char 'm' (in Test Name), I tried even inserted different char other than line feed char, always I get the same problem. When I debugged I found out that SetSel (SetSel/ReplaceSel is called internally by AppendText api of rich edit) always returns one index less and this is taken by ReplaceSel to add the text.

Please note that this problem happens only when I use the translated japanese/chinese chars for "Test Name" and "Test Result". If I just use the english strings as shown in the code it works fine.

Am I missing setting something for the rich edit for other lang OS (especially lang that supports DBCS) except english. Please help me out on this.

Thanks in advance.
Rajeev.


GeneralRe: Appeding text in rich edit control on Japanese/chinese OS Pin
Zeeshan Bilal11-Jun-04 23:44
Zeeshan Bilal11-Jun-04 23:44 
GeneralGetDriveType etc. Pin
Todd Smith11-Jun-04 12:11
Todd Smith11-Jun-04 12:11 
GeneralRe: GetDriveType etc. Pin
Ravi Bhavnani11-Jun-04 12:31
professionalRavi Bhavnani11-Jun-04 12:31 
GeneralProfiler for VC++ & W98 Pin
CaesarCZ11-Jun-04 11:14
CaesarCZ11-Jun-04 11:14 
GeneralEdit Box for real numbers Pin
Grahamfff11-Jun-04 10:40
Grahamfff11-Jun-04 10:40 
GeneralRe: Edit Box for real numbers Pin
Ravi Bhavnani11-Jun-04 12:53
professionalRavi Bhavnani11-Jun-04 12:53 
General"Empty" Window application behaving very strange Pin
User 665811-Jun-04 9:44
User 665811-Jun-04 9:44 
GeneralRe: "Empty" Window application behaving very strange Pin
David Crow11-Jun-04 10:31
David Crow11-Jun-04 10:31 
GeneralRe: "Empty" Window application behaving very strange Pin
User 665811-Jun-04 10:57
User 665811-Jun-04 10:57 
GeneralUI design question ( presenting preferences ) Pin
Maximilien11-Jun-04 9:11
Maximilien11-Jun-04 9:11 
GeneralRe: UI design question ( presenting preferences ) Pin
Navin11-Jun-04 9:20
Navin11-Jun-04 9:20 
GeneralRe: UI design question ( presenting preferences ) Pin
Ravi Bhavnani11-Jun-04 12:54
professionalRavi Bhavnani11-Jun-04 12:54 
GeneralRe: UI design question ( presenting preferences ) Pin
Henry miller14-Jun-04 3:10
Henry miller14-Jun-04 3:10 
Questionhow to enable the "ok" button after 8 second in MFC Dialog box Pin
shiva shankar11-Jun-04 8:38
shiva shankar11-Jun-04 8:38 
AnswerRe: how to enable the "ok" button after 8 second in MFC Dialog box Pin
Ravi Bhavnani11-Jun-04 8:49
professionalRavi Bhavnani11-Jun-04 8:49 
AnswerRe: how to enable the "ok" button after 8 second in MFC Dialog box Pin
toxcct13-Jun-04 3:23
toxcct13-Jun-04 3:23 
Generalimage sequence in a window Pin
nyquisttt11-Jun-04 8:13
nyquisttt11-Jun-04 8:13 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.