Click here to Skip to main content
15,918,808 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to get Actual CFormView Size - MFC Vs2010 Pin
Richard MacCutchan13-Aug-11 22:32
mveRichard MacCutchan13-Aug-11 22:32 
AnswerRe: How to get Actual CFormView Size - MFC Vs2010 Pin
«_Superman_»13-Aug-11 8:48
professional«_Superman_»13-Aug-11 8:48 
GeneralRe: How to get Actual CFormView Size - MFC Vs2010 Pin
UrbanBlues13-Aug-11 22:20
UrbanBlues13-Aug-11 22:20 
QuestionHeap corruption - maybe you can see more than me [modified] Pin
blackshadow313-Aug-11 3:19
blackshadow313-Aug-11 3:19 
QuestionCannot Interact with service using SERVICE_USER_DEFINED_CONTROL [SOLVED] Pin
vishalgpt13-Aug-11 2:16
vishalgpt13-Aug-11 2:16 
AnswerRe: Cannot Interact with service using SERVICE_USER_DEFINED_CONTROL Pin
Richard MacCutchan13-Aug-11 2:21
mveRichard MacCutchan13-Aug-11 2:21 
GeneralRe: Cannot Interact with service using SERVICE_USER_DEFINED_CONTROL Pin
vishalgpt13-Aug-11 2:40
vishalgpt13-Aug-11 2:40 
GeneralRe: Cannot Interact with service using SERVICE_USER_DEFINED_CONTROL Pin
Richard MacCutchan13-Aug-11 4:36
mveRichard MacCutchan13-Aug-11 4:36 
GeneralRe: Cannot Interact with service using SERVICE_USER_DEFINED_CONTROL Pin
vishalgpt13-Aug-11 4:59
vishalgpt13-Aug-11 4:59 
GeneralRe: Cannot Interact with service using SERVICE_USER_DEFINED_CONTROL Pin
Richard MacCutchan13-Aug-11 5:56
mveRichard MacCutchan13-Aug-11 5:56 
GeneralRe: Cannot Interact with service using SERVICE_USER_DEFINED_CONTROL Pin
vishalgpt13-Aug-11 14:30
vishalgpt13-Aug-11 14:30 
AnswerRe: Cannot Interact with service using SERVICE_USER_DEFINED_CONTROL Pin
vishalgpt13-Aug-11 16:09
vishalgpt13-Aug-11 16:09 
GeneralRe: Cannot Interact with service using SERVICE_USER_DEFINED_CONTROL[SOLVED] Pin
vishalgpt13-Aug-11 16:04
vishalgpt13-Aug-11 16:04 
QuestionBitmap on Picture Control Pin
manju 312-Aug-11 21:18
manju 312-Aug-11 21:18 
Hi all,
I am taking a picture control on the dialog.In Properties I am taking a Bitmap Image on the dialog.
I am planning to drag and drop the bitmap image to other location.But i am not able to.
I am able to get the MouseMovements(x axis,y axis),where in ,i am changing the cursor when the mouse is on the
bitmap image as shown in below function.
Please find the below code,which i am trying.
Please let me know what to do

void CLoadImageDlg::OnMouseMove(UINT nFlags, CPoint point)
{
	// TODO: Add your message handler code here and/or call default
	HWND hwnd;
	CString str_mousemove;
	POINT p;		
	long int xp,yp,i;
	int lParam;
	i=3;
	GetCursorPos(&p);
	xp=p.x;
	yp=p.y;
	str_mousemove.Format(_T("x = %d,y=%d"),xp,yp);	
	CPoint ptHotSpot(500,600); 
	if((xp>507 && xp <696) && (yp>460 && yp<569))
	{
		SetCapture();
		m_bCaptured=TRUE;
		CPoint pointTopLeft(507);		
		m_sizeOffset = point - pointTopLeft;
		::SetCursor(::LoadCursor(NULL, IDC_HAND));		
	}
	if((xp<507 ||xp >696) || (yp<460 || yp>569))
	{		
		ReleaseCapture();			
	}
	
	CDialog::OnMouseMove(nFlags, point);
}
void CLoadImageDlg::OnLButtonDown(UINT nFlags, CPoint point)
{
	// TODO: Add your message handler code here and/or call default  
	CString str_mousemove1;	
	POINT p;
	CDC dcMem; //current device context	
	int xp,yp;
	GetCursorPos(&p);
	xp=p.x;
	yp=p.y;
	str_mousemove1.Format(_T("x = %d,y=%d"),xp,yp);	
	if((xp>507 && xp <696) && (yp>460 && yp<569))
	{
		SetCapture();
		m_bCaptured=TRUE;
		CPoint pointTopLeft(507);	
		m_sizeOffset = point - pointTopLeft;
		::SetCursor(::LoadCursor(NULL, IDC_HAND));
		
	}

	CDialog::OnLButtonDown(nFlags, point);
}


Can anyone please help me,how can i drag the image and drop to other location in the same dialog

Thanks in Advance

Thanks
Sharan
AnswerRe: Bitmap on Picture Control Pin
Richard MacCutchan13-Aug-11 0:43
mveRichard MacCutchan13-Aug-11 0:43 
QuestionRe-intilize stack pointer Pin
ForNow12-Aug-11 9:41
ForNow12-Aug-11 9:41 
AnswerRe: Re-intilize stack pointer Pin
MicroVirus12-Aug-11 10:42
MicroVirus12-Aug-11 10:42 
AnswerRe: Re-intilize stack pointer Pin
Richard MacCutchan12-Aug-11 23:00
mveRichard MacCutchan12-Aug-11 23:00 
QuestionAbout wWinMainCRTStartup. Can anybody tell me what it exactly is? How does it work? Pin
frankgt4012-Aug-11 7:31
frankgt4012-Aug-11 7:31 
AnswerRe: About wWinMainCRTStartup. Can anybody tell me what it exactly is? How does it work? Pin
Maximilien12-Aug-11 8:01
Maximilien12-Aug-11 8:01 
GeneralRe: About wWinMainCRTStartup. Can anybody tell me what it exactly is? How does it work? Pin
frankgt4012-Aug-11 16:56
frankgt4012-Aug-11 16:56 
AnswerRe: About wWinMainCRTStartup. Can anybody tell me what it exactly is? How does it work? Pin
MicroVirus12-Aug-11 8:25
MicroVirus12-Aug-11 8:25 
GeneralRe: About wWinMainCRTStartup. Can anybody tell me what it exactly is? How does it work? Pin
frankgt4013-Aug-11 5:17
frankgt4013-Aug-11 5:17 
AnswerRe: About wWinMainCRTStartup. Can anybody tell me what it exactly is? How does it work? Pin
Emilio Garavaglia13-Aug-11 5:07
Emilio Garavaglia13-Aug-11 5:07 
GeneralRe: About wWinMainCRTStartup. Can anybody tell me what it exactly is? How does it work? Pin
frankgt4013-Aug-11 5:26
frankgt4013-Aug-11 5:26 

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.