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

C / C++ / MFC

 
QuestionCWnd Pin
kk.tvm20-Nov-07 19:07
kk.tvm20-Nov-07 19:07 
AnswerRe: CWnd Pin
Hamid_RT20-Nov-07 19:11
Hamid_RT20-Nov-07 19:11 
GeneralRe: CWnd Pin
kk.tvm20-Nov-07 21:11
kk.tvm20-Nov-07 21:11 
GeneralRe: CWnd Pin
Hamid_RT20-Nov-07 21:18
Hamid_RT20-Nov-07 21:18 
QuestionHow to SetWindowPos correctly? Actually confused with GetClientRect,GetWindowRect,ScreenToClient and ClientToScreen etc. Pin
fantasy121520-Nov-07 18:36
fantasy121520-Nov-07 18:36 
AnswerRe: How to SetWindowPos correctly? Actually confused with GetClientRect,GetWindowRect,ScreenToClient and ClientToScreen etc. Pin
Mark Salsbery20-Nov-07 19:01
Mark Salsbery20-Nov-07 19:01 
GeneralRe: How to SetWindowPos correctly? Actually confused with GetClientRect,GetWindowRect,ScreenToClient and ClientToScreen etc. [modified] Pin
fantasy121520-Nov-07 20:34
fantasy121520-Nov-07 20:34 
GeneralRe: How to SetWindowPos correctly? Actually confused with GetClientRect,GetWindowRect,ScreenToClient and ClientToScreen etc. Pin
Parthi_Appu21-Nov-07 0:25
Parthi_Appu21-Nov-07 0:25 
Before going into your question,

GetWindowRect(..) will return the window rect with respect to screen cooridates.

GetClientRect(..) will return the client area of the window, that is regardless of its position the top left point is 0, 0 and right, bottom point is its width and height respectivly

Now for Question 1:
You got the screen coordinate of OK button, now you have to find its coordinate with respect to the dialog and not with the listbox.

For Question 2:
As i said earlier, if you use GetClientRect(..), simply it will return width and height. By knowing only the width and height you can't find its starting (top,left) coordinate.





Do your Duty and Don't expect the Result

QuestionRe: How to SetWindowPos correctly? Actually confused with GetClientRect,GetWindowRect,ScreenToClient and ClientToScreen etc. [Understood clearly] Pin
fantasy121521-Nov-07 13:59
fantasy121521-Nov-07 13:59 
GeneralRe: How to SetWindowPos correctly? Actually confused with GetClientRect,GetWindowRect,ScreenToClient and ClientToScreen etc. Pin
Mark Salsbery21-Nov-07 5:15
Mark Salsbery21-Nov-07 5:15 
QuestionGetWindowText in OnKeyDown not correct Pin
followait20-Nov-07 18:26
followait20-Nov-07 18:26 
AnswerRe: GetWindowText in OnKeyDown not correct Pin
Hamid_RT20-Nov-07 18:35
Hamid_RT20-Nov-07 18:35 
GeneralRe: GetWindowText in OnKeyDown not correct Pin
followait20-Nov-07 18:40
followait20-Nov-07 18:40 
AnswerRe: GetWindowText in OnKeyDown not correct Pin
Haroon Sarwar20-Nov-07 18:36
Haroon Sarwar20-Nov-07 18:36 
GeneralRe: GetWindowText in OnKeyDown not correct Pin
followait20-Nov-07 18:40
followait20-Nov-07 18:40 
AnswerRe: GetWindowText in OnKeyDown not correct Pin
fantasy121520-Nov-07 18:42
fantasy121520-Nov-07 18:42 
Questiontchar to constant char mfc-vc++ Pin
Paulraj G20-Nov-07 17:46
Paulraj G20-Nov-07 17:46 
AnswerRe: tchar to constant char mfc-vc++ Pin
followait20-Nov-07 18:33
followait20-Nov-07 18:33 
QuestionRe: tchar to constant char mfc-vc++ Pin
nitin320-Nov-07 20:03
nitin320-Nov-07 20:03 
AnswerRe: tchar to constant char mfc-vc++ Pin
Cedric Moonen20-Nov-07 20:10
Cedric Moonen20-Nov-07 20:10 
GeneralRe: tchar to constant char mfc-vc++ Pin
Paulraj G21-Nov-07 23:43
Paulraj G21-Nov-07 23:43 
QuestionIE Addin Sample code Pin
Adam °Wimsatt20-Nov-07 15:59
Adam °Wimsatt20-Nov-07 15:59 
AnswerRe: IE Addin Sample code Pin
Adam °Wimsatt20-Nov-07 16:01
Adam °Wimsatt20-Nov-07 16:01 
AnswerRe: IE Addin Sample code Pin
Sudhir Mangla20-Nov-07 17:09
professionalSudhir Mangla20-Nov-07 17:09 
GeneralRe: IE Addin Sample code Pin
Adam °Wimsatt21-Nov-07 7:29
Adam °Wimsatt21-Nov-07 7:29 

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.