Solved

Lines in a View

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
ODBC Connection Logging, ADO.NET 6 56
Window placement 17 75
Dell Alienware Graphics Amplifier Driver for non-Alienware systems 18 193
Not needed 13 94
Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
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.

920 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

15 Experts available now in Live!

Get 1:1 Help Now