Originally posted by: Tom
I creating a simple app for my own, but i have very big problem to show a graphics cursor.My app is SDI type, I want to show mouse (graphics - not text) cursor position in a status bar. Is there any truly programmer?? very thanx
ReplyOriginally posted by: surumoradiya
how i can attach status bar with the dialog box ?
Reply
Originally posted by: Jin Ki Byung
I solved the problem in MDI.
This code is that.
CRichEditCtrl& rRich = GetRichEditCtrl();
nLineNum = rRich.LineFromChar ( nSelStart );
strCurPos.Format ( "Ln %d, Col %d", nLineNum+1, nColNum+1 );
pCmdUI->SetText ( strCurPos );
return;
This function is including in MDI child view class.
Hi~
void CMyMDIChildView::OnUpdateIndicatorPosition(CCmdUI* pCmdUI)
{
CString strCurPos;
long nLineNum, nColNum;
long nSelStart, nSelEnd;
rRich.GetSel ( nSelStart, nSelEnd );
nColNum = nSelStart - rRich.LineIndex ( nLineNum );
}
Originally posted by: Y.F. Hao
With the mouse moving, the status bar display the corresponding coordinations. hehe. It is nice codes.
ReplyOriginally posted by: asmodia
Hi,
can you or any send me the complete MDI Projekt?
please.
by
asmodia
ReplyOriginally posted by: Ted
void CChildFrame::OnUpdateCurPos( CCmdUI *pCmdUI )
if (pView != NULL)
Add the ID_INDICATOR_??? to the CMainFrame class.
Add the handler to the CChildFrame class.
{
CEditView *pView = (CEditView *)GetActiveView();
{
() + 1 );
pCmdUI->SetText( txt );
}
}
Originally posted by: lynda
Hi i'm lynda.
I did the same method than shown in your example, but the pane indicates always "Ln %d, Col %d" wherever the cursor is located.
Thanks for any suggestions!!
Originally posted by: SM
this technic is that wanted technic^^
good!!^^
good!!^^
good!!^^
Reply
Originally posted by: bn37_
What does "you're going to have to get a pointer to the edit control in the view" mean?
I followed the directions, but came up with errors.
ReplyOriginally posted by: Alessandro
I can't use this code with my MDI editor, it gives me an access violation. Any suggestion? thanx
Reply