Click here to Skip to main content
15,905,508 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to show a modal dialog in multithread app? Pin
Robert Kuster18-Dec-03 11:03
Robert Kuster18-Dec-03 11:03 
GeneralNumber of files in a directory Pin
Madmaximus18-Dec-03 10:04
Madmaximus18-Dec-03 10:04 
GeneralRe: Number of files in a directory Pin
greba18-Dec-03 11:50
greba18-Dec-03 11:50 
GeneralRe: Number of files in a directory Pin
Madmaximus18-Dec-03 11:59
Madmaximus18-Dec-03 11:59 
GeneralRe: Number of files in a directory Pin
greba18-Dec-03 12:23
greba18-Dec-03 12:23 
GeneralRe: Number of files in a directory Pin
Madmaximus19-Dec-03 2:29
Madmaximus19-Dec-03 2:29 
GeneralRe: Number of files in a directory Pin
greba19-Dec-03 8:21
greba19-Dec-03 8:21 
GeneralCSliderCtrl Range Setting Trouble Pin
Justin Cooke18-Dec-03 9:20
Justin Cooke18-Dec-03 9:20 
I'm having trouble using a CSliderCtrl. I'm trying to set the range from 0 -> 16384 by calling: m_sliderZoom.SetRange(0, 16384, FALSE); in the OnInitDialog() func.
Two strange things are happening. First, if I immediately call GetRange() on the control, it returns both min and max values as 0. Secondly, when I call GetRange() later in the code, the range is always from 0 -> 100.
So, why doesn't GetRange() at least return 0 -> 100 immediately after setting the range? And, more importantly, why am I unable to change the range from 0 -> 100? I've tried setting it to 0 -> 25, as well, with no difference in the final range.
Any help is greatly appreciated.Confused | :confused:

Here's what I think is the relevant code:

BOOL CSMRLocatorDlg::OnInitDialog()
{
// other stuff

m_sliderZoom.SetRange(0, 16384, FALSE);
int min;
int max;
m_sliderZoom.GetRange( min, max );
CString message;
message.Format( "Min: %d Max: %d", min, max );
AfxMessageBox( message );
// always "Min: 0 Max: 0"

// other stuff

}


// later in the code
void CSMRLocatorDlg::OnOut()
{
m_nZoomLevel = m_sliderZoom.GetPos();

CString message;
int min;
int max;
m_sliderZoom.GetRange( min, max );
message.Format( "Min: %d Max: %d", min, max );
AfxMessageBox( message );
// always "Min: 0 Max: 100"

}

GeneralRe: CSliderCtrl Range Setting Trouble Pin
Justin Cooke18-Dec-03 10:12
Justin Cooke18-Dec-03 10:12 
Generaldatabase probelm Pin
karteek18-Dec-03 7:09
karteek18-Dec-03 7:09 
GeneralRe: database probelm Pin
Jon Sagara18-Dec-03 7:41
Jon Sagara18-Dec-03 7:41 
GeneralRe: database probelm Pin
l a u r e n18-Dec-03 14:38
l a u r e n18-Dec-03 14:38 
GeneralRe: database probelm Pin
karteek18-Dec-03 20:31
karteek18-Dec-03 20:31 
GeneralFile handles Pin
Fabio Panzavolta18-Dec-03 6:50
Fabio Panzavolta18-Dec-03 6:50 
GeneralRe: File handles Pin
Alexander M.,18-Dec-03 8:02
Alexander M.,18-Dec-03 8:02 
GeneralCode Dependencies Pin
jmkhael18-Dec-03 6:46
jmkhael18-Dec-03 6:46 
GeneralRe: Code Dependencies Pin
John R. Shaw18-Dec-03 17:25
John R. Shaw18-Dec-03 17:25 
GeneralEncrypt and Decrypt data Pin
Anonymous18-Dec-03 6:46
Anonymous18-Dec-03 6:46 
General"Files are out of date" Pin
GeraldoLuiz18-Dec-03 5:46
GeraldoLuiz18-Dec-03 5:46 
GeneralRe: "Files are out of date" Pin
Christian Graus18-Dec-03 12:27
protectorChristian Graus18-Dec-03 12:27 
GeneralRe: "Files are out of date" Pin
GeraldoLuiz18-Dec-03 12:51
GeraldoLuiz18-Dec-03 12:51 
GeneralRe: "Files are out of date" Pin
Monty218-Dec-03 19:31
Monty218-Dec-03 19:31 
Generalgettting IP address of the system Pin
Anonymous18-Dec-03 5:34
Anonymous18-Dec-03 5:34 
GeneralRe: gettting IP address of the system Pin
Anonymous18-Dec-03 5:36
Anonymous18-Dec-03 5:36 
GeneralRe: gettting IP address of the system Pin
David Crow18-Dec-03 6:15
David Crow18-Dec-03 6:15 

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.