Click here to Skip to main content
15,905,914 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: The View pointer to modal dlg Pin
Alvaro Mendez6-Mar-03 8:02
Alvaro Mendez6-Mar-03 8:02 
GeneralRe: The View pointer to modal dlg Pin
ns6-Mar-03 8:09
ns6-Mar-03 8:09 
GeneralRe: The View pointer to modal dlg Pin
Alvaro Mendez6-Mar-03 9:41
Alvaro Mendez6-Mar-03 9:41 
GeneralRe: The View pointer to modal dlg Pin
ns7-Mar-03 3:24
ns7-Mar-03 3:24 
GeneralApplication Icon Changes Pin
amymarie36-Mar-03 7:11
amymarie36-Mar-03 7:11 
GeneralRe: Application Icon Changes Pin
Anonymous7-Mar-03 3:57
Anonymous7-Mar-03 3:57 
GeneralAdvantech Data Acqusition Card Pin
Abbas_Riazi6-Mar-03 6:58
professionalAbbas_Riazi6-Mar-03 6:58 
GeneralClient vs. Screen Rect. Pin
Maximilien6-Mar-03 6:04
Maximilien6-Mar-03 6:04 
good day!

still trying to custom paint CEdit borders, it's working more or less ok now, but I'm having problems with coordinates (rect) of my control, and where I paint. Confused | :confused:

This is what I do now, it does work when the CCustomEdit is in a dialog without any border, my main "target", but now I have to use this in other dialogs, and the clientRect is wrong, the conversion is not good, and does not take into account the dialog borders (caption, borders, ... ).

What is the proper sequences to get the CEdit rect ( in the dialogs coordinate ) and Inflate it to fit the CCustomEdit rect ?

The target look is to have the border around the CEdit.

void CCustomEdit::OnNcPaint() <br />
{<br />
 CDC* pDC = GetParent()->GetWindowDC();<br />
<br />
 CRect windowRect;<br />
 GetWindowRect( windowRect );<br />
<br />
 CRect clientRect;<br />
 GetClientRect( clientRect );<br />
<br />
 ClientToScreen( clientRect );<br />
 GetParent()->ScreenToClient( clientRect );<br />
<br />
 clientRect.InflateRect( 2, 2, 2, 2 );<br />
 pDC->FrameRect( clientRect, &m_BorderBrushFocus );<br />
<br />
 ReleaseDC(pDC);<br />
<br />
}



Thanks.



Maximilien Lincourt
For success one must aquire one's self
GeneralRe: Client vs. Screen Rect. Pin
PJ Arends6-Mar-03 8:16
professionalPJ Arends6-Mar-03 8:16 
GeneralUsing .dll's created in Visual C++ in VB [both forums] Pin
dazinith6-Mar-03 5:44
dazinith6-Mar-03 5:44 
GeneralRe: Using .dll's created in Visual C++ in VB [both forums] Pin
Chris Meech6-Mar-03 8:13
Chris Meech6-Mar-03 8:13 
GeneralRe: Using .dll's created in Visual C++ in VB [both forums] Pin
dazinith6-Mar-03 9:24
dazinith6-Mar-03 9:24 
GeneralRe: Using .dll's created in Visual C++ in VB [both forums] Pin
Chris Meech6-Mar-03 9:35
Chris Meech6-Mar-03 9:35 
GeneralRe: Using .dll's created in Visual C++ in VB [both forums] Pin
dazinith6-Mar-03 10:38
dazinith6-Mar-03 10:38 
GeneralMDI SDI Project TEXT View Pin
Member 2693576-Mar-03 5:34
Member 2693576-Mar-03 5:34 
GeneralRe: MDI SDI Project TEXT View Pin
RobJones6-Mar-03 6:34
RobJones6-Mar-03 6:34 
GeneralRe: MDI SDI Project TEXT View Pin
6-Mar-03 6:47
suss6-Mar-03 6:47 
GeneralTransfer AUDIO BUFFER to AUDIO STREAM Pin
es19686-Mar-03 5:34
es19686-Mar-03 5:34 
GeneralAfter 8 hours of working the PC claims "Not enough virtual memory..." Pin
Joan M6-Mar-03 5:18
professionalJoan M6-Mar-03 5:18 
GeneralRe: After 8 hours of working the PC claims "Not enough virtual memory..." Pin
benjymous6-Mar-03 5:35
benjymous6-Mar-03 5:35 
GeneralRe: After 8 hours of working the PC claims "Not enough virtual memory..." Pin
dazinith6-Mar-03 6:02
dazinith6-Mar-03 6:02 
GeneralRe: After 8 hours of working the PC claims "Not enough virtual memory..." Pin
Neville Franks6-Mar-03 9:34
Neville Franks6-Mar-03 9:34 
GeneralRe: After 8 hours of working the PC claims "Not enough virtual memory..." Pin
Ravi Bhavnani7-Mar-03 2:52
professionalRavi Bhavnani7-Mar-03 2:52 
GeneralOpenig RAW images Pin
djordj6-Mar-03 4:53
djordj6-Mar-03 4:53 
GeneralRe: Openig RAW images Pin
Chris Losinger6-Mar-03 5:40
professionalChris Losinger6-Mar-03 5:40 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.