Click here to Skip to main content
12,700,567 members (32,681 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)
return;
double dViewId = m_ctrlColumnViewList.GetItemDataDouble(iIndex);
if (dViewId == 0.0)
return;
CWaitCursor wait;
CComPtr<idispatch> pDispColumnView;
CComPtr<itrackingdatamanager> pManager;
pManager.CoCreateInstance(CLSID_TrackingDataManager);
if (pManager)
pManager->GetColumnView(dViewId, &pDispColumnView);
CComQIPtr<itrackingcolumnview> pColumnView(pDispColumnView);
if (pColumnView == NULL)
return;
CModifyColumnViewDlg dlg;
dlg.SetColumnView(pColumnView);
dlg.SetType(m_lSolution, m_lListType);
dlg.SetTrackGroupCd(m_dTrackGroupCd);
std::set<cstring>* pExistingNames = GetExistingNames(iIndex);
dlg.SetExistingNames(pExistingNames);
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


m_ctrlColumnViewList.DeleteString(iIndex);

CComBSTR bstrName;
pColumnView->get_Name(&bstrName);
int iIndex = m_ctrlColumnViewList.AddString(CString(bstrName));
m_ctrlColumnViewList.SetItemDataDouble(iIndex, dViewId);
m_ctrlColumnViewList.SetCurSel(iIndex);

//Invalidate(); //not working
//RedrawWindow();	//not working

}

if (pExistingNames)
delete pExistingNames;
Invalidate();
//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
Web01 | 2.8.170118.1 | Last Updated 21 Jan 2017
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid