Click here to Skip to main content
12,360,037 members (61,151 online)

C / C++ / MFC

 
AnswerRe: System message processing in MFC - basic question. Pin
Albert Holguin5-Dec-12 10:29
memberAlbert Holguin5-Dec-12 10:29 
QuestionDbt.h - symbol not defined? Pin
Vaclav_Sal5-Dec-12 5:07
memberVaclav_Sal5-Dec-12 5:07 
AnswerRe: Dbt.h - symbol not defined? Pin
Richard MacCutchan5-Dec-12 5:30
mvpRichard MacCutchan5-Dec-12 5:30 
AnswerRe: Dbt.h - symbol not defined? Pin
Jochen Arndt5-Dec-12 6:06
memberJochen Arndt5-Dec-12 6:06 
GeneralSOLVED Dbt.h - symbol not defined? Pin
Vaclav_Sal5-Dec-12 7:33
memberVaclav_Sal5-Dec-12 7:33 
GeneralRe: SOLVED Dbt.h - symbol not defined? Pin
Jochen Arndt5-Dec-12 21:46
memberJochen Arndt5-Dec-12 21:46 
GeneralRe: SOLVED Dbt.h - symbol not defined? Pin
Vaclav_Sal6-Dec-12 3:28
memberVaclav_Sal6-Dec-12 3:28 
GeneralRe: SOLVED Dbt.h - symbol not defined? Pin
Jochen Arndt6-Dec-12 3:50
memberJochen Arndt6-Dec-12 3:50 
GeneralRe: SOLVED Dbt.h - symbol not defined? Pin
Vaclav_Sal7-Dec-12 7:26
memberVaclav_Sal7-Dec-12 7:26 
QuestionImage Processing Algorithms. Pin
mbatra315-Dec-12 0:11
membermbatra315-Dec-12 0:11 
AnswerRe: Image Processing Algorithms. Pin
ThatsAlok5-Dec-12 1:28
memberThatsAlok5-Dec-12 1:28 
AnswerRe: Image Processing Algorithms. Pin
Stefan_Lang6-Dec-12 2:43
memberStefan_Lang6-Dec-12 2:43 
AnswerRe: Image Processing Algorithms. Pin
April Fans22-Dec-12 21:01
memberApril Fans22-Dec-12 21:01 
QuestionMouse procedure On Multiple Window Pin
yogeshs4-Dec-12 18:20
memberyogeshs4-Dec-12 18:20 
Hello friends

MFC application in which I m creating two Ruler bar which contains different color are object of same class rulerWnd. Now, am handling Mouse procedure on rulerWnd[lButtondown,up,mouseMove] are working Fine If i used to drag and drop some color to same ruler bar.

But If i have to drag some color from one ruler bar to another then it is dropping on same ruler. when i drop on other ruler from first then I checked on LbuttonUp that Point values are coming in negative and its dropping on same ruler even if my mouse LButton ups on another.

How can i handle two Windows mouse procedure at same time.
Any Ideas?
here is sample code that I am trying.
OnLButtonDown(UINT nFlags, CPoint point)
{
case SELECT_COPY:
{
  if(m_dwStyle == ruler1|| m_dwStyle == ruler2)
	{
	  GetWindowRect(&rect);
	  ClipCursor(NULL);
	  SetCapture();
	  if(m_szSelectIndexRange.cx>-1 && m_szSelectIndexRange.cy>-1)//When dragging,checking if mouse clicked on selected region
	  {
		int nSelIndex;
	        if(m_dwStyle == ruler1)
		{
			nSelIndex = point.x + m_lScrollPos;
			nSelIndex /= fWarpUnit;
		}
		else
		{
			nSelIndex = m_nSize-(rect.Height()-point.y)-m_lScrollPos;
			nSelIndex /= fWeftUnit;
			}
		if(nSelIndex >= m_szSelectIndexRange.cx && nSelIndex <=     m_szSelectIndexRange.cy)
		{
			m_bSelectDrag = TRUE;
			::SetCursor(AfxGetApp()->LoadCursor(IDC_DRAG_CURSOR));
		}
				}
			}
		}; break;
}
 

 
OnMouseMove(UINT nFlags, CPoint point)
 
case SELECT_COPY:
{
   if(m_bSelectDrag)
   {
	CRect rectWnd, invalidRect;
	GetClientRect(&rectWnd);
	if(m_dwStyle == ruler2)
	{
 	m_lPaintEndPos = point.y;//m_nSize-(rectWnd.Height()-point.y)-m_lScrollPos;
					invalidRect = CRect(0, point.y-50-  (m_szSelectIndexRange.cy-m_szSelectIndexRange.cx)*m_fStep*pDoc->GetZoomValue(), 22, \
						point.y +50);
	}
	else
	{
		m_lPaintEndPos = point.x + m_lScrollPos;
		invalidRect = CRect(m_lPaintEndPos-50, 0, \
		m_lPaintEndPos+50+(m_szSelectIndexRange.cy-m_szSelectIndexRange.cx)*m_fStep*pDoc->GetZoomValue(),	22);
	}
	InvalidateRect(&invalidRect, FALSE);
}
  else	SelectStripe(point);
}; break;
 
OnLButtonUP(UINT nFlags, CPoint point)
case SELECT_COPY:
 ClipCursor(NULL);
 if(m_bSelectDrag)
 {
	CopyStripe(point);
	m_bSelectDrag = FALSE;
 }
 else	SelectStripe(point);
break;

AnswerRe: Mouse procedure On Multiple Window [ setCapture Not Releasing] how to deal with two Windows. Pin
yogeshs4-Dec-12 20:00
memberyogeshs4-Dec-12 20:00 
QuestionAbout set share directory Pin
tida014-Dec-12 16:06
membertida014-Dec-12 16:06 
QuestionHow to create a DLL for mini2440 to run Labview Application Pin
sunil8800894-Dec-12 4:00
membersunil8800894-Dec-12 4:00 
AnswerRe: How to create a DLL for mini2440 to run Labview Application Pin
Richard MacCutchan4-Dec-12 4:36
mvpRichard MacCutchan4-Dec-12 4:36 
GeneralRe: How to create a DLL for mini2440 to run Labview Application Pin
sunil8800894-Dec-12 19:46
membersunil8800894-Dec-12 19:46 
GeneralRe: How to create a DLL for mini2440 to run Labview Application Pin
Richard MacCutchan4-Dec-12 21:17
mvpRichard MacCutchan4-Dec-12 21:17 
QuestionCComboBox for lots and lots of options Pin
Mattias G4-Dec-12 3:09
memberMattias G4-Dec-12 3:09 
AnswerRe: CComboBox for lots and lots of options Pin
Richard MacCutchan4-Dec-12 4:40
mvpRichard MacCutchan4-Dec-12 4:40 
GeneralRe: CComboBox for lots and lots of options Pin
Mattias G4-Dec-12 9:56
memberMattias G4-Dec-12 9:56 
GeneralRe: CComboBox for lots and lots of options Pin
Richard MacCutchan4-Dec-12 21:15
mvpRichard MacCutchan4-Dec-12 21:15 
GeneralRe: CComboBox for lots and lots of options Pin
Rolf Kristensen5-Dec-12 7:13
memberRolf Kristensen5-Dec-12 7:13 
QuestionCString assignment crashes on Windows 7 Pin
pandit843-Dec-12 3:57
memberpandit843-Dec-12 3:57 
SuggestionRe: CString assignment crashes on Windows 7 Pin
DavidCrow3-Dec-12 4:08
memberDavidCrow3-Dec-12 4:08 
AnswerRe: CString assignment crashes on Windows 7 Pin
CPallini3-Dec-12 4:15
mvpCPallini3-Dec-12 4:15 
AnswerRe: CString assignment crashes on Windows 7 Pin
Richard MacCutchan3-Dec-12 5:02
mvpRichard MacCutchan3-Dec-12 5:02 
GeneralRe: CString assignment crashes on Windows 7 Pin
pandit843-Dec-12 5:41
memberpandit843-Dec-12 5:41 
GeneralRe: CString assignment crashes on Windows 7 Pin
Richard MacCutchan3-Dec-12 6:22
mvpRichard MacCutchan3-Dec-12 6:22 
AnswerRe: CString assignment crashes on Windows 7 Pin
Stephen Hewitt4-Dec-12 6:34
memberStephen Hewitt4-Dec-12 6:34 
GeneralRe: CString assignment crashes on Windows 7 Pin
pandit844-Dec-12 19:44
memberpandit844-Dec-12 19:44 
GeneralRe: CString assignment crashes on Windows 7 Pin
Stephen Hewitt5-Dec-12 3:49
memberStephen Hewitt5-Dec-12 3:49 
AnswerRe: CString assignment crashes on Windows 7 Pin
pandit8418-Dec-12 7:48
memberpandit8418-Dec-12 7:48 
GeneralRe: CString assignment crashes on Windows 7 Pin
Stephen Hewitt18-Dec-12 17:44
memberStephen Hewitt18-Dec-12 17:44 
QuestionSegmentation Fault in GTK library files Pin
SrivathsanRaghavan2-Dec-12 19:20
memberSrivathsanRaghavan2-Dec-12 19:20 
AnswerRe: Segmentation Fault in GTK library files Pin
Richard MacCutchan2-Dec-12 21:47
mvpRichard MacCutchan2-Dec-12 21:47 
GeneralRe: Segmentation Fault in GTK library files Pin
SrivathsanRaghavan2-Dec-12 22:11
memberSrivathsanRaghavan2-Dec-12 22:11 
GeneralRe: Segmentation Fault in GTK library files Pin
Richard MacCutchan2-Dec-12 22:28
mvpRichard MacCutchan2-Dec-12 22:28 
GeneralRe: Segmentation Fault in GTK library files Pin
SrivathsanRaghavan3-Dec-12 0:25
memberSrivathsanRaghavan3-Dec-12 0:25 
GeneralRe: Segmentation Fault in GTK library files Pin
Richard MacCutchan3-Dec-12 0:55
mvpRichard MacCutchan3-Dec-12 0:55 
Questioncan i use mem_fun like this? Pin
Falconapollo1-Dec-12 17:37
memberFalconapollo1-Dec-12 17:37 
AnswerRe: can i use mem_fun like this? Pin
Richard MacCutchan1-Dec-12 20:56
mvpRichard MacCutchan1-Dec-12 20:56 
AnswerRe: can i use mem_fun like this? Pin
Stephen Hewitt2-Dec-12 4:45
memberStephen Hewitt2-Dec-12 4:45 
AnswerRe: can i use mem_fun like this? Pin
goumuli2-Dec-12 6:21
groupgoumuli2-Dec-12 6:21 
AnswerRe: can i use mem_fun like this? Pin
Stefan_Lang3-Dec-12 2:14
memberStefan_Lang3-Dec-12 2:14 
AnswerRe: can i use mem_fun like this? Pin
Stefan_Lang3-Dec-12 3:45
memberStefan_Lang3-Dec-12 3:45 
GeneralRe: can i use mem_fun like this? Pin
Falconapollo4-Dec-12 14:43
memberFalconapollo4-Dec-12 14:43 
Questionclient server for running the program Pin
danielsutopo1-Dec-12 15:09
memberdanielsutopo1-Dec-12 15:09 

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.


Advertise | Privacy | Mobile
Web02 | 2.8.160621.1 | Last Updated 1 Jul 2016
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid