Make sure that all controls being subclassed have a unique ID.
Hi .. thanks for your replies ..
i kind of found out the reason why this happens ..
its because of redefining my OnPaint function for my custom static
control .. when i have no definition, the refreshing works fine and
when i have an onPaint only the invalid part is updated leaving the
rest intact .. i dont know what other functions are responsible for
updating the remaining part of the window ... Only a redefinition
without adding a single line of code, is halting the update of the
client area .. I have absolutely no idea why ..
prakash
Ajay Kalra wrote:
I create it dynamically and yes, i check to see if its correctly
created .. and all the required flags are present ..
if (!m_wndChild.Create(NULL,
WS_CHILD|WS_VISIBLE|SS_SUNKEN|SS_WHITEFRAME,
CRect(0, 0, 200, 300),
this,
IDC_STATIC1))
{
TRACE("Unable to create the static edit control !!");
return -1;
}
Where are you creating this control? In OnInitDialog? Make sure the
dialog exists when you do this. Also, where have you declared
m_wndChild? Is it a class member? When you debug it, can you confirm if
it got created correctly?
---
Ajay