Click here to Skip to main content
15,887,485 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
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 
QuestionHow to send/receive raw data to/from USB Pin
Mohammad A Gdeisat24-Sep-07 16:34
Mohammad A Gdeisat24-Sep-07 16:34 
AnswerRe: How to send/receive raw data to/from USB Pin
Cedric Moonen24-Sep-07 20:32
Cedric Moonen24-Sep-07 20:32 
Questionprogram runs and correct results, however, error messagr Pin
mrby12324-Sep-07 11:13
mrby12324-Sep-07 11:13 
AnswerRe: program runs and correct results, however, error messagr Pin
Mark Salsbery24-Sep-07 11:20
Mark Salsbery24-Sep-07 11:20 
GeneralRe: program runs and correct results, however, error messagr Pin
mrby12324-Sep-07 12:06
mrby12324-Sep-07 12:06 
GeneralRe: program runs and correct results, however, error messagr Pin
Mark Salsbery24-Sep-07 12:24
Mark Salsbery24-Sep-07 12:24 
GeneralRe: program runs and correct results, however, error messagr Pin
mrby12324-Sep-07 13:02
mrby12324-Sep-07 13:02 
QuestionRe: program runs and correct results, however, error messagr Pin
Mark Salsbery24-Sep-07 15:19
Mark Salsbery24-Sep-07 15:19 
AnswerRe: program runs and correct results, however, error messagr Pin
mrby12324-Sep-07 16:47
mrby12324-Sep-07 16:47 
GeneralRe: program runs and correct results, however, error messagr Pin
Mark Salsbery24-Sep-07 16:52
Mark Salsbery24-Sep-07 16:52 
Questionwhat kind of search is recommended??? Pin
pblais24-Sep-07 10:51
pblais24-Sep-07 10:51 
AnswerRe: what kind of search is recommended??? Pin
Waldermort24-Sep-07 19:16
Waldermort24-Sep-07 19:16 
GeneralRe: what kind of search is recommended??? Pin
pblais25-Sep-07 4:17
pblais25-Sep-07 4:17 
GeneralRe: what kind of search is recommended??? Pin
Waldermort25-Sep-07 4:40
Waldermort25-Sep-07 4:40 
GeneralRe: what kind of search is recommended??? Pin
pblais25-Sep-07 7:26
pblais25-Sep-07 7:26 
AnswerRe: what kind of search is recommended??? Pin
pblais3-Oct-07 8:50
pblais3-Oct-07 8:50 

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.