在对话框的BOOL CBGMusicDlg::OnInitDialog()中添加
CRgn rgn;
rgn.CreateRoundRectRgn(0, 0, 283, 188, 5, 5);
SetWindowRgn(rgn, TRUE); 发现运行结果是对话框的上面两个角有效果,但下面两个角没效果,咋回事?
CRgn rgn;
rgn.CreateRoundRectRgn(0, 0, 283, 188, 5, 5);
SetWindowRgn(rgn, TRUE); 发现运行结果是对话框的上面两个角有效果,但下面两个角没效果,咋回事?
试下:CRect rc;
GetWindowRect(&rc);
CRgn rgn;
rgn.CreateRoundRectRgn(0, 0, rc.Width(), rc.Height(), 5, 5);
SetWindowRgn(rgn, TRUE);
GetWindowRect(&rc);
CRgn rgn;
rgn.CreateRoundRectRgn(0, 0, rc.Width(), rc.Height(), 5, 5);
SetWindowRgn(rgn, TRUE);