const int tx =5; const int rx =8; int H1,L1; CRect rect; GetClientRect(&rect); H1 = rect.bottom/tx; L1 = rect.right/rx; for (int i=0;i<tx;i++) for (int j=0; j<rx; j++) { CPoint p; p.SetPoint(j*L1,i*H1); CButton* testbutton= new CButton(); testbutton->Create(NULL, WS_VISIBLE | BS_AUTOCHECKBOX, CRect(10+p.x,10+p.y,H1+p.x,L1+p.y),this ,IDC_CHECK+(i+1)*(j+1)-1); q = IDC_CHECK+(i+1)*(j+1)-1; GetDlgItem(IDC_CHECK)->ShowWindow(SW_HIDE); testButton->GetCheck()==0; UpdateWindow();
WM_SIZE
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)