SetWindowRgn for a button
Is it true that SetWindowRgn is not applicapable for buttons and also another controls of window?
It's just because I cannot set a region for the button on my dialog window in OnInitDialog, This is the code:
Code:
CWnd *pBtn = GetDlgItem( IDC_BUTTON1 );
CRect rc;
pBtn->GetWindowRect( &rc );
HRGN hRgn = CreateEllipticRgn( 0, 0, rc.Width(), rc.Height() );
pBtn->SetWindowRgn( hRgn, TRUE );
For the top level window (that is for dialog window) this code works well, but for a button - nothing changes.