Click here to Skip to main content
16,006,475 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHow to embed external document? Pin
Super Lloyd12-Jun-06 19:55
Super Lloyd12-Jun-06 19:55 
Questionhow we can move the bitmap when the mouse dragged Pin
happy_ram12-Jun-06 19:44
happy_ram12-Jun-06 19:44 
AnswerRe: how we can move the bitmap when the mouse dragged Pin
Laxman Auti12-Jun-06 20:16
Laxman Auti12-Jun-06 20:16 
QuestionRe: how we can move the bitmap when the mouse dragged Pin
happy_ram12-Jun-06 20:24
happy_ram12-Jun-06 20:24 
AnswerRe: how we can move the bitmap when the mouse dragged Pin
Justin Tay12-Jun-06 20:22
Justin Tay12-Jun-06 20:22 
GeneralRe: how we can move the bitmap when the mouse dragged Pin
happy_ram12-Jun-06 20:28
happy_ram12-Jun-06 20:28 
GeneralRe: how we can move the bitmap when the mouse dragged [modified] Pin
Justin Tay12-Jun-06 20:55
Justin Tay12-Jun-06 20:55 
Generalhere is my code Pin
happy_ram12-Jun-06 21:24
happy_ram12-Jun-06 21:24 
<br />
void CImageDlg::OnLButtonDown(UINT nFlags, CPoint point) <br />
{<br />
	// TODO: Add your message handler code here and/or call default<br />
 as=true;<br />
<br />
 SetScrollPos(SB_VERT,point.y,true);<br />
SetScrollPos(SB_HORZ,point.x,true);<br />
SetCapture();<br />
<br />
<br />
<br />
	CDialog::OnLButtonDown(nFlags, point);<br />
}<br />
<br />
void CImageDlg::OnLButtonUp(UINT nFlags, CPoint point) <br />
{<br />
	// TODO: Add your message handler code here and/or 	<br />
 ReleaseCapture(); <br />
<br />
as=false;<br />
<br />
	CDialog::OnLButtonUp(nFlags, point);<br />
}<br />
<br />
void CImageDlg::OnMouseMove(UINT nFlags, CPoint point) <br />
{<br />
	// TODO: Add your message handler code here and/or <br />
	<br />
<br />
	if((point.x>=89&&point.x<=363)&&(point.y>=67&&point.y<=271))<br />
SetClassLong(m_hWnd,GCL_HCURSOR,(LONG)LoadCursor(AfxGetInstanceHandle(), MAKEINTRESOURCE(IDC_CURSOR1)));<br />
else<br />
	SetClassLong(m_hWnd,GCL_HCURSOR,(LONG)LoadCursor(AfxGetInstanceHandle(), MAKEINTRESOURCE(IDC_CURSOR2)));<br />
<br />
<br />
<br />
<br />
	if (as==true)<br />
	{<br />
		SetScrollPos(SB_HORZ,point.x,TRUE);<br />
         m_bitmap.SetWindowPos(NULL,<br />
			 -point.x,<br />
			 view.top,<br />
			 0, 0,<br />
			 SWP_NOSIZE | SWP_NOZORDER);<br />
		SetScrollPos(SB_VERT,point.y,TRUE);<br />
		m_bitmap.SetWindowPos(NULL,<br />
			 view.left,<br />
			 -point.y,<br />
			 0, 0,<br />
			 SWP_NOSIZE | SWP_NOZORDER);<br />
	}<br />
		CDialog::OnMouseMove(nFlags, point);<br />
}

GeneralRe: here is my code [modified] Pin
Justin Tay12-Jun-06 21:50
Justin Tay12-Jun-06 21:50 
GeneralRe: here is my code Pin
happy_ram12-Jun-06 22:34
happy_ram12-Jun-06 22:34 
GeneralRe: here is my code Pin
Justin Tay12-Jun-06 22:43
Justin Tay12-Jun-06 22:43 
GeneralRe: here is my code Pin
happy_ram12-Jun-06 22:49
happy_ram12-Jun-06 22:49 
GeneralRe: here is my code Pin
Justin Tay12-Jun-06 23:27
Justin Tay12-Jun-06 23:27 
GeneralRe: here is my code [modified] Pin
happy_ram12-Jun-06 23:45
happy_ram12-Jun-06 23:45 
GeneralRe: here is my code Pin
Justin Tay13-Jun-06 0:37
Justin Tay13-Jun-06 0:37 
GeneralRe: here is my code Pin
happy_ram13-Jun-06 0:45
happy_ram13-Jun-06 0:45 
GeneralRe: here is my code Pin
happy_ram13-Jun-06 1:06
happy_ram13-Jun-06 1:06 
GeneralRe: here is my code Pin
Justin Tay13-Jun-06 3:44
Justin Tay13-Jun-06 3:44 
GeneralRe: here is my code Pin
G Haranadh13-Jun-06 1:19
G Haranadh13-Jun-06 1:19 
GeneralRe: here is my code Pin
happy_ram13-Jun-06 1:23
happy_ram13-Jun-06 1:23 
AnswerRe: how we can move the bitmap when the mouse dragged Pin
khan++12-Jun-06 20:23
khan++12-Jun-06 20:23 
GeneralRe: how we can move the bitmap when the mouse dragged Pin
happy_ram12-Jun-06 20:29
happy_ram12-Jun-06 20:29 
GeneralRe: how we can move the bitmap when the mouse dragged Pin
khan++12-Jun-06 20:37
khan++12-Jun-06 20:37 
GeneralRe: how we can move the bitmap when the mouse dragged Pin
happy_ram12-Jun-06 20:47
happy_ram12-Jun-06 20:47 
GeneralRe: how we can move the bitmap when the mouse dragged Pin
khan++12-Jun-06 20:56
khan++12-Jun-06 20:56 

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.