Click here to Skip to main content
11,926,827 members (56,165 online)

Managed C++/CLI

QuestionChild dialog shadow remains Pin
shivareaj5-Oct-12 8:30
membershivareaj5-Oct-12 8:30 
AnswerRe: Child dialog shadow remains Pin
Richard MacCutchan5-Oct-12 23:35
mvpRichard MacCutchan5-Oct-12 23:35 
GeneralRe: Child dialog shadow remains Pin
shivareaj6-Oct-12 7:02
membershivareaj6-Oct-12 7:02 
GeneralRe: Child dialog shadow remains Pin
Richard MacCutchan6-Oct-12 7:07
mvpRichard MacCutchan6-Oct-12 7:07 
GeneralRe: Child dialog shadow remains Pin
shivareaj6-Oct-12 18:55
membershivareaj6-Oct-12 18:55 
Thanks for reply, I have seen same design patterns(using child dialog)in the same application but there is no issue there. I compared the code, am not finding any difference in RePainting aspects.

here i have sample code..

Below used OnModifyview dialog is child dialog of a dialog.

void CSelectColumnViewDlg::OnModifyview()
int iIndex = m_ctrlColumnViewList.GetCurSel();
if (iIndex < 0)
double dViewId = m_ctrlColumnViewList.GetItemDataDouble(iIndex);
if (dViewId == 0.0)
CWaitCursor wait;
CComPtr pDispColumnView;
CComPtr pManager;
if (pManager)
pManager->GetColumnView(dViewId, &pDispColumnView);
CComQIPtr pColumnView(pDispColumnView);
if (pColumnView == NULL)
CModifyColumnViewDlg dlg;
dlg.SetType(m_lSolution, m_lListType);
std::set* pExistingNames = GetExistingNames(iIndex);
if (dlg.DoModal() == IDOK)
{	//Issue exist only when i edit in child dialog & click above OK (child dialog OK)	

HWND hWndAncestor = ::GetAncestor(GetSafeHwnd(), GA_ROOT);
//hWndAncestor->Invalidate(); //not working
//InvalidateRect(hWndAncestor, NULL, TRUE); //not working
//::RedrawWindow(hWndAncestor,NULL,NULL,RDW_INVALIDATE); //not working
//::UpdateWindow(hWndAncestor); //not working

CComBSTR bstrName;
int iIndex = m_ctrlColumnViewList.AddString(CString(bstrName));
m_ctrlColumnViewList.SetItemDataDouble(iIndex, dViewId);
//Invalidate(); //not working
//RedrawWindow();	//not working

if (pExistingNames)
delete pExistingNames;
//OnPaint(); //not working
//RedrawWindow();// not working

modified 7-Oct-12 0:04am.

GeneralRe: Child dialog shadow remains Pin
Richard MacCutchan6-Oct-12 22:30
mvpRichard MacCutchan6-Oct-12 22:30 

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.

Advertise | Privacy | Mobile
Web03 | 2.8.151126.1 | Last Updated 23 Nov 2015
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid