How can I paste a Progress bar on top a Status bar in an MDI form. Any help would be apprieciated. Thanks
SudhaShriram
Posts
-
Progress Bar on top of a Status bar. -
Keyboard dialogYou can create a message map entry as below ON_CONTROL_RANGE(BN_CLICKED, IDC_BUTTON1, IDC_BUTTON10, OnButtonClicked) instead of the ON_BN_CLICKED message map entry. Here IDC_BUTTONis is the first button in a set of button having consequtive IDS. and IDC_BUTTON10 is last among them. The corresponding hadler will look like void CMyDialog::OnButtonClicked( UINT nID ) { int nButton = nID - IDC_BUTTON1; ASSERT( nButton >= 0 && nButton < 10 ); // ... } If you dont have the button ids as consequtive integers You can try one more method. Let me explain that. Map All the button to one Command Handler. You can do this using the class wizard itself. For all the buttons give the function name the same. Say (OnButtonClicked) Later inside OnButtonClicked you can code as below; void CMyDialog::OnButtonClicked() { const MSG *x = GetCurrentMessage(); CString ToDisp; int nID=(int)x->wParam;//WParam gives the command id of the button. ToDisp.Format("The Id of the button is %d...",nID); MessageBox(ToDisp); } HTH Sundaravalli Shriram Tektronix Engineering Development India Ltd, Bangalore - 560001, India.
-
Hide the scrollbars of a CTreeCtrl objectAdd TVS_NOSCROLL style to the CTreeCtrl Object. It is that simple. Sundaravalli Shriram Tektronix Engineering Development India Ltd, Bangalore - 560001, India.
-
Owner draw CTreeCtrlYou need not derive any class from CTreeCtrl. You just have to set the style TVS_NOSCROLL using ModifyStyle function of the CWnd Class ( CTreeview is derived from CWnd hence inherits that function). Later you will not have the both vertical and horizontal scroll bar for the tree control. Example CTreeCtrl *x = (CTreeCtrl *)GetDlgItem(IDC_TREE1); x->ModifyStyle(0,TVS_NOSCROLL); HTH. Sundaravalli Shriram Tektronix Engineering Development India Ltd, Bangalore - 560001, India.