Click here to Skip to main content
15,902,492 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Cancel opening a file Pin
PJ Arends31-Aug-07 9:38
professionalPJ Arends31-Aug-07 9:38 
QuestionWM_TIMER Pin
__yash__31-Aug-07 7:28
professional__yash__31-Aug-07 7:28 
AnswerRe: WM_TIMER Pin
Mark Salsbery31-Aug-07 8:01
Mark Salsbery31-Aug-07 8:01 
GeneralRe: WM_TIMER Pin
Waldermort31-Aug-07 9:33
Waldermort31-Aug-07 9:33 
GeneralRe: WM_TIMER Pin
Mark Salsbery31-Aug-07 9:42
Mark Salsbery31-Aug-07 9:42 
AnswerRe: WM_TIMER Pin
Waldermort31-Aug-07 9:34
Waldermort31-Aug-07 9:34 
GeneralRe: WM_TIMER Pin
__yash__31-Aug-07 9:40
professional__yash__31-Aug-07 9:40 
QuestionSetWindowPos & GetWindowRect Pin
Mr Simple31-Aug-07 7:05
Mr Simple31-Aug-07 7:05 
Hi,
I am trying to resize 2 CButtons at runtime, but am having a really hard time getting them to appear in the correct place.

GetWindowRect gives me values that are offset to the dialog. To demonstrate, the code i am using is something like the following;

<br />
CRect btnRect;<br />
btn1.GetWindowRect(btnRect);<br />
<br />
::SetWindowPos(btn1.m_hwnd, btnRect.left, btnRect.top, btnRect.Width(), btnRect.Height(), SWP_SHOWWINDOW); <br />


This results in the button moving diagonally across the screen, it doesnt stay still, which is what I would have expected. I find that if i take away (rectDialog.left + 3) and (rectDialog.top + 29) from btnRect.left and .top it will work (stay still).

I assume the '3' is the width of the boarder, and '29' the height of the title bar. Is this correct?

If so, how can I find it programatically?

Thank you very much for your help.
AnswerRe: SetWindowPos & GetWindowRect Pin
Mark Salsbery31-Aug-07 7:13
Mark Salsbery31-Aug-07 7:13 
AnswerRe: SetWindowPos & GetWindowRect Pin
Roger Broomfield31-Aug-07 17:32
Roger Broomfield31-Aug-07 17:32 
QuestionCan someone with VC++ 2008 &quot;Orcas&quot; test this? Pin
dontknowitall31-Aug-07 6:55
dontknowitall31-Aug-07 6:55 
AnswerRe: Can someone with VC++ 2008 &quot;Orcas&quot; test this? Pin
Jonathan [Darka]31-Aug-07 7:03
professionalJonathan [Darka]31-Aug-07 7:03 
GeneralRe: Can someone with VC++ 2008 "Orcas" test this? Pin
dontknowitall31-Aug-07 7:12
dontknowitall31-Aug-07 7:12 
AnswerRe: Can someone with VC++ 2008 "Orcas" test this? Pin
Mark Salsbery31-Aug-07 7:25
Mark Salsbery31-Aug-07 7:25 
GeneralRe: Can someone with VC++ 2008 "Orcas" test this? Pin
dontknowitall31-Aug-07 8:42
dontknowitall31-Aug-07 8:42 
Questionget checked value from menu Pin
barbarini31-Aug-07 6:40
barbarini31-Aug-07 6:40 
AnswerRe: get checked value from menu Pin
Jonathan [Darka]31-Aug-07 7:09
professionalJonathan [Darka]31-Aug-07 7:09 
GeneralRe: get checked value from menu Pin
barbarini31-Aug-07 7:26
barbarini31-Aug-07 7:26 
GeneralRe: get checked value from menu Pin
barbarini31-Aug-07 8:03
barbarini31-Aug-07 8:03 
GeneralRe: get checked value from menu Pin
Hamid_RT31-Aug-07 19:12
Hamid_RT31-Aug-07 19:12 
GeneralRe: get checked value from menu Pin
Anurag Gandhi31-Aug-07 20:19
professionalAnurag Gandhi31-Aug-07 20:19 
Questioninterface programming Pin
Adno31-Aug-07 6:18
Adno31-Aug-07 6:18 
AnswerRe: interface programming Pin
led mike31-Aug-07 6:51
led mike31-Aug-07 6:51 
GeneralRe: interface programming Pin
Adno31-Aug-07 7:09
Adno31-Aug-07 7:09 
Questionhow to implement hotfix function? Pin
lostangels31-Aug-07 5:46
lostangels31-Aug-07 5:46 

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.