GIDForums  

Go Back   GIDForums > Computer Programming Forums > MS Visual C++ / MFC Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 06-Feb-2006, 06:14
Dominic Dominic is offline
Member
 
Join Date: Aug 2005
Posts: 123
Dominic will become famous soon enough

CPen, and square ends


I currently now have Visual C++ installed again on my office computer (in German), but not MSDN. My German Visual C++ gives all the errors in German and I cant understand it.

I would like to construct a CPen object with square ends.

Could some kind sole out there possibly show me an example code of how to construct a CPen object that will draw square ended lines rather than round ended lines.
  #2  
Old 06-Feb-2006, 10:26
aie0 aie0 is offline
Member
 
Join Date: Dec 2004
Posts: 246
aie0 is a jewel in the roughaie0 is a jewel in the rough

Re: CPen, and square ends


Use ExtCreatePen(..) and put ( PS_GEOMETRIC | PS_ENDCAP_SQUARE) as first parameter.
  #3  
Old 07-Feb-2006, 01:06
Dominic Dominic is offline
Member
 
Join Date: Aug 2005
Posts: 123
Dominic will become famous soon enough

Re: CPen, and square ends


Thank you for the information. I managed last night to find an english version of MS Visual C++ and so I could see what the exceptions were all about. Just one point, it looked like if you didnt specify PS_GEOMETRIC it would default to PS_COMESTIC and any line width greater than 1 would then throw an exception.

Anyway got it to work and thanks for the advice.
Regards
Dominic

Now back to the German Visual C++ at work, Got im Hemel !
 
 

Recent GIDBlogPython ebook by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 09:41.


vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.