Click here to Skip to main content
15,912,977 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How do i draw line on picture control? Pin
Hamid_RT3-Feb-09 23:57
Hamid_RT3-Feb-09 23:57 
GeneralRe: How do i draw line on picture control? Pin
z01e4-Feb-09 0:12
z01e4-Feb-09 0:12 
GeneralRe: How do i draw line on picture control? Pin
Stuart Dootson4-Feb-09 1:34
professionalStuart Dootson4-Feb-09 1:34 
AnswerRe: How do i draw line on picture control? Pin
Nishad S4-Feb-09 0:38
Nishad S4-Feb-09 0:38 
QuestionUsing GetClientRect() and ExtTextOut() Pin
Abhinay Kumar3-Feb-09 22:52
Abhinay Kumar3-Feb-09 22:52 
AnswerRe: Using GetClientRect() and ExtTextOut() Pin
Code-o-mat3-Feb-09 23:06
Code-o-mat3-Feb-09 23:06 
GeneralRe: Using GetClientRect() and ExtTextOut() Pin
Abhinay Kumar3-Feb-09 23:32
Abhinay Kumar3-Feb-09 23:32 
GeneralRe: Using GetClientRect() and ExtTextOut() Pin
Code-o-mat3-Feb-09 23:45
Code-o-mat3-Feb-09 23:45 
I'm not quite sure what you mean, do you mean you want to know where a control is positioned in its parent's client area? If so, do something like this:

RECT controlRt;

::GetWindowRect(controlHWnd, &controlRt);
::ScreenToClient(parentHWnd, &controlRt);
// do your drawing using controlRt here...

Also note that to draw into the parent's client you need the parent's client DC, is that what you are using? If you did something like putting your drawing code inside the WM_PAINT of some control on that parent, did BeginPaint() and then you want to draw to the parent using the DC you got back, that won't work since the DC you get from BeginPaint will be "referring" to (and be clipped to) the client area of the window that got the WM_PAINT, not its parent.
If this is not what you meant, try to explain a bit more clearer what you need, please.

> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <

GeneralRe: Using GetClientRect() and ExtTextOut() Pin
Abhinay Kumar3-Feb-09 23:55
Abhinay Kumar3-Feb-09 23:55 
GeneralRe: Using GetClientRect() and ExtTextOut() Pin
Code-o-mat4-Feb-09 1:25
Code-o-mat4-Feb-09 1:25 
GeneralRe: Using GetClientRect() and ExtTextOut() Pin
Abhinay Kumar4-Feb-09 2:40
Abhinay Kumar4-Feb-09 2:40 
GeneralRe: Using GetClientRect() and ExtTextOut() Pin
Code-o-mat4-Feb-09 2:49
Code-o-mat4-Feb-09 2:49 
GeneralRe: Using GetClientRect() and ExtTextOut() Pin
Abhinay Kumar4-Feb-09 2:56
Abhinay Kumar4-Feb-09 2:56 
GeneralRe: Using GetClientRect() and ExtTextOut() Pin
Code-o-mat4-Feb-09 3:15
Code-o-mat4-Feb-09 3:15 
GeneralRe: Using GetClientRect() and ExtTextOut() Pin
Abhinay Kumar4-Feb-09 3:33
Abhinay Kumar4-Feb-09 3:33 
QuestionRe: Using GetClientRect() and ExtTextOut() Pin
David Crow4-Feb-09 3:22
David Crow4-Feb-09 3:22 
AnswerRe: Using GetClientRect() and ExtTextOut() Pin
Abhinay Kumar4-Feb-09 3:37
Abhinay Kumar4-Feb-09 3:37 
Questionproblem in vc++ project Pin
kir_MFC3-Feb-09 21:50
kir_MFC3-Feb-09 21:50 
AnswerRe: problem in vc++ project Pin
Smith#3-Feb-09 21:55
Smith#3-Feb-09 21:55 
AnswerRe: problem in vc++ project Pin
Nishad S3-Feb-09 22:11
Nishad S3-Feb-09 22:11 
QuestionRe: problem in vc++ project Pin
David Crow4-Feb-09 3:24
David Crow4-Feb-09 3:24 
Questionstrcpy Pin
hrishiS3-Feb-09 21:25
hrishiS3-Feb-09 21:25 
AnswerRe: strcpy Pin
Smith#3-Feb-09 21:53
Smith#3-Feb-09 21:53 
GeneralRe: strcpy Pin
hrishiS3-Feb-09 22:37
hrishiS3-Feb-09 22:37 
Questiondisplying of latest data from an XML on the list control. [modified] Pin
brucewayn3-Feb-09 20:54
brucewayn3-Feb-09 20:54 

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.