Click here to Skip to main content
16,016,168 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionColorspace Conversion: RGB to YUY2 Pin
Dan McCormick31-Oct-06 7:58
Dan McCormick31-Oct-06 7:58 
QuestionDifference between C++ and Visual C++ Pin
Mitesh Jain31-Oct-06 7:48
Mitesh Jain31-Oct-06 7:48 
AnswerRe: Difference between C++ and Visual C++ Pin
Hamid_RT31-Oct-06 8:10
Hamid_RT31-Oct-06 8:10 
Questionsdi: multiple frames within a view Pin
b_e_n_8231-Oct-06 7:12
b_e_n_8231-Oct-06 7:12 
AnswerRe: sdi: multiple frames within a view Pin
Mark Salsbery31-Oct-06 9:11
Mark Salsbery31-Oct-06 9:11 
GeneralRe: sdi: multiple frames within a view Pin
b_e_n_8231-Oct-06 9:53
b_e_n_8231-Oct-06 9:53 
AnswerAddition: sdi: multiple frames within a view Pin
b_e_n_8231-Oct-06 23:00
b_e_n_8231-Oct-06 23:00 
QuestionHelp! print issue Pin
hongmuer31-Oct-06 5:59
hongmuer31-Oct-06 5:59 
Hi everyone,
I made a program which can draw some graphs using memory device, now I wanna print the graph. Unfortunately what I did doesnt work! In print preview, the graph is reversed and the size can't be controled which means the graph is not magnified proportionally.
could you please tell me how can I make it? Thank you very much and look forward to hearing from you!

In OnDraw function, I coded as follow:
void CMyView::OnDraw(CDC* pDC)<br />
{<br />
<pre><br />
        CMyDoc* pDoc = GetDocument();<br />
	ASSERT_VALID(pDoc);<br />
	// TODO: add draw code for native data here<br />
	CBitmap* pOldBitmap = m_pMemDC->SelectObject(m_pBitmap);<br />
<br />
	if(pDC->IsPrinting())<br />
	{<br />
		pDC->SetMapMode(MM_LOENGLISH);<br />
		pDC->StretchBlt(0,-950,pDC->GetDeviceCaps(LOGPIXELSX),pDC->GetDeviceCaps <br />
                       (LOGPIXELSY),m_pMemDC, 0,0, 6*m_nMaxX/5,m_nMaxY,SRCCOPY);<br />
<br />
	}<br />
	else<br />
		pDC->BitBlt(0,0,m_nMaxX,m_nMaxY, m_pMemDC,0,0,SRCCOPY);<br />
<br />
	m_pMemDC->SelectObject(pOldBitmap);<br />
</pre>	}<br />


where,
m_nMaxX = GetSystemMetrics(SM_CXSCREEN);
m_nMaxY = GetSystemMetrics(SM_CYSCREEN);

used for defining the boudary of drawing
AnswerRe: Help! print issue Pin
bob1697231-Oct-06 6:52
bob1697231-Oct-06 6:52 
GeneralRe: Help! print issue Pin
hongmuer31-Oct-06 7:50
hongmuer31-Oct-06 7:50 
GeneralRe: Help! print issue Pin
bob1697231-Oct-06 8:31
bob1697231-Oct-06 8:31 
GeneralRe: Help! print issue Pin
bob1697231-Oct-06 10:56
bob1697231-Oct-06 10:56 
GeneralRe: Help! print issue Pin
hongmuer1-Nov-06 15:50
hongmuer1-Nov-06 15:50 
GeneralRe: Help! print issue Pin
hongmuer1-Nov-06 16:30
hongmuer1-Nov-06 16:30 
GeneralRe: Help! print issue Pin
bob1697210-Nov-06 19:26
bob1697210-Nov-06 19:26 
QuestionVC++ MSN Client [modified] Pin
priyank_ldce31-Oct-06 5:40
priyank_ldce31-Oct-06 5:40 
AnswerRe: VC++ MSN Client Pin
Mark Salsbery31-Oct-06 5:49
Mark Salsbery31-Oct-06 5:49 
GeneralRe: VC++ MSN Client Pin
priyank_ldce31-Oct-06 5:57
priyank_ldce31-Oct-06 5:57 
QuestionMmm n00b question about File I/O Pin
Anthony Mushrow31-Oct-06 5:19
professionalAnthony Mushrow31-Oct-06 5:19 
AnswerRe: Mmm n00b question about File I/O Pin
David Crow31-Oct-06 5:23
David Crow31-Oct-06 5:23 
GeneralRe: Mmm n00b question about File I/O Pin
Anthony Mushrow31-Oct-06 6:31
professionalAnthony Mushrow31-Oct-06 6:31 
AnswerRe: Mmm n00b question about File I/O Pin
toxcct31-Oct-06 5:25
toxcct31-Oct-06 5:25 
QuestionHelp!(something about the pointer) Pin
wanlim081731-Oct-06 5:18
wanlim081731-Oct-06 5:18 
AnswerRe: Help!(something about the pointer) Pin
Anthony Mushrow31-Oct-06 5:22
professionalAnthony Mushrow31-Oct-06 5:22 
AnswerRe: Help!(something about the pointer) [modified] Pin
toxcct31-Oct-06 5:33
toxcct31-Oct-06 5:33 

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.