Click here to Skip to main content
15,914,071 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionCRichEditCtrl getting word from point? Pin
harsha_123427-Jul-06 20:25
harsha_123427-Jul-06 20:25 
AnswerRe: CRichEditCtrl getting word from point? Pin
Naveen27-Jul-06 20:32
Naveen27-Jul-06 20:32 
AnswerRe: CRichEditCtrl getting word from point? Pin
_AnsHUMAN_ 27-Jul-06 20:38
_AnsHUMAN_ 27-Jul-06 20:38 
GeneralRe: CRichEditCtrl getting word from point? Pin
harsha_123427-Jul-06 20:49
harsha_123427-Jul-06 20:49 
GeneralRe: CRichEditCtrl getting word from point? Pin
_AnsHUMAN_ 27-Jul-06 20:53
_AnsHUMAN_ 27-Jul-06 20:53 
GeneralRe: CRichEditCtrl getting word from point? Pin
harsha_123427-Jul-06 21:15
harsha_123427-Jul-06 21:15 
GeneralRe: CRichEditCtrl getting word from point? Pin
Hamid_RT27-Jul-06 21:00
Hamid_RT27-Jul-06 21:00 
GeneralRe: CRichEditCtrl getting word from point? Pin
harsha_123427-Jul-06 21:06
harsha_123427-Jul-06 21:06 
i will give you class definition

class CMyRichEdit : public CRichEditCtrl
{
// Construction
public:
CMyRichEdit();

// Attributes
public:

// Operations
public:

// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CMyRichEdit)
//}}AFX_VIRTUAL

// Implementation
public:
virtual ~CMyRichEdit();

// Generated message map functions
protected:
//{{AFX_MSG(CMyRichEdit)
afx_msg void OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
afx_msg BOOL OnMouseWheel(UINT nFlags, short zDelta, CPoint pt);
afx_msg void OnChar(UINT nChar, UINT nRepCnt, UINT nFlags);
afx_msg void OnKeyUp(UINT nChar, UINT nRepCnt, UINT nFlags);
afx_msg void OnChange();
afx_msg void OnMouseMove(UINT nFlags, CPoint point);
//}}AFX_MSG

DECLARE_MESSAGE_MAP()
};



void CMyRichEdit::OnMouseMove(UINT nFlags, CPoint point)
{
//int i=CharFromPos(point);// gives error
int i = SendMessage(EM_CHARFROMPOS,0,MAKELPARAM(point.x,point.y));
SetSel (i,i+3);
char *mySel=new char[100];
GetSelText (mySel);
AfxMessageBox(mySel);
delete[] mySel;
CRichEditCtrl::OnMouseMove(nFlags, point);
}


both fails


GeneralRe: CRichEditCtrl getting word from point? Pin
Hamid_RT27-Jul-06 21:17
Hamid_RT27-Jul-06 21:17 
GeneralRe: CRichEditCtrl getting word from point? Pin
harsha_123427-Jul-06 21:23
harsha_123427-Jul-06 21:23 
GeneralRe: CRichEditCtrl getting word from point? Pin
Hamid_RT27-Jul-06 21:30
Hamid_RT27-Jul-06 21:30 
GeneralRe: CRichEditCtrl getting word from point? Pin
_AnsHUMAN_ 28-Jul-06 0:20
_AnsHUMAN_ 28-Jul-06 0:20 
GeneralRe: CRichEditCtrl getting word from point? Pin
harsha_123427-Jul-06 20:59
harsha_123427-Jul-06 20:59 
QuestionHow to do video streaming wiht C++ Pin
huutribk200127-Jul-06 20:06
huutribk200127-Jul-06 20:06 
AnswerRe: How to do video streaming wiht C++ Pin
Jonathan [Darka]27-Jul-06 23:34
professionalJonathan [Darka]27-Jul-06 23:34 
QuestionWin32 API tp get the day of the week Pin
kk_mfc27-Jul-06 19:57
kk_mfc27-Jul-06 19:57 
AnswerRe: Win32 API tp get the day of the week Pin
Parthi_Appu27-Jul-06 20:05
Parthi_Appu27-Jul-06 20:05 
AnswerRe: Win32 API tp get the day of the week Pin
Steve Echols27-Jul-06 20:07
Steve Echols27-Jul-06 20:07 
AnswerRe: Win32 API tp get the day of the week Pin
kk_mfc27-Jul-06 20:22
kk_mfc27-Jul-06 20:22 
AnswerRe: Win32 API tp get the day of the week Pin
Hamid_RT27-Jul-06 20:58
Hamid_RT27-Jul-06 20:58 
QuestionA2W conversions Pin
sheshidar27-Jul-06 19:53
sheshidar27-Jul-06 19:53 
AnswerRe: A2W conversions Pin
Parthi_Appu27-Jul-06 19:59
Parthi_Appu27-Jul-06 19:59 
QuestionError Pin
Ganesh_T27-Jul-06 19:48
Ganesh_T27-Jul-06 19:48 
AnswerRe: Error Pin
Jonathan [Darka]27-Jul-06 23:35
professionalJonathan [Darka]27-Jul-06 23:35 
QuestionAn ISSUE MSMQ Processing Pin
Killer327-Jul-06 19:42
Killer327-Jul-06 19:42 

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.