Click here to Skip to main content
15,904,153 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Opening a web site from VC++ application Pin
Nishad S25-Sep-07 0:14
Nishad S25-Sep-07 0:14 
AnswerRe: Opening a web site from VC++ application Pin
Hamid_RT24-Sep-07 23:01
Hamid_RT24-Sep-07 23:01 
AnswerRe: Opening a web site from VC++ application Pin
p_24-Sep-07 23:14
p_24-Sep-07 23:14 
GeneralRe: Opening a web site from VC++ application Pin
megha_gharote24-Sep-07 23:44
megha_gharote24-Sep-07 23:44 
AnswerRe: Opening a web site from VC++ application Pin
nbugalia24-Sep-07 23:24
nbugalia24-Sep-07 23:24 
GeneralRe: Opening a web site from VC++ application Pin
toxcct24-Sep-07 23:37
toxcct24-Sep-07 23:37 
GeneralRe: Opening a web site from VC++ application Pin
nbugalia25-Sep-07 1:26
nbugalia25-Sep-07 1:26 
GeneralRe: Opening a web site from VC++ application Pin
toxcct25-Sep-07 1:29
toxcct25-Sep-07 1:29 
JokeRe: Opening a web site from VC++ application Pin
Signal-926-Sep-07 15:00
Signal-926-Sep-07 15:00 
QuestionDisplaying mouse position in the view in the status bar Pin
Marimuthu.r24-Sep-07 22:38
Marimuthu.r24-Sep-07 22:38 
AnswerRe: Displaying mouse position in the view in the status bar Pin
Nishad S24-Sep-07 22:55
Nishad S24-Sep-07 22:55 
QuestionScroll bars in ClistCtrl Pin
josip cagalj24-Sep-07 22:12
josip cagalj24-Sep-07 22:12 
AnswerRe: Scroll bars in ClistCtrl Pin
Nishad S24-Sep-07 22:24
Nishad S24-Sep-07 22:24 
GeneralRe: Scroll bars in ClistCtrl Pin
josip cagalj24-Sep-07 23:19
josip cagalj24-Sep-07 23:19 
GeneralRe: Scroll bars in ClistCtrl Pin
Nishad S24-Sep-07 23:34
Nishad S24-Sep-07 23:34 
Questionedit file Pin
nitin324-Sep-07 20:10
nitin324-Sep-07 20:10 
AnswerRe: edit file Pin
Cedric Moonen24-Sep-07 20:27
Cedric Moonen24-Sep-07 20:27 
QuestionADO, C++ database? Please help. Pin
Wamuti24-Sep-07 19:44
Wamuti24-Sep-07 19:44 
AnswerRe: ADO, C++ database? Please help. Pin
Hamid_RT24-Sep-07 20:40
Hamid_RT24-Sep-07 20:40 
GeneralRe: ADO, C++ database? Please help. Pin
Wamuti24-Sep-07 21:03
Wamuti24-Sep-07 21:03 
Questionflexigrid in VC++.net2003 help!!! Pin
manuabhi24-Sep-07 19:09
manuabhi24-Sep-07 19:09 
Questionimage drawing problem Pin
trioum24-Sep-07 19:03
trioum24-Sep-07 19:03 
AnswerRe: image drawing problem Pin
Hamid_RT24-Sep-07 19:22
Hamid_RT24-Sep-07 19:22 
AnswerRe: image drawing problem Pin
Nelek24-Sep-07 21:31
protectorNelek24-Sep-07 21:31 
About the size, use the function in the other answer.

About the movement, you can use those messages (OnMouseDown/Up) to set/reset a bool variable and then change the coordinates of the bitmap while mouse moving. Something like:

BOOL bAllowDragDrop
CPoint m_cpDragOffset;

void CMyView::OnLButtonDown(UINT nFlags, CPoint point) 
{
	cpDragOffset = cpBitmapCoord - point; //This is to have the relative coordinates inside the bitmap while moving

	bAllowDragDrop = TRUE;

	//More code
}

void CMyView::OnLButtonUp(UINT nFlags, CPoint point) 
{
	if (bAllowDragDrop)
	{	cpBitmapCoord = point - cpDragOffset;
		//Save the new coordinates
		bAllowDragDrop = FALSE;
	}

	//More code

	Invalidate ();
	UpdateWindow ();
}



This would not move the bitmap while mouse moving, just take coordinates by downclicking and saving the new ones by upclicking. If you wanna see the movement, insert the OnMouseMove and do the same as by upclicking.

This is a way. Hope it helps





Greetings.

--------
M.D.V.

If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?

Help me to understand what I'm saying, and I'll explain it better to you

Wink | ;)

AnswerRe: image drawing problem Pin
bob1697225-Sep-07 1:42
bob1697225-Sep-07 1: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.