Re: Geometric pens compiler error
- From: "Christopher Fairbairn" <christopher@xxxxxxxxxxxxxx>
- Date: Fri, 25 Jan 2008 12:13:42 +1300
Hi,
"ruleren" <-> wrote in message news:479876bb$0$99022$157c6196@xxxxxxxxxxxxxxxxxxxxxxxx
I'm trying to get drawing with custom pens to work. The code below compiles and runs fine under VC6 in XP, but I get compiler errors in EVC4.
error C2065: 'PS_GEOMETRIC' : undeclared identifier
error C2065: 'PS_USERSTYLE' : undeclared identifier
Windows CE provides a subset of the Win32 APIs found on a desktop PC, not all features are supported.
In the case of the GDI implementation many of the more flexable pen styles are not available. In part this is because the ExtCreatePen API (http://msdn2.microsoft.com/en-us/library/ms535223(VS.85).aspx) is not available.
Since the OS doesn't provide this support the MFC CPen class can't provide an object orientated wrapper around the functionality, and this is why the documentation you referenced explictly mentions the additional contructor overload isn't available on Windows CE.
In effect you only get the capabilities of the CreatePen API function (documentation available at http://msdn2.microsoft.com/en-us/library/ms908180.aspx).
On a Windows Mobile 5.0 or above device you could investigate the GDI+ APIs. Since they provide for this kind of functionality, along with custom end caps etc.
Another option if you only have a few lines is to draw the individual line segements individually according to your desired dash pattern.
Hope this helps,
Christopher Fairbairn
.
- Prev by Date: Re: Deleting a registry key in Win CE 6.0 (.net)
- Next by Date: RE: Detect Keyboard, mouse event errespective of focus on application
- Previous by thread: Re: RDP Client 6.0 for windows ce 4.2
- Next by thread: RE: Detect Keyboard, mouse event errespective of focus on application
- Index(es):
Relevant Pages
|