Click here to Skip to main content
15,892,059 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: mail attachment Pin
Alexander M.,21-Jul-05 1:25
Alexander M.,21-Jul-05 1:25 
GeneralRe: mail attachment Pin
David Crow21-Jul-05 3:08
David Crow21-Jul-05 3:08 
GeneralPassing Data Around Custom Draw Message Handler Pin
yccheok20-Jul-05 22:55
yccheok20-Jul-05 22:55 
GeneralRe: Passing Data Around Custom Draw Message Handler Pin
Blake Miller21-Jul-05 4:53
Blake Miller21-Jul-05 4:53 
GeneralCompile program C++ by Visual C++.NET Pin
SAKURAVN20-Jul-05 22:50
SAKURAVN20-Jul-05 22:50 
GeneralCListCtrl Pin
ditty grail20-Jul-05 22:49
ditty grail20-Jul-05 22:49 
GeneralRe: CListCtrl Pin
Jetli Jerry20-Jul-05 23:37
Jetli Jerry20-Jul-05 23:37 
GeneralNeed Help to Resolve the Problem in Hit test Pin
SivaramanDhamodharan20-Jul-05 22:14
SivaramanDhamodharan20-Jul-05 22:14 
Hi,

The situation:
* Using a Window with the Scroll bar capabilities.
* The mapping mode is MM_HIMETRIC.
* Just drawn a Circle in the View using OnDraw()
* Handled MouseLeft button click to perform the hit test.

I know that:
* Mouse Co-ordinates are device co-ordinate system (in pixel)
* The circle drawn is in the Logical Co ordinate

My Doubt:
The following code does't work WTF | :WTF: . Why?OMG | :OMG: What is wrong with me. I have tested it after converting the point into Logical point.


Code:

void CEX04CView::OnLButtonDown(UINT nFlags, CPoint point) <br />
{<br />
// TODO: Add your message handler code here and/or call default<br />
CClientDC dc(this);<br />
	OnPrepareDC(&dc);<br />
	CRect rectDevice = m_rectEllipse;<br />
	dc.DPtoLP(& point);<br />
	if (rectDevice.PtInRect(point)) <br />
{<br />
		if (m_nColor == GRAY_BRUSH)<br />
			m_nColor = WHITE_BRUSH;<br />
		else<br />
			m_nColor = GRAY_BRUSH;<br />
		InvalidateRect(rectDevice);<br />
	}<br />
CScrollView::OnLButtonDown(nFlags, point);<br />
}


Thanks in advance for the Valuable help!Rose | [Rose]
GeneralRe: Need Help to Resolve the Problem in Hit test Pin
Jose Lamas Rios21-Jul-05 3:12
Jose Lamas Rios21-Jul-05 3:12 
GeneralRe: Need Help to Resolve the Problem in Hit test Pin
John R. Shaw21-Jul-05 6:32
John R. Shaw21-Jul-05 6:32 
GeneralRe: Need Help to Resolve the Problem in Hit test Pin
SivaramanDhamodharan21-Jul-05 20:57
SivaramanDhamodharan21-Jul-05 20:57 
Generaltrouble in inserting data to tree control Pin
firebolt7720-Jul-05 21:47
firebolt7720-Jul-05 21:47 
GeneralRe: trouble in inserting data to tree control Pin
Marc Soleda20-Jul-05 22:29
Marc Soleda20-Jul-05 22:29 
GeneralRe: trouble in inserting data to tree control Pin
David Crow21-Jul-05 3:07
David Crow21-Jul-05 3:07 
GeneralRe: trouble in inserting data to tree control Pin
firebolt7721-Jul-05 15:32
firebolt7721-Jul-05 15:32 
GeneralRe: trouble in inserting data to tree control Pin
David Crow22-Jul-05 2:37
David Crow22-Jul-05 2:37 
GeneralRe: trouble in inserting data to tree control Pin
firebolt7724-Jul-05 15:51
firebolt7724-Jul-05 15:51 
GeneralRe: trouble in inserting data to tree control Pin
David Crow25-Jul-05 2:44
David Crow25-Jul-05 2:44 
GeneralRe: trouble in inserting data to tree control Pin
firebolt7725-Jul-05 15:24
firebolt7725-Jul-05 15:24 
GeneralRe: trouble in inserting data to tree control Pin
David Crow25-Jul-05 16:50
David Crow25-Jul-05 16:50 
GeneralRe: trouble in inserting data to tree control Pin
firebolt7725-Jul-05 17:05
firebolt7725-Jul-05 17:05 
GeneralRe: trouble in inserting data to tree control Pin
David Crow26-Jul-05 2:31
David Crow26-Jul-05 2:31 
GeneralUser Management Pin
sunit520-Jul-05 21:35
sunit520-Jul-05 21:35 
GeneralRe: User Management Pin
David Crow21-Jul-05 3:10
David Crow21-Jul-05 3:10 
GeneralRe: User Management Pin
sunit521-Jul-05 4:24
sunit521-Jul-05 4:24 

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.