Advertisement

03.01.2008 at 11:18AM PST, ID: 23206455
[x]
Attachment Details

LineTo is clipped by a control

Asked by Anthony2000 in Windows MobileProgramming, Windows MFC Programming

Tags:


I am using MFC and in my dialog's WM_PAINT handler I have the following code (see code snippet)

When I run the code, I can see the line, but it gets clipped by a text box. How do I get the line to appear above the text box? There should be a way to draw the line so that it will appear on top of the box. The line does not touch the text in the box. I basically have 3 text boxes at the top of my dialog (the text boxes have no borders) and I am trying to put a line straight across the dialog, just under the text boxes. The line adds a visual separator to the text boxes.  Similar to the menu bar on a window.


Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
void CMainDlg::OnPaint() 
{
	CPaintDC dc(this); // device context for painting
	
	// TODO: Add your message handler code here
 
	dc.MoveTo(0,   20);
	dc.LineTo(300, 20);
 
	// Do not call CDialog::OnPaint() for painting messages
}
[+][-]03.02.2008 at 02:35AM PST, ID: 21025560

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.02.2008 at 08:53AM PST, ID: 21026600

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03.02.2008 at 12:17PM PST, ID: 21027329

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.03.2008 at 08:17AM PST, ID: 21032894

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03.03.2008 at 03:43PM PST, ID: 21036929

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.03.2008 at 04:17PM PST, ID: 21037144

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03.03.2008 at 09:20PM PST, ID: 21038501

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.06.2008 at 11:16AM PST, ID: 21063675

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03.06.2008 at 04:34PM PST, ID: 21066200

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Windows MobileProgramming, Windows MFC Programming
Tags: LineTo MFC wince clipping
Sign Up Now!
Solution Provided By: DanRollins
Participating Experts: 1
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_EXPERT_20070906