Click here to Skip to main content
16,004,919 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Changing background colour of a checkbox Pin
ThatsAlok30-Mar-05 21:51
ThatsAlok30-Mar-05 21:51 
GeneralProblem receiving UDP messages Pin
ilgale30-Mar-05 19:34
ilgale30-Mar-05 19:34 
GeneralDrawing Rectangle and Cirlcle using CDC Pin
wasife30-Mar-05 18:31
wasife30-Mar-05 18:31 
GeneralRe: Drawing Rectangle and Cirlcle using CDC Pin
ThatsAlok30-Mar-05 18:52
ThatsAlok30-Mar-05 18:52 
Questionhow to save MultiDoctemplate Pin
njty_lzy30-Mar-05 18:04
njty_lzy30-Mar-05 18:04 
GeneralGrid Performance Pin
swarnamanoo30-Mar-05 18:03
swarnamanoo30-Mar-05 18:03 
GeneralMoving a Dialogbox Pin
bosfan30-Mar-05 17:45
bosfan30-Mar-05 17:45 
GeneralRe: Moving a Dialogbox Pin
namaskaaram30-Mar-05 18:04
namaskaaram30-Mar-05 18:04 
hmmm.....i had the same prob.....though i can move the dialog where i want to it still doesnt move the way it does as it does in the windows dialog......

well thiz is what i have done.....
sense for the drag of the mouse,whenever the mouse is dragged use the SetWindowPos() function.....

here is the coding i have used in the in OnMouseMove() function......

void CxyzDlg::OnMouseMove(UINT nFlags, CPoint point) 
{
	// TODO: Add your message handler code here and/or call default

	if(m_DragOn==TRUE)
	{
	CPoint point1=point;
	ClientToScreen(&point1);
	this->SetWindowPos(&CWnd::wndTop ,point1.x-473,point1.y-23,0,0, SWP_SHOWWINDOW|SWP_NOSIZE);
	}//end of if(m_DragOn==TRUE)
	
	CDialog::OnMouseMove(nFlags, point);
} 


please note that the m_DragOn is set to ONE on the OnLButtonDown()function and set to zero on the OnLButtonUp() function.....


also note that in the SetWindowPos() function i have changed the value of the x cordinate by 473 and y cordinate by 23(which happenz to make the mouse pointer to point to the center of my dialog)....u will have to set the value accordingly!!!!!

ps:there definitely an another way to do it,but i guess thiz gives a good result as well.....


hope thiz helpz ......


cheerz.....Big Grin | :-D


"faith, hope, love remain, these three.....; but the greatest of these is love" -1 Corinthians 13:13
GeneralRe: Moving a Dialogbox Pin
khan++30-Mar-05 19:59
khan++30-Mar-05 19:59 
GeneralRe: Moving a Dialogbox Pin
bosfan30-Mar-05 20:22
bosfan30-Mar-05 20:22 
GeneralRe: Moving a Dialogbox Pin
ThatsAlok30-Mar-05 22:29
ThatsAlok30-Mar-05 22:29 
GeneralRe: Moving a Dialogbox Pin
bosfan30-Mar-05 23:06
bosfan30-Mar-05 23:06 
GeneralRe: Moving a Dialogbox Pin
Static(x)30-Mar-05 23:29
Static(x)30-Mar-05 23:29 
GeneralRe: Moving a Dialogbox Pin
bosfan31-Mar-05 0:12
bosfan31-Mar-05 0:12 
QuestionHow to view a TIFF file in SDK, it's urgent, please! Pin
SanjaySMK30-Mar-05 17:22
SanjaySMK30-Mar-05 17:22 
GeneralCombo Box dropdown list wont appear Pin
the pink jedi30-Mar-05 16:32
the pink jedi30-Mar-05 16:32 
GeneralRe: Combo Box dropdown list wont appear Pin
namaskaaram30-Mar-05 17:20
namaskaaram30-Mar-05 17:20 
GeneralTool tip problem Pin
lisoft30-Mar-05 15:40
lisoft30-Mar-05 15:40 
GeneralRe: Tool tip problem Pin
Wes Aday31-Mar-05 5:42
professionalWes Aday31-Mar-05 5:42 
GeneralPrint monitoring Pin
momirz30-Mar-05 15:09
momirz30-Mar-05 15:09 
GeneralRe: Print monitoring Pin
NewbieStats30-Mar-05 16:19
NewbieStats30-Mar-05 16:19 
GeneralRe: Print monitoring Pin
Anonymous31-Mar-05 6:10
Anonymous31-Mar-05 6:10 
QuestionHow to add a document to a DocTemplate? Pin
njty_lzy30-Mar-05 14:40
njty_lzy30-Mar-05 14:40 
GeneralAbout MMX/SSE usage in Visual C++ 6.0 Pin
Gbyang30-Mar-05 14:01
Gbyang30-Mar-05 14:01 
GeneralCalling Form from Form Pin
mvtapia30-Mar-05 13:30
mvtapia30-Mar-05 13:30 

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.