Solved

Lines in a View

Posted on 1998-06-29
1
167 Views
Last Modified: 2013-11-20
I am working in A CScrollView.  Currently, I do a pDC->LineTo() call where I pass in two points.  But, I would
like it to look like this "..............." instead of "________"  . What's the best way to do this?  I tried to do a for loop, where I drew each dot then advanced the x position by 1 until I finished....but this didn't display consistently nor correctly. Sometimes, it would only show the last dot.

Thanks
0
Comment
Question by:mulshine
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 1

Accepted Solution

by:
motigust earned 50 total points
ID: 1318497
You should use a different pen style.

for example:

void CMyView::OnDraw(CDC* pDC){

CPen   MyPen(PS_DOT, 2, RGB(0x00,0x00,0x00));

pDC->SelectObject(MyPen);
pDC->MoveTo(0,0);
pDC->LineTo(600,600);
}



Have fun.

0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Error on moodle after upgrade 3 149
countEvens challenge 2 115
only14 challenge 19 84
Execute multiple curl cmds with sleep and send output to file 10 115
Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
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.
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

696 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