Click here to Skip to main content
16,012,153 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: CreateFile producing ERROR_INVALID_PARAMETER Pin
KellyR19-Jan-06 4:17
KellyR19-Jan-06 4:17 
Questionreading file header Pin
pnpfriend18-Jan-06 11:02
pnpfriend18-Jan-06 11:02 
AnswerRe: reading file header Pin
Stephen Hewitt18-Jan-06 12:30
Stephen Hewitt18-Jan-06 12:30 
GeneralRe: reading file header Pin
pnpfriend19-Jan-06 5:01
pnpfriend19-Jan-06 5:01 
GeneralRe: reading file header Pin
Blake Miller19-Jan-06 8:40
Blake Miller19-Jan-06 8:40 
QuestionCSliderCtrl redraw when transparent Pin
Jerry Ott III18-Jan-06 10:55
Jerry Ott III18-Jan-06 10:55 
AnswerRe: CSliderCtrl redraw when transparent Pin
Owner drawn18-Jan-06 17:57
Owner drawn18-Jan-06 17:57 
GeneralRe: CSliderCtrl redraw when transparent Pin
Jerry Ott III19-Jan-06 4:06
Jerry Ott III19-Jan-06 4:06 
Below is what I have for the OnCtrlColor and the OnEraseBkgnd functions that are in the class with the slider.
I'm still very new to the MFC stuff so basically just found parts of code other people have shown and have used that with hopes of actually learning it so I can make my own things.
Right now I just have the sliders not being transparent or anything so that they redraw correctly.

HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
{
HBRUSH hbr;
pDC->SetBkMode(TRANSPARENT);
pDC->SetTextColor(RGB(255,255,255));
hbr = (HBRUSH)GetStockObject( NULL_BRUSH );
return hbr;
}

BOOL OnEraseBkgnd(CDC* pDC)
{
CPen myPen[64] ;
int i ;
CRect rect ;
for (i = 0 ; i <= 60 ; i++)
myPen[i].CreatePen(PS_SOLID, 1, RGB (0,0,(i * 4)));
CPen *oldPen = pDC->SelectObject(&myPen[0]) ;
GetClientRect(&rect);
for(i = 0 ; i <= rect.bottom;)
{
pDC->MoveTo(0, i);
pDC->LineTo(rect.right, i);
i++;
pDC->SelectObject (&myPen[i * 64 / rect.bottom]);
}
pDC->SelectObject(oldPen) ;
return TRUE ;
}
QuestionVisual C++ and C programming Pin
thierrypp18-Jan-06 7:41
thierrypp18-Jan-06 7:41 
AnswerRe: Visual C++ and C programming Pin
Tombo18-Jan-06 8:02
Tombo18-Jan-06 8:02 
GeneralRe: Visual C++ and C programming Pin
FarPointer18-Jan-06 8:17
FarPointer18-Jan-06 8:17 
QuestionRe: Visual C++ and C programming Pin
David Crow18-Jan-06 8:27
David Crow18-Jan-06 8:27 
AnswerRe: Visual C++ and C programming Pin
thierrypp18-Jan-06 8:32
thierrypp18-Jan-06 8:32 
QuestionRe: Visual C++ and C programming Pin
David Crow18-Jan-06 8:39
David Crow18-Jan-06 8:39 
AnswerRe: Visual C++ and C programming Pin
thierrypp18-Jan-06 8:57
thierrypp18-Jan-06 8:57 
AnswerRe: Visual C++ and C programming Pin
thierrypp18-Jan-06 9:04
thierrypp18-Jan-06 9:04 
GeneralRe: Visual C++ and C programming Pin
David Crow18-Jan-06 9:16
David Crow18-Jan-06 9:16 
GeneralRe: Visual C++ and C programming Pin
thierrypp18-Jan-06 9:25
thierrypp18-Jan-06 9:25 
GeneralRe: Visual C++ and C programming Pin
David Crow18-Jan-06 9:58
David Crow18-Jan-06 9:58 
GeneralRe: Visual C++ and C programming Pin
thierrypp18-Jan-06 10:07
thierrypp18-Jan-06 10:07 
GeneralRe: Visual C++ and C programming Pin
BadKarma18-Jan-06 10:35
BadKarma18-Jan-06 10:35 
GeneralRe: Visual C++ and C programming Pin
thierrypp18-Jan-06 10:42
thierrypp18-Jan-06 10:42 
GeneralRe: Visual C++ and C programming Pin
Graham Bradshaw18-Jan-06 9:10
Graham Bradshaw18-Jan-06 9:10 
GeneralRe: Visual C++ and C programming Pin
thierrypp18-Jan-06 9:16
thierrypp18-Jan-06 9:16 
GeneralRe: Visual C++ and C programming Pin
BadKarma18-Jan-06 9:54
BadKarma18-Jan-06 9:54 

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.