Click here to Skip to main content
15,916,042 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Problem with SetTextColor Pin
Aviv Halperin31-May-04 9:16
Aviv Halperin31-May-04 9:16 
Generaldocumentation of jpeg format Pin
includeh1031-May-04 6:54
includeh1031-May-04 6:54 
GeneralRe: documentation of jpeg format Pin
Nirav Doshi31-May-04 9:11
Nirav Doshi31-May-04 9:11 
GeneralRe: documentation of jpeg format Pin
includeh1031-May-04 9:49
includeh1031-May-04 9:49 
GeneralRe: documentation of jpeg format Pin
Nirav Doshi31-May-04 22:23
Nirav Doshi31-May-04 22:23 
GeneralGradients Pin
Archer28231-May-04 6:35
Archer28231-May-04 6:35 
GeneralRe: Gradients Pin
f6431-May-04 8:00
f6431-May-04 8:00 
GeneralRe: Gradients Pin
TrungHuynh31-May-04 13:24
TrungHuynh31-May-04 13:24 
you can do follow:

void CBMSButton::GradientFillRect(HDC hDC, RECT& rc, COLORREF crLight, COLORREF crDark)
{
TRIVERTEX vert[2];
GRADIENT_RECT gRect;
vert [0].x = rc.left;
vert [0].y = rc.top;
vert [0].Red = GetRValue(crLight) << 8;
vert [0].Green = GetGValue(crLight) << 8;
vert [0].Blue = GetBValue(crLight) << 8;
vert [0].Alpha = 0x0000; // It's no use for GradientFill

vert [1].x = rc.right;
vert [1].y = rc.bottom;
vert [1].Red = GetRValue(crDark) << 8;
vert [1].Green = GetGValue(crDark) << 8;
vert [1].Blue = GetBValue(crDark) << 8;
vert [1].Alpha = 0x0000;

gRect.UpperLeft = 0;
gRect.LowerRight = 1;
GradientFill(hDC, vert, 2 , &gRect, 1, GRADIENT_FILL_RECT_V);
}

You must import library:
#pragma message(" Automatically linking with MSIMG32.LIB library")
#pragma comment(lib, "MSIMG32.LIB")
GeneralRe: Gradients The Best Pin
Sumit Kapoor31-May-04 18:04
Sumit Kapoor31-May-04 18:04 
GeneralRe: Gradients The Best Pin
Archer28231-May-04 18:09
Archer28231-May-04 18:09 
GeneralRe: Gradients The Best Pin
Sumit Kapoor31-May-04 19:25
Sumit Kapoor31-May-04 19:25 
GeneralRe: Gradients The Best (Mistake due to HTML) Pin
Sumit Kapoor31-May-04 18:19
Sumit Kapoor31-May-04 18:19 
GeneralRe: Gradients Pin
Rick York1-Jun-04 10:37
mveRick York1-Jun-04 10:37 
QuestionHow to add Controls in CView Pin
RedDragon2k31-May-04 4:59
RedDragon2k31-May-04 4:59 
AnswerRe: How to add Controls in CView Pin
valikac31-May-04 6:54
valikac31-May-04 6:54 
AnswerRe: How to add Controls in CView Pin
includeh1031-May-04 6:58
includeh1031-May-04 6:58 
AnswerRe: How to add Controls in CView Pin
David Crow1-Jun-04 4:03
David Crow1-Jun-04 4:03 
AnswerRe: How to add Controls in CView Pin
Anonymous1-Jun-04 9:47
Anonymous1-Jun-04 9:47 
Generalcommand line arguement for Win32 Pin
Member 115017631-May-04 4:58
Member 115017631-May-04 4:58 
GeneralRe: command line arguement for Win32 Pin
valikac31-May-04 6:55
valikac31-May-04 6:55 
GeneralRe: command line arguement for Win32 Pin
Member 115017631-May-04 17:59
Member 115017631-May-04 17:59 
GeneralRe: command line arguement for Win32 Pin
David Crow1-Jun-04 4:06
David Crow1-Jun-04 4:06 
GeneralRe: command line arguement for Win32 Pin
valikac1-Jun-04 6:42
valikac1-Jun-04 6:42 
GeneralRe: command line arguement for Win32 Pin
Nirav Doshi31-May-04 9:18
Nirav Doshi31-May-04 9:18 
GeneralDisplaying console of service applications Pin
Krishnan V31-May-04 4:44
Krishnan V31-May-04 4:44 

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.