Click here to Skip to main content
15,888,315 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: A problem, please help. Pin
Michael Schubert4-Sep-09 7:04
Michael Schubert4-Sep-09 7:04 
GeneralRe: A problem, please help. Pin
Cedric Moonen4-Sep-09 7:12
Cedric Moonen4-Sep-09 7:12 
QuestionIn printer driver, how can I make sure DrvLoadFontFile is called? Pin
sashoalm4-Sep-09 3:29
sashoalm4-Sep-09 3:29 
QuestionTo get the Cursor position Pin
prithaa4-Sep-09 2:58
prithaa4-Sep-09 2:58 
AnswerRe: To get the Cursor position Pin
Iain Clarke, Warrior Programmer4-Sep-09 3:05
Iain Clarke, Warrior Programmer4-Sep-09 3:05 
AnswerRe: To get the Cursor position Pin
Cedric Moonen4-Sep-09 3:08
Cedric Moonen4-Sep-09 3:08 
GeneralRe: To get the Cursor position Pin
prithaa4-Sep-09 3:13
prithaa4-Sep-09 3:13 
GeneralRe: To get the Cursor position Pin
prithaa4-Sep-09 23:57
prithaa4-Sep-09 23:57 
Hello,

I am writing my question here since it was a continuation of the earlier question.

I found that there is no function CharFromPos() in CRichEditCtrl but I used the notification WM_CHARFROMPOS and got the character position.


I have a n CRichEditCtrl boxes on screen but not all boxes show the character position as 1 when the box receives focus.But actually the character position is 1. The following is the code in the OnSetFocus() of the class derived from CRichEditCtrl.

void CRICH::OnSetFocus(CWnd* pOldWnd)
{
CPoint CharPoint ;
CharPoint = GetCaretPos();
POINTL A; A.x = CharPoint.x; A.y = CharPoint.y;
int result = SendMessage(EM_CHARFROMPOS,(WPARAM)0,(LPARAM)
&A);
int charpos = LOWORD(result);
CRichEditCtrl::OnSetFocus(pOldWnd);
}

What must be the problem ?

Thanks for your guidance
Pritha
QuestionUsing a static library (.a) build with gcc Pin
KNSetting4-Sep-09 2:00
KNSetting4-Sep-09 2:00 
AnswerRe: Using a static library (.a) build with gcc Pin
Stuart Dootson4-Sep-09 2:35
professionalStuart Dootson4-Sep-09 2:35 
AnswerRe: Using a static library (.a) build with gcc Pin
KNSetting4-Sep-09 6:59
KNSetting4-Sep-09 6:59 
GeneralRe: Using a static library (.a) build with gcc Pin
Stuart Dootson4-Sep-09 8:52
professionalStuart Dootson4-Sep-09 8:52 
GeneralRe: Using a static library (.a) build with gcc Pin
KNSetting8-Sep-09 1:29
KNSetting8-Sep-09 1:29 
Questionconverting if else ladder Pin
hrishiS4-Sep-09 1:32
hrishiS4-Sep-09 1:32 
AnswerRe: converting if else Pin
David Crow4-Sep-09 2:13
David Crow4-Sep-09 2:13 
GeneralRe: converting if else Pin
hrishiS4-Sep-09 2:22
hrishiS4-Sep-09 2:22 
QuestionRe: converting if else Pin
David Crow4-Sep-09 3:13
David Crow4-Sep-09 3:13 
GeneralRe: converting if else Pin
Iain Clarke, Warrior Programmer4-Sep-09 3:14
Iain Clarke, Warrior Programmer4-Sep-09 3:14 
GeneralRe: converting if else Pin
bob169724-Sep-09 4:17
bob169724-Sep-09 4:17 
AnswerRe: converting if else ladder Pin
Joe Woodbury4-Sep-09 8:22
professionalJoe Woodbury4-Sep-09 8:22 
Generalmemory leaks Pin
Agavriloaie Constantin3-Sep-09 23:06
Agavriloaie Constantin3-Sep-09 23:06 
GeneralRe: memory leaks Pin
iraclyKv4-Sep-09 2:13
iraclyKv4-Sep-09 2:13 
GeneralRe: memory leaks Pin
Agavriloaie Constantin4-Sep-09 3:29
Agavriloaie Constantin4-Sep-09 3:29 
GeneralRe: memory leaks Pin
David Crow4-Sep-09 2:17
David Crow4-Sep-09 2:17 
GeneralRe: memory leaks Pin
Agavriloaie Constantin4-Sep-09 3:25
Agavriloaie Constantin4-Sep-09 3:25 

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.