Parent Window

  • Thread starter Thread starter Rangaraj.P
  • Start date Start date
R

Rangaraj.P

Guest
I have created Transparent child window and when i trying to close parrent window, child window is not closed please let me know some feedback..

HWND hwnd = NULL;
hwnd = ::FindWindow(NULL, L"ImageViewer" );
CWnd* pWnd = CWnd::FromHandle(hwnd);

if(pWnd != NULL)
{
Create(IDD_RGNTRANSPARENT_DIALOG,pWnd);

LONG lStyle = ::GetWindowLong(this->GetSafeHwnd(), GWL_EXSTYLE); //this->GetSafeHwnd()
::SetWindowLong(this->GetSafeHwnd(), GWL_EXSTYLE, (lStyle | WS_EX_LAYERED | WS_EX_TRANSPARENT| WS_EX_TOPMOST | WS_CHILD));
SetLayeredWindowAttributes(RGB(0, 0, 0), 127, LWA_ALPHA | LWA_COLORKEY);
SetWindowPos(&CWnd::wndTopMost, 320, 114, 1660, 1006,SWP_SHOWWINDOW);


/*HWND curwnd = GetSafeHwnd();
::SetParent(curwnd,hwnd);
::UpdateWindow(curwnd);*/

}




Rangaraj Palanisamy

Continue reading...
 
Back
Top