Click here to Skip to main content
15,901,284 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
General3D File viewer Pin
suiram408-Jun-04 10:47
suiram408-Jun-04 10:47 
GeneralRe: 3D File viewer Pin
Vadim Tabakman8-Jun-04 13:31
Vadim Tabakman8-Jun-04 13:31 
GeneralRe: 3D File viewer Pin
Iain Clarke, Warrior Programmer9-Jun-04 5:25
Iain Clarke, Warrior Programmer9-Jun-04 5:25 
GeneralRe: 3D File viewer Pin
Rick York9-Jun-04 11:09
mveRick York9-Jun-04 11:09 
Generalcl.exe Pin
Ni@m8-Jun-04 10:27
Ni@m8-Jun-04 10:27 
GeneralRe: cl.exe Pin
David Crow8-Jun-04 10:35
David Crow8-Jun-04 10:35 
GeneralRe: cl.exe Pin
Ni@m8-Jun-04 10:50
Ni@m8-Jun-04 10:50 
QuestionWindows SetWorldTransform() + Text + Printing bug? Pin
CodeHead8-Jun-04 7:34
CodeHead8-Jun-04 7:34 
I am trying to print what looks like a ruler in mirror image. Using SetWorldTransform, everything works out fine on the display, but when performing print or print-preview, the mirror image text is simply rendered as upside-down rather than mirrored.
Simple testcode follows that simply creates a triangle with the word test.
I've tried different fonts as well. The only way it appears to work correctly outputting to the printer is if you use MM_TEXT mapping.
Any ideas out there?
TIA
Eric

   <br />
void CTransformView::OnDraw(CDC* pDC)<br />
{<br />
   pDC->SetMapMode(MM_LOENGLISH);<br />
   SetGraphicsMode(pDC->m_hDC, GM_ADVANCED);<br />
   XFORM XForm;<br />
   ::ZeroMemory(&XForm, sizeof(XFORM));<br />
   XForm.eM21 = 0;//shear<br />
   XForm.eM12 = 0;//shear<br />
   <br />
   XForm.eM11 = -1;<br />
   XForm.eM22 = 1;<br />
   XForm.eDx = 200;<br />
   XForm.eDy = 0;<br />
   SetWorldTransform(pDC->m_hDC, &XForm);<br />
<br />
   pDC->MoveTo(50, -30);<br />
   pDC->LineTo(160, -10);<br />
   pDC->LineTo(160, -120);<br />
   pDC->LineTo(50, -30);<br />
   pDC->SetTextColor(RGB(0,0,0));<br />
<br />
   CFont num_font_upper;<br />
      num_font_upper.CreatePointFont(4, "Arial");         <br />
   CFont *pFont = pDC->SelectObject(&num_font_upper);<br />
   pDC->TextOut(50,-30, CString("test"));<br />
   pDC->SelectObject(pFont);<br />
}<br />

AnswerSetGraphicsMode(pDC-&gt;GetSafeHdc(), GM_ADVANCED) is the culprit Pin
CodeHead8-Jun-04 8:34
CodeHead8-Jun-04 8:34 
Questionhow to change the text color in button ? Pin
kendao8-Jun-04 7:15
kendao8-Jun-04 7:15 
AnswerRe: how to change the text color in button ? Pin
David Crow8-Jun-04 7:36
David Crow8-Jun-04 7:36 
GeneralAvailable Serial Ports Pin
waffleman8-Jun-04 7:12
waffleman8-Jun-04 7:12 
GeneralRe: Available Serial Ports Pin
David Crow8-Jun-04 7:21
David Crow8-Jun-04 7:21 
GeneralRe: Available Serial Ports Pin
Prakash Nadar8-Jun-04 7:27
Prakash Nadar8-Jun-04 7:27 
GeneralRe: Available Serial Ports Pin
John R. Shaw8-Jun-04 16:29
John R. Shaw8-Jun-04 16:29 
Generalk Pin
kkkillers8-Jun-04 7:00
susskkkillers8-Jun-04 7:00 
GeneralRe: k Pin
David Crow8-Jun-04 7:13
David Crow8-Jun-04 7:13 
GeneralRe: k Pin
jmkhael8-Jun-04 7:20
jmkhael8-Jun-04 7:20 
GeneralTrying to learn programming, please help!!!! Pin
kyleiscool20048-Jun-04 6:58
kyleiscool20048-Jun-04 6:58 
GeneralRe: Trying to learn programming, please help!!!! Pin
David Crow8-Jun-04 7:18
David Crow8-Jun-04 7:18 
GeneralRe: Trying to learn programming, please help!!!! Pin
kyleiscool200411-Jun-04 6:26
kyleiscool200411-Jun-04 6:26 
GeneralRe: Trying to learn programming, please help!!!! Pin
David Crow11-Jun-04 8:03
David Crow11-Jun-04 8:03 
GeneralRe: Trying to learn programming, please help!!!! Pin
jmkhael8-Jun-04 7:22
jmkhael8-Jun-04 7:22 
GeneralRe: Trying to learn programming, please help!!!! Pin
Ni@m8-Jun-04 10:46
Ni@m8-Jun-04 10:46 
GeneralRe: Trying to learn programming, please help!!!! Pin
kyleiscool200411-Jun-04 6:28
kyleiscool200411-Jun-04 6:28 

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.