Solved

Lines in a View

Posted on 1998-06-29
1
165 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
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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Include multiple hostnames in this command? 3 55
Whole sheet autoscrub still needed 19 50
Window placement 17 83
pre4 challenge 19 100
In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
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.
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

810 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