Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

CPen question

Posted on 2002-05-15
8
Medium Priority
?
309 Views
Last Modified: 2013-11-20
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.
0
Comment
Question by:Iraklis
  • 4
  • 3
8 Comments
 
LVL 8

Expert Comment

by:Vinayak Kumbar
ID: 7011971
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
0
 
LVL 12

Expert Comment

by:migel
ID: 7013126
Hi!
Try LineDDA for Win95+
0
 

Author Comment

by:Iraklis
ID: 7014573
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.
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 12

Expert Comment

by:migel
ID: 7015606
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);
}
0
 

Author Comment

by:Iraklis
ID: 7018525
Hmm I think this code displays a pixel every time, right?
0
 
LVL 12

Accepted Solution

by:
migel earned 306 total points
ID: 7018565
no
this code draw 2pixels period line (i.e . . . . . . )
0
 
LVL 12

Expert Comment

by:migel
ID: 7019363
Why 'B' ????????????????
0
 

Author Comment

by:Iraklis
ID: 7019893
Because it does not work for curve lines. What's the matter?
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
Suggested Courses

782 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question