Click here to Skip to main content
15,914,014 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralScreen bit depth and fonts Pin
David Chamberlain21-Nov-02 4:04
David Chamberlain21-Nov-02 4:04 
QuestionAdditional resource files? Pin
Jamie Hale21-Nov-02 3:42
Jamie Hale21-Nov-02 3:42 
AnswerRe: Additional resource files? Pin
Navin21-Nov-02 4:18
Navin21-Nov-02 4:18 
GeneralRe: Additional resource files? Pin
Jamie Hale21-Nov-02 4:25
Jamie Hale21-Nov-02 4:25 
GeneralGDI Object Grouping Pin
Kyudos21-Nov-02 3:25
Kyudos21-Nov-02 3:25 
GeneralRe: GDI Object Grouping Pin
Paul M Watt21-Nov-02 8:32
mentorPaul M Watt21-Nov-02 8:32 
GeneralRe: GDI Object Grouping Pin
uwemundry22-Nov-02 18:07
sussuwemundry22-Nov-02 18:07 
GeneralRe: GDI Object Grouping Pin
Kyudos27-Nov-02 2:42
Kyudos27-Nov-02 2:42 
I have the following in my Group class, it is the handler for moving
the edit handles on the bounding unioned rect:

void CDrawGroup::MoveHandleTo(int nHandle, CPoint point, CDrawView* pView)<br />
{<br />
	ASSERT_VALID(this);<br />
<br />
	POSITION pos = m_objects.GetHeadPosition();<br />
<br />
	while (NULL != pos)<br />
	{<br />
		CDrawObj *pObj = m_objects.GetNext(pos);<br />
		if (NULL != pObj)<br />
		{<br />
			CPoint local;<br />
			m_position.NormalizeRect();<br />
			pObj->m_position.NormalizeRect();<br />
<br />
			double x_mult = ((double)(pObj->m_position.right - pObj->m_position.left)) / ((double)(m_position.right - m_position.left));<br />
			double y_mult = ((double)(pObj->m_position.top - pObj->m_position.bottom)) / ((double)(m_position.top - m_position.bottom));<br />
<br />
			local.x = point.x * x_mult;<br />
			local.y = point.y * y_mult;<br />
			<br />
			pObj->MoveHandleTo(nHandle, local, pView);<br />
		}<br />
	}<br />
<br />
	CDrawObj::MoveHandleTo(nHandle, point, pView);<br />
}


I'm trying to MoveHandleTo for each contained group object using the ratio of the original sizes. It isn't working though. Any suggestions?
GeneralALT+ENTER key... Pin
Neha21-Nov-02 3:17
Neha21-Nov-02 3:17 
GeneralRe: ALT+ENTER key... Pin
Fazlul Kabir21-Nov-02 3:57
Fazlul Kabir21-Nov-02 3:57 
GeneralRe: ALT+ENTER key... Pin
Neha21-Nov-02 16:52
Neha21-Nov-02 16:52 
GeneralRe: ALT+ENTER key... Pin
James R. Twine21-Nov-02 17:59
James R. Twine21-Nov-02 17:59 
GeneralMFC Printing Question Pin
Nick Parker21-Nov-02 3:14
protectorNick Parker21-Nov-02 3:14 
GeneralRe: MFC Printing Question Pin
Nitron21-Nov-02 3:36
Nitron21-Nov-02 3:36 
GeneralRe: MFC Printing Question Pin
Nick Parker21-Nov-02 3:45
protectorNick Parker21-Nov-02 3:45 
GeneralRe: MFC Printing Question Pin
Nitron21-Nov-02 3:56
Nitron21-Nov-02 3:56 
GeneralRe: MFC Printing Question Pin
Ravi Bhavnani21-Nov-02 5:26
professionalRavi Bhavnani21-Nov-02 5:26 
GeneralRe: MFC Printing Question Pin
Nitron21-Nov-02 5:32
Nitron21-Nov-02 5:32 
GeneralRe: MFC Printing Question Pin
Joao Vaz21-Nov-02 5:38
Joao Vaz21-Nov-02 5:38 
GeneralRe: MFC Printing Question Pin
Ravi Bhavnani21-Nov-02 6:48
professionalRavi Bhavnani21-Nov-02 6:48 
GeneralRe: MFC Printing Question Pin
Joao Vaz21-Nov-02 7:23
Joao Vaz21-Nov-02 7:23 
GeneralRe: MFC Printing Question Pin
Chad Koehler21-Nov-02 5:40
Chad Koehler21-Nov-02 5:40 
GeneralRe: MFC Printing Question Pin
Ravi Bhavnani21-Nov-02 6:47
professionalRavi Bhavnani21-Nov-02 6:47 
GeneralRe: MFC Printing Question Pin
Joao Vaz21-Nov-02 7:21
Joao Vaz21-Nov-02 7:21 
Generaldebuger can't watch static variable in VC6+SP5 Pin
Alan Wen21-Nov-02 3:04
Alan Wen21-Nov-02 3:04 

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.