Solved

Lines in a View

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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

747 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now