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

C / C++ / MFC

 
GeneralRe: help with IF statement Pin
Ted Ferenc9-Jul-03 21:45
Ted Ferenc9-Jul-03 21:45 
GeneralRe: help with IF statement Pin
Rage9-Jul-03 21:51
professionalRage9-Jul-03 21:51 
GeneralRe: help with IF statement Pin
DaveE9th9-Jul-03 21:54
DaveE9th9-Jul-03 21:54 
GeneralRe: help with IF statement Pin
Rage9-Jul-03 23:01
professionalRage9-Jul-03 23:01 
GeneralRe: help with IF statement Pin
DaveE9th10-Jul-03 7:26
DaveE9th10-Jul-03 7:26 
GeneralThe UINT range problem in MFC. Pin
Kevein9-Jul-03 17:54
Kevein9-Jul-03 17:54 
GeneralRe: The UINT range problem in MFC. Pin
Neville Franks9-Jul-03 18:04
Neville Franks9-Jul-03 18:04 
GeneralRe: The UINT range problem in MFC. Pin
Kevein13-Jul-03 15:20
Kevein13-Jul-03 15:20 
Thanks a lot. Smile | :)
Just for those also interested it,

I get it done like this:

This method of extracting 32-bit scroll box positions works only in those scroll messages that are sent to a window when the user grabs the thumb and drags it. It is not possible to obtain 32-bit scroll box position in cases of programmatically sent SB_THUMBTRACK and SB_THUMBPOSITION scroll messages. First, the 32-bit information cannot be packed into the WPARAM of the messages because only the High Word contains the scroll position. Second, the nTrackPos member of the SCROLLINFO structure maintained for scroll bars cannot be set programmatically. Any calls to SetScrollInfo to set the immediate scroll positions are ignored by the operating system.
Sample Code
void CMyWnd::OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar)
{
if(nSBCode == SB_THUMBTRACK || nSBCode == SB_THUMBPOSITION)
{
// First determine if the user scrolled a scroll bar control
// on the window or scrolled the window itself
HWND hWndScroll;
if ( pScrollBar == NULL )
hWndScroll = m_hWnd;
else
hWndScroll = pScrollBar->m_hWnd;

SCROLLINFO info;
info.cbSize = sizeof(SCROLLINFO);
info.fMask = SIF_TRACKPOS;
::GetScrollInfo(hWndScroll, SB_HORZ, &info);

nPos = info.nTrackPos;
}

//......
//......
}

I found this from here:
http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support/kb/articles/q152/2/52.asp&NoWebContent=1
GeneralAuto Device Driver Installation.. Pin
Member 4048139-Jul-03 15:25
Member 4048139-Jul-03 15:25 
GeneralRe: Auto Device Driver Installation.. Pin
IceMatrix10-Jul-03 8:50
IceMatrix10-Jul-03 8:50 
GeneralThread Programming & Matlab Pin
samr679-Jul-03 14:50
samr679-Jul-03 14:50 
GeneralRe: Thread Programming & Matlab Pin
Abbas_Riazi9-Jul-03 18:17
professionalAbbas_Riazi9-Jul-03 18:17 
GeneralRe: Thread Programming & Matlab Pin
samr679-Jul-03 19:08
samr679-Jul-03 19:08 
GeneralRe: Thread Programming & Matlab Pin
kochhar10-Jul-03 14:32
kochhar10-Jul-03 14:32 
Questionfwrite error??? Pin
will13839-Jul-03 11:15
will13839-Jul-03 11:15 
AnswerRe: fwrite error??? Pin
Led9-Jul-03 11:23
Led9-Jul-03 11:23 
GeneralRe: fwrite error??? Pin
will13839-Jul-03 11:26
will13839-Jul-03 11:26 
GeneralRe: fwrite error??? Pin
will13839-Jul-03 11:32
will13839-Jul-03 11:32 
GeneralRe: fwrite error??? Pin
Neville Franks9-Jul-03 12:14
Neville Franks9-Jul-03 12:14 
AnswerRe: fwrite error??? Pin
Mustafa Demirhan9-Jul-03 12:54
Mustafa Demirhan9-Jul-03 12:54 
GeneralFinally! Pin
will138310-Jul-03 1:14
will138310-Jul-03 1:14 
GeneralConfused in abby Pin
PJ Arends9-Jul-03 11:03
professionalPJ Arends9-Jul-03 11:03 
GeneralRe: Confused in abby Pin
Led9-Jul-03 11:26
Led9-Jul-03 11:26 
GeneralRe: Confused in abby Pin
PJ Arends9-Jul-03 11:32
professionalPJ Arends9-Jul-03 11:32 
GeneralRe: Confused in abby Pin
Neville Franks9-Jul-03 12:11
Neville Franks9-Jul-03 12:11 

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.