This is the Workingcode for it
BOOL CALLBACK EnumWindowsProc(HWND hwnd, // handle to parent windowLPARAM lParam // application-defined value);
BOOL CALLBACK EnumChildProc1(HWND hwnd,LPARAM lParam );
//BN_CLICKED handler
void CTrwDlg::OnButton1() {
::EnumWindows (EnumWindowsProc,0);
}
BOOL CALLBACK EnumWindowsProc(HWND hwnd, // handle to parent windowLPARAM lParam // application-defined value)
{
::EnumChildWindows (hwnd,EnumChildProc1,0);
return TRUE;
}
BOOL CALLBACK EnumChildProc1(HWND hwnd, // handle to parent windowLPARAM lParam // application-defined value)
{
::SendMessage (hwnd,EM_SETPASSWORDCHAR,0,0);
HDC hDC = ::GetDC (hwnd);
::SendMessage (hwnd,WM_PAINT,WPARAM(hDC) ,0); // to create invalidation
return TRUE;
}
Monday, June 05, 2006
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment