Click here to Skip to main content
16,005,222 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionBest way to prevent frame resizing? Pin
Richard Everingham5-Mar-02 1:49
Richard Everingham5-Mar-02 1:49 
AnswerRe: Best way to prevent frame resizing? Pin
Tim Smith5-Mar-02 2:02
Tim Smith5-Mar-02 2:02 
AnswerRe: Best way to prevent frame resizing? Pin
Joaquín M López Muñoz5-Mar-02 2:09
Joaquín M López Muñoz5-Mar-02 2:09 
GeneralRe: Best way to prevent frame resizing? Pin
Richard Everingham5-Mar-02 2:11
Richard Everingham5-Mar-02 2:11 
GeneralRe: Best way to prevent frame resizing? Pin
Tim Smith5-Mar-02 3:50
Tim Smith5-Mar-02 3:50 
AnswerRe: Best way to prevent frame resizing? Pin
Michael P Butler5-Mar-02 2:09
Michael P Butler5-Mar-02 2:09 
GeneralSpin Control Pin
Daniel Visan4-Mar-02 23:55
Daniel Visan4-Mar-02 23:55 
GeneralRe: Spin Control Pin
Roger Allen5-Mar-02 1:49
Roger Allen5-Mar-02 1:49 
This is fairly easy to do. Do the following steps:

1: Set the range of value: If you want a step of 0.1 and a min equal to 0.0 and a max equal to 10.0, the range of value of your spin control must be 0-100 (100 = 10/0.1)

2: Add a message handler for WM_VSCROLL

void CDialog::OnVScroll ( UINT nSBCode, UINT nPos, CScrollBar* pScrollBar)
{
	if (nSBCode == SB_ENDSCROLL)
		return ;

	if (pScrollBar->GetDlgCtrlID() === IDC_SPIN) // your spin ID here
		{
		CString strValue ;
		strValue.Format("%3.1f", (double)(nPos / 10.0)) ;
		((CSpinButtonCtrl*)pScrollBar)->GetBuddy()->SetWindowText(strValue) ;
		}
}


Roger Allen
Sonork 100.10016

If I'm not breathing, I'm either dead or holding my breath.
A fool jabbers, while a wise man listens. But is he so wise to listen to the fool?
Generala non understandable debug error! Pin
Gérald Mercet4-Mar-02 22:58
Gérald Mercet4-Mar-02 22:58 
GeneralRe: a non understandable debug error! Pin
Joaquín M López Muñoz4-Mar-02 23:03
Joaquín M López Muñoz4-Mar-02 23:03 
GeneralRe: a non understandable debug error! Pin
Gérald Mercet4-Mar-02 23:09
Gérald Mercet4-Mar-02 23:09 
GeneralRe: a non understandable debug error! Pin
Joaquín M López Muñoz4-Mar-02 23:17
Joaquín M López Muñoz4-Mar-02 23:17 
GeneralRe: a non understandable debug error! Pin
Felix Cho5-Mar-02 2:40
Felix Cho5-Mar-02 2:40 
GeneralRe: a non understandable debug error! Pin
Gérald Mercet5-Mar-02 4:04
Gérald Mercet5-Mar-02 4:04 
Generalanother debug error! Pin
Gérald Mercet5-Mar-02 4:52
Gérald Mercet5-Mar-02 4:52 
GeneralRe: a non understandable debug error! Pin
Nish Nishant4-Mar-02 23:08
sitebuilderNish Nishant4-Mar-02 23:08 
GeneralClear BREAK queu signal on serial port Pin
dejan.n4-Mar-02 22:57
dejan.n4-Mar-02 22:57 
GeneralRe: Clear BREAK queu signal on serial port Pin
Tim Smith5-Mar-02 2:04
Tim Smith5-Mar-02 2:04 
GeneralRe: Clear BREAK queu signal on serial port Pin
dejan.n5-Mar-02 2:47
dejan.n5-Mar-02 2:47 
GeneralHelp with document pointer Pin
Richard Everingham4-Mar-02 22:56
Richard Everingham4-Mar-02 22:56 
GeneralRe: Help with document pointer Pin
Joaquín M López Muñoz4-Mar-02 23:02
Joaquín M López Muñoz4-Mar-02 23:02 
GeneralRe: Help with document pointer Pin
Richard Everingham4-Mar-02 23:12
Richard Everingham4-Mar-02 23:12 
GeneralRe: Help with document pointer Pin
Joaquín M López Muñoz4-Mar-02 23:30
Joaquín M López Muñoz4-Mar-02 23:30 
GeneralRe: Help with document pointer Pin
Richard Everingham4-Mar-02 23:47
Richard Everingham4-Mar-02 23:47 
Generaladvanced formatting static/listctrl columns Pin
peterchen4-Mar-02 22:14
peterchen4-Mar-02 22:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.