Click here to Skip to main content
15,886,110 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: STL sort throw exception? Pin
Eytukan5-Jan-08 2:44
Eytukan5-Jan-08 2:44 
GeneralRe: STL sort throw exception? Pin
George_George5-Jan-08 3:02
George_George5-Jan-08 3:02 
QuestionMFC and Unicode Pin
mtzlplyk4-Jan-08 3:40
mtzlplyk4-Jan-08 3:40 
GeneralRe: MFC and Unicode Pin
Matthew Faithfull4-Jan-08 4:05
Matthew Faithfull4-Jan-08 4:05 
GeneralRe: MFC and Unicode Pin
mtzlplyk4-Jan-08 4:36
mtzlplyk4-Jan-08 4:36 
QuestionRe: MFC and Unicode Pin
Matthew Faithfull4-Jan-08 5:51
Matthew Faithfull4-Jan-08 5:51 
GeneralRe: MFC and Unicode Pin
mtzlplyk4-Jan-08 9:13
mtzlplyk4-Jan-08 9:13 
GeneralChange in rich edit control behaviour with EM_EXSETSEL / SetSel Pin
Paul Vickery4-Jan-08 3:04
professionalPaul Vickery4-Jan-08 3:04 
There seems to have been a change in behaviour between VC6 and VS2005 builds when calling SetSel / EM_EXSETSEL in a rich edit control. I have code which emboldens certain lines of text, which used to work in VC6, but since moving to VS2005 has come up with the wrong results. The code is something like:
CString sText;
pEdit->GetWindowText(sText);

CString sSection = "SectionHeading";
int nPos = sText.Find(sSection);
int nPosEnd = nPos + sSection.GetLength();
pEdit->SetSel(nPos, nPosEnd);
If the heading is at the start of the text, then it's ok, else the selection is offset by the number of lines, which makes we think that the old code counted line breaks as two characters, but the new code counts a line break as one character. In the sText, the line breaks are definately two characters in both VC6 and VS8 builds.

Any ideas anyone?


"The way of a fool seems right to him, but a wise man listens to advice" - Proverbs 12:15 (NIV)

GeneralRe: Change in rich edit control behaviour with EM_EXSETSEL / SetSel Pin
Vaclav_4-Jan-08 4:14
Vaclav_4-Jan-08 4:14 
GeneralRe: Change in rich edit control behaviour with EM_EXSETSEL / SetSel Pin
Paul Vickery8-Jan-08 0:00
professionalPaul Vickery8-Jan-08 0:00 
GeneralRe: Change in rich edit control behaviour with EM_EXSETSEL / SetSel Pin
Vaclav_8-Jan-08 6:55
Vaclav_8-Jan-08 6:55 
QuestionRe: Change in rich edit control behaviour with EM_EXSETSEL / SetSel Pin
Mark Salsbery4-Jan-08 6:56
Mark Salsbery4-Jan-08 6:56 
GeneralRe: Change in rich edit control behaviour with EM_EXSETSEL / SetSel Pin
Paul Vickery9-Jan-08 4:49
professionalPaul Vickery9-Jan-08 4:49 
GeneralSaving settings \ Remembering settings after reboot Pin
thes3cr3t14-Jan-08 2:32
thes3cr3t14-Jan-08 2:32 
GeneralRe: Saving settings \ Remembering settings after reboot Pin
CPallini4-Jan-08 2:45
mveCPallini4-Jan-08 2:45 
GeneralRe: Saving settings \ Remembering settings after reboot Pin
Rajesh R Subramanian4-Jan-08 5:36
professionalRajesh R Subramanian4-Jan-08 5:36 
GeneralRe: Saving settings \ Remembering settings after reboot Pin
Hamid_RT4-Jan-08 18:12
Hamid_RT4-Jan-08 18:12 
GeneralCStatusBar Pin
vethathiri4-Jan-08 1:39
vethathiri4-Jan-08 1:39 
QuestionRe: CStatusBar Pin
David Crow4-Jan-08 2:52
David Crow4-Jan-08 2:52 
JokeRe: CStatusBar Pin
CPallini4-Jan-08 3:09
mveCPallini4-Jan-08 3:09 
GeneralRe: CStatusBar Pin
David Crow4-Jan-08 3:34
David Crow4-Jan-08 3:34 
GeneralRe: CStatusBar Pin
CPallini4-Jan-08 3:46
mveCPallini4-Jan-08 3:46 
JokeRe: CStatusBar Pin
Mark Salsbery4-Jan-08 7:04
Mark Salsbery4-Jan-08 7:04 
GeneralRe: CStatusBar Pin
Mark Salsbery4-Jan-08 7:11
Mark Salsbery4-Jan-08 7:11 
GeneralRe: CStatusBar Pin
vethathiri6-Jan-08 18:46
vethathiri6-Jan-08 18:46 

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.