Click here to Skip to main content
15,923,789 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: ToolBar won't un-hide correctly. Pin
bneacetp1-Jul-04 13:28
bneacetp1-Jul-04 13:28 
GeneralRe: ToolBar won't un-hide correctly. Pin
zooosta1-Jul-04 13:35
zooosta1-Jul-04 13:35 
GeneralRe: ToolBar won't un-hide correctly. Pin
bneacetp1-Jul-04 13:53
bneacetp1-Jul-04 13:53 
Generalquestion related to system font Pin
johnny,Kim30-Jun-04 20:26
johnny,Kim30-Jun-04 20:26 
GeneralUsing SpinButtonCtrl Pin
Shuang. Wu30-Jun-04 20:13
Shuang. Wu30-Jun-04 20:13 
GeneralRe: Using SpinButtonCtrl Pin
bneacetp1-Jul-04 0:05
bneacetp1-Jul-04 0:05 
GeneralRe: Using SpinButtonCtrl Pin
Shuang. Wu1-Jul-04 16:10
Shuang. Wu1-Jul-04 16:10 
GeneralRe: Using SpinButtonCtrl Pin
bneacetp1-Jul-04 16:45
bneacetp1-Jul-04 16:45 
Place code something like this (minus the lengthly comments) in your host dialog's OnInitDialog() function like:

// Sets the spinner control's buddy.  This can be done either by using the
// below method (using GetDlgItem()) or passing the edit box's variable
// by reference like SetBuddy(&m_editBox);.  
<code>m_spinner.SetBuddy(GetDlgItem(IDC_EDIT_BOX));</code>
// This next step would greatly depend on your personal preference according
// to your needs.  I just done this to set a value in the edit box.  This 
// also should be done according to your program's needs.
<code>GetDlgItem(IDC_EDIT_BOX)->SetWindowText("0");</code>
// Next, I set the range of the spinner control.  the first parameter is the 
// minimum value and the second parameter is the maximum value.
<code>m_spinner.SetRange(0, 100);</code>
// Next, I set told the spinner to deal with the edit box in terms of 
// integers.  The boolean at the end is for determining whether the value
// should ever be signed or not.
<code>m_spinner.SetDlgItemInt(IDC_EDIT_BOX, 0, FALSE);</code>


That should do it! I hope this clarifies things for you and aids you in your programming efforts. Best of luck on your projects! Big Grin | :-D

Happy Programming and God Bless!

"Your coding practices might be buggy, but your code is always right."

Internet::WWW::CodeProject::bneacetp
GeneralRe: Using SpinButtonCtrl Pin
Shuang. Wu1-Jul-04 19:17
Shuang. Wu1-Jul-04 19:17 
GeneralRe: Using SpinButtonCtrl Pin
bneacetp1-Jul-04 20:35
bneacetp1-Jul-04 20:35 
QuestionHow to find location of Button? Pin
Rajesh_K_Sharma30-Jun-04 18:56
Rajesh_K_Sharma30-Jun-04 18:56 
AnswerRe: How to find location of Button? Pin
Neville Franks30-Jun-04 23:54
Neville Franks30-Jun-04 23:54 
AnswerRe: How to find location of Button? Pin
Antony M Kancidrowski1-Jul-04 0:00
Antony M Kancidrowski1-Jul-04 0:00 
Questionare dialog boxes the way to go? Pin
AmericanBacon30-Jun-04 18:47
AmericanBacon30-Jun-04 18:47 
AnswerRe: are dialog boxes the way to go? Pin
Steve Mayfield30-Jun-04 19:02
Steve Mayfield30-Jun-04 19:02 
AnswerRe: are dialog boxes the way to go? Pin
palbano1-Jul-04 4:52
palbano1-Jul-04 4:52 
QuestionHow to insert Borland C++ program into a MFC thread? Pin
Einly30-Jun-04 17:49
Einly30-Jun-04 17:49 
AnswerRe: How to insert Borland C++ program into a MFC thread? Pin
valikac1-Jul-04 11:30
valikac1-Jul-04 11:30 
GeneralNeed help w/ a simple recursive function Pin
georgiek5030-Jun-04 17:29
georgiek5030-Jun-04 17:29 
GeneralRe: Need help w/ a simple recursive function Pin
georgiek5030-Jun-04 17:39
georgiek5030-Jun-04 17:39 
GeneralRe: Need help w/ a simple recursive function Pin
David Crow22-Jul-04 2:49
David Crow22-Jul-04 2:49 
GeneralDisplay high-resolution bitmap.. Pin
Chauhan Chirag30-Jun-04 17:08
Chauhan Chirag30-Jun-04 17:08 
GeneralRe: Display high-resolution bitmap.. Pin
Johan Rosengren30-Jun-04 20:14
Johan Rosengren30-Jun-04 20:14 
GeneralWindow Repaint problem Pin
Chauhan Chirag30-Jun-04 17:02
Chauhan Chirag30-Jun-04 17:02 
GeneralRe: Window Repaint problem Pin
Johan Rosengren30-Jun-04 20:26
Johan Rosengren30-Jun-04 20:26 

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.