Click here to Skip to main content
16,011,438 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: getting HBitmap handle from RBG data Pin
Antti Keskinen8-Jul-04 2:14
Antti Keskinen8-Jul-04 2:14 
GeneralConfiguration file in outlook Pin
BrockVnm7-Jul-04 9:46
BrockVnm7-Jul-04 9:46 
GeneralRe: Configuration file in outlook Pin
palbano7-Jul-04 10:11
palbano7-Jul-04 10:11 
GeneralRe: Configuration file in outlook Pin
BrockVnm7-Jul-04 10:29
BrockVnm7-Jul-04 10:29 
GeneralRe: Configuration file in outlook Pin
David Crow7-Jul-04 10:26
David Crow7-Jul-04 10:26 
QuestionScrollbars ?? Pin
0v3rloader7-Jul-04 8:53
0v3rloader7-Jul-04 8:53 
AnswerRe: Scrollbars ?? Pin
Edwin Brunner7-Jul-04 9:18
Edwin Brunner7-Jul-04 9:18 
AnswerRe: Scrollbars ?? Pin
Jesper Knudsen7-Jul-04 10:01
Jesper Knudsen7-Jul-04 10:01 
Hi
You may have to add ON_WM_VSCROLL() to your message map and implement the function, maybe something like this, which works for me. Think I stole some of it from mfc's own CScrollView, take a look here too. Don't know why this doesn't work automatically inside mfc. I feel like (by calling SetScrollPos()) I'm telling the scrollbar something it actually already knows. Well mfc is not alway intuitive, and always trying to figure out "why" will make you go nuts Confused | :confused: . Who knows why scrolling works like this, am I completely out of track here?

- Jesper

void EPropListCtrl::OnVScroll( UINT nSBCode, UINT nPos, CScrollBar* pScrollBar )
{
int nNewPos = -1;
int sp = GetScrollPos(SB_VERT);

if( nSBCode==SB_THUMBPOSITION || nSBCode==SB_THUMBTRACK )
{
nNewPos = nPos;
}
else if( nSBCode==SB_LINEUP )
{
sp -= 5;
nNewPos = sp;
}
else if( nSBCode==SB_LINEDOWN )
{
sp+=5;
nNewPos = sp;
}
else if( nSBCode==SB_PAGEUP )
{
sp-=20;
nNewPos = sp;
}
else if( nSBCode==SB_PAGEDOWN )
{
sp+=20;
nNewPos = sp;
}

if( nNewPos >= 0 )
{
SetScrollPos( SB_VERT , nNewPos );
Invalidate();
}
}


GeneralRe: Scrollbars ?? Pin
0v3rloader7-Jul-04 11:59
0v3rloader7-Jul-04 11:59 
GeneralRe: Scrollbars ?? Pin
Jesper Knudsen7-Jul-04 12:39
Jesper Knudsen7-Jul-04 12:39 
GeneralRe: Scrollbars ?? Pin
0v3rloader7-Jul-04 14:59
0v3rloader7-Jul-04 14:59 
GeneralOk. More Qs on CDynLinkLibrary and apparent leak. Pin
CherezZaboro7-Jul-04 8:18
CherezZaboro7-Jul-04 8:18 
GeneralCheck Boxes Pin
DanYELL7-Jul-04 8:15
DanYELL7-Jul-04 8:15 
GeneralRe: Check Boxes Pin
Ravi Bhavnani7-Jul-04 8:28
professionalRavi Bhavnani7-Jul-04 8:28 
Generalthread (?) question Pin
sandrineV7-Jul-04 7:53
sandrineV7-Jul-04 7:53 
GeneralRe: thread (?) question Pin
palbano7-Jul-04 9:30
palbano7-Jul-04 9:30 
GeneralRe: thread (?) question Pin
sandrineV8-Jul-04 2:55
sandrineV8-Jul-04 2:55 
QuestionMaximaze window ??? Pin
Larsson7-Jul-04 6:41
Larsson7-Jul-04 6:41 
AnswerRe: Maximaze window ??? Pin
jmkhael7-Jul-04 6:44
jmkhael7-Jul-04 6:44 
GeneralRe: Maximaze window ??? Pin
Larsson7-Jul-04 7:04
Larsson7-Jul-04 7:04 
GeneralRe: Maximaze window ??? Pin
jmkhael7-Jul-04 7:08
jmkhael7-Jul-04 7:08 
Generaluser mapping of shortcut keys Pin
John R. Shaw7-Jul-04 6:38
John R. Shaw7-Jul-04 6:38 
GeneralRe: user mapping of shortcut keys Pin
DavidR_r7-Jul-04 8:49
DavidR_r7-Jul-04 8:49 
GeneralRe: user mapping of shortcut keys Pin
John R. Shaw7-Jul-04 9:47
John R. Shaw7-Jul-04 9:47 
GeneralChging default printers Pin
Jim Barrett7-Jul-04 6:28
Jim Barrett7-Jul-04 6:28 

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.