Click here to Skip to main content
15,890,512 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionTo fix the first column of CListView grid type control in MFC Pin
sma123#2-May-14 7:35
sma123#2-May-14 7:35 
QuestionRe: To fix the first column of CListView grid type control in MFC Pin
David Crow5-May-14 7:04
David Crow5-May-14 7:04 
AnswerRe: To fix the first column of CListView grid type control in MFC Pin
sma123#6-May-14 1:42
sma123#6-May-14 1:42 
SuggestionRe: To fix the first column of CListView grid type control in MFC Pin
David Crow6-May-14 5:08
David Crow6-May-14 5:08 
AnswerRe: To fix the first column of CListView grid type control in MFC Pin
Richard MacCutchan5-May-14 20:23
mveRichard MacCutchan5-May-14 20:23 
QuestionHow to get cursor position in status bar? Pin
Vladislav Gospodinov2-May-14 2:36
Vladislav Gospodinov2-May-14 2:36 
QuestionRe: How to get cursor position in status bar? Pin
David Crow2-May-14 2:50
David Crow2-May-14 2:50 
AnswerRe: How to get cursor position in status bar? Pin
Vladislav Gospodinov2-May-14 3:24
Vladislav Gospodinov2-May-14 3:24 
Well that is the problem :P I've added SetCapture() when you press LButton, but I'm not rly sure if I need it?

C++
void CMainFrame::OnLButtonDown(UINT nFlags, CPoint point)
{
	// TODO: Add your message handler code here and/or call default
	SetCapture();
	CFrameWnd::OnLButtonDown(nFlags, point);
}


void CMainFrame::OnMouseMove(UINT nFlags, CPoint point)
{
	// TODO: Add your message handler code here and/or call default
	if(GetCapture()==this){
		posX=point.x;
		posY=point.y;
	}
	CFrameWnd::OnMouseMove(nFlags, point);
}

void CMainFrame::OnUpdateCursor(CCmdUI *pCmdUI){
	CString pos;
	pos.Format(ID_INDICATOR_CURSOR,posX,posY);
	m_wndStatusBar.SetPaneText(m_wndStatusBar.CommandToIndex(ID_INDICATOR_CURSOR),pos);
}


Well atleast now the sting is updated with 0's. Its defined as " x: %d ,y: %d ". So the OnUpdateCursor() is working but not with the right values...
QuestionRe: How to get cursor position in status bar? Pin
jeron12-May-14 4:20
jeron12-May-14 4:20 
AnswerRe: How to get cursor position in status bar? Pin
Vladislav Gospodinov2-May-14 5:08
Vladislav Gospodinov2-May-14 5:08 
QuestionRe: How to get cursor position in status bar? Pin
jeron12-May-14 5:15
jeron12-May-14 5:15 
AnswerRe: How to get cursor position in status bar? Pin
Vladislav Gospodinov2-May-14 5:21
Vladislav Gospodinov2-May-14 5:21 
GeneralRe: How to get cursor position in status bar? Pin
jeron12-May-14 5:43
jeron12-May-14 5:43 
QuestionRe: How to get cursor position in status bar? Pin
David Crow2-May-14 5:46
David Crow2-May-14 5:46 
AnswerRe: How to get cursor position in status bar? Pin
Vladislav Gospodinov2-May-14 5:59
Vladislav Gospodinov2-May-14 5:59 
AnswerRe: How to get cursor position in status bar? Pin
David Crow2-May-14 7:26
David Crow2-May-14 7:26 
GeneralRe: How to get cursor position in status bar? Pin
Vladislav Gospodinov3-May-14 7:30
Vladislav Gospodinov3-May-14 7:30 
AnswerRe: It is with CDialog::OnMouseMove(nFlags, point) Pin
Software_Developer2-May-14 7:16
Software_Developer2-May-14 7:16 
QuestionEmbedded C Pin
C-P-User-31-May-14 17:10
C-P-User-31-May-14 17:10 
AnswerRe: Embedded C Pin
Richard Andrew x641-May-14 20:14
professionalRichard Andrew x641-May-14 20:14 
GeneralRe: Embedded C Pin
C-P-User-32-May-14 1:27
C-P-User-32-May-14 1:27 
GeneralRe: Embedded C Pin
C-P-User-32-May-14 1:40
C-P-User-32-May-14 1:40 
GeneralRe: Embedded C Pin
C-P-User-32-May-14 1:44
C-P-User-32-May-14 1:44 
GeneralRe: Embedded C Pin
jeron12-May-14 5:03
jeron12-May-14 5:03 
GeneralRe: Embedded C Pin
C-P-User-32-May-14 5:06
C-P-User-32-May-14 5:06 

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.