通过修改按钮扩展风格,使按钮具有粗边框

CButton *pButton = (CButton *)GetDlgItem(IDC_BUTTON1); if(pButton && pButton->GetSafeHwnd()) { static BOOL bFlage = 0; DWORD dwExStyle = WS_EX_CLIENTEDGE | WS_EX_DLGMODALFRAME; UINT nFlags = SWP_DRAWFRAME | SWP_FRAMECHANGED; if(bFlage) pButton->ModifyStyleEx(dwExStyle, 0, nFlags); else pButton->ModifyStyleEx(0, dwExStyle, nFlags); bFlage = !bFlage; }

你可能感兴趣的:(扩展,button)