Click here to Skip to main content
15,899,754 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: application configuration is incorrect Pin
edvintas4-Nov-06 10:46
edvintas4-Nov-06 10:46 
GeneralRe: application configuration is incorrect Pin
David Crow5-Nov-06 6:37
David Crow5-Nov-06 6:37 
GeneralRe: application configuration is incorrect Pin
Michael Dunn4-Nov-06 10:26
sitebuilderMichael Dunn4-Nov-06 10:26 
GeneralRe: application configuration is incorrect Pin
edvintas4-Nov-06 10:49
edvintas4-Nov-06 10:49 
QuestionGet keys of HKEY_CURRENT_USER Pin
Daniel Kanev4-Nov-06 6:43
Daniel Kanev4-Nov-06 6:43 
AnswerRe: Get keys of HKEY_CURRENT_USER Pin
Waldermort4-Nov-06 7:19
Waldermort4-Nov-06 7:19 
AnswerRe: Get keys of HKEY_CURRENT_USER Pin
Hamid_RT4-Nov-06 20:40
Hamid_RT4-Nov-06 20:40 
QuestionGetWindowRect() Pin
Waldermort4-Nov-06 5:46
Waldermort4-Nov-06 5:46 
I'm trying to implement a child window anchoring system into my window. My code works all well and good right up until the child window is resized to a point where it becomes invisible. This is the basic code I am using to calculate the new positions
::GetWindowRect(m_hWnd,&rcNew);
::OffsetRect(&rcNew,-rcNew.left,-rcNew.top);

::CopyRect(&rcOld,&m_rcWindow);
::OffsetRect(&rcOld,-rcOld.left,-rcOld.top);

int Xoffset = rcNew.right  - rcOld.right;
int Yoffset = rcNew.bottom - rcOld.bottom;
The value of rcNew is later stored.

Now heres the problem. For all child controls of the main window, it works. The new rectangle may contain negative figures which is no problem since it corrects itself when the window is again resized. But for the children of children an incorrect value is being assigned to the Xoffset and Yoffset values. I have traced this to the GetWindowRect() call. If a window is told to resize to a negative figure, it actually resizes to 0. Therefore GetWindowRect() returns a 0 width or 0 height. To do this correctly I need to somehow find the window rect as if it were inverted, ie a begative figure for the width or height. Any suggestions?
AnswerRe: GetWindowRect() Pin
Steve Echols4-Nov-06 19:16
Steve Echols4-Nov-06 19:16 
GeneralRe: GetWindowRect() Pin
Waldermort4-Nov-06 21:15
Waldermort4-Nov-06 21:15 
GeneralRe: GetWindowRect() Pin
Steve Echols4-Nov-06 21:21
Steve Echols4-Nov-06 21:21 
QuestionHOWTO: get CMenu information from a CMenu pointer Pin
Mohammad A Gdeisat4-Nov-06 5:25
Mohammad A Gdeisat4-Nov-06 5:25 
AnswerRe: HOWTO: get CMenu information from a CMenu pointer Pin
Mark Salsbery4-Nov-06 8:05
Mark Salsbery4-Nov-06 8:05 
GeneralRe: HOWTO: get CMenu information from a CMenu pointer Pin
Mohammad A Gdeisat4-Nov-06 10:53
Mohammad A Gdeisat4-Nov-06 10:53 
GeneralRe: HOWTO: get CMenu information from a CMenu pointer Pin
Mark Salsbery4-Nov-06 12:23
Mark Salsbery4-Nov-06 12:23 
GeneralRe: HOWTO: get CMenu information from a CMenu pointer Pin
Mohammad A Gdeisat4-Nov-06 19:50
Mohammad A Gdeisat4-Nov-06 19:50 
GeneralRe: HOWTO: get CMenu information from a CMenu pointer Pin
Mark Salsbery4-Nov-06 22:48
Mark Salsbery4-Nov-06 22:48 
QuestionAbout Multi Core Pin
bouli4-Nov-06 5:17
bouli4-Nov-06 5:17 
AnswerRe: About Multi Core Pin
Mark Salsbery4-Nov-06 8:42
Mark Salsbery4-Nov-06 8:42 
GeneralRe: About Multi Core Pin
bouli4-Nov-06 13:54
bouli4-Nov-06 13:54 
GeneralRe: About Multi Core Pin
Mark Salsbery4-Nov-06 16:07
Mark Salsbery4-Nov-06 16:07 
GeneralRe: About Multi Core Pin
bouli5-Nov-06 0:28
bouli5-Nov-06 0:28 
GeneralRe: About Multi Core Pin
Mark Salsbery5-Nov-06 8:14
Mark Salsbery5-Nov-06 8:14 
GeneralRe: About Multi Core Pin
bouli5-Nov-06 8:21
bouli5-Nov-06 8:21 
GeneralRe: About Multi Core Pin
Mark Salsbery5-Nov-06 8:53
Mark Salsbery5-Nov-06 8:53 

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.