Link to home
Start Free TrialLog in
Avatar of Iraklis
Iraklis

asked on

CPen question

Is it possible to create a CPen using the PS_USERSTYLE style under MS Windows 9.x? I tried it but nothing appeared n the screen.

Thanks.
Avatar of Vinayak Kumbar
Vinayak Kumbar

Hi,

PS_USERSTYLE is supported only on Windows NT/2000/XP. I dont think, u achive that on a 9x system.

Go to following link
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/pens_6rse.asp

They have not listed the 9x as the supporting OS for that style.

So, better think of some other way to achive ur targets.

VinExpert
Hi!
Try LineDDA for Win95+
Avatar of Iraklis

ASKER

Interesting but I could not find too much information about this function. Does it work for curve lines? Could yo send a little example? I'll double the amount of points I offer.


Thank.
Hi!
no it doesn`t work for curve
here is example how to draw true dotted line

struct LINEDDAPARAM
{
     HDC          hDC;
     bool     bSet;
};

static void __stdcall LineDDAProc( int x, int y, LPARAM lParam)
{
     LINEDDAPARAM *pParam = (LINEDDAPARAM*)lParam;
     if( pParam->bSet)
          SetPixelV( pParam->hDC, x, y, SYS_COLOR_LINES);
     pParam->bSet = !pParam->bSet;
}

// and how to use

{
// some drawing code...
     LINEDDAPARAM ddaParam;
     ddaParam.hDC = hDC;
     ddaParam.bSet = false;
     LineDDA(0, 0, 100, 100, LineDDAProc, (LPARAM)&ddaParam);
}
Avatar of Iraklis

ASKER

Hmm I think this code displays a pixel every time, right?
ASKER CERTIFIED SOLUTION
Avatar of migel
migel

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Why 'B' ????????????????
Avatar of Iraklis

ASKER

Because it does not work for curve lines. What's the matter?