Click here to Skip to main content
15,904,822 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionSkinning an application [modified] Pin
jlox3-Jun-06 14:02
jlox3-Jun-06 14:02 
AnswerRe: Skinning an application [modified] Pin
Hamid_RT4-Jun-06 0:51
Hamid_RT4-Jun-06 0:51 
QuestionMemDC bug? Pin
Jim Crafton3-Jun-06 12:25
Jim Crafton3-Jun-06 12:25 
AnswerRe: MemDC bug? [modified] Pin
bob169723-Jun-06 13:43
bob169723-Jun-06 13:43 
GeneralRe: MemDC bug? Pin
Jim Crafton3-Jun-06 13:47
Jim Crafton3-Jun-06 13:47 
QuestionTutorial About WinFX Pin
Muhammad Chitrali3-Jun-06 9:39
Muhammad Chitrali3-Jun-06 9:39 
AnswerRe: Tutorial About WinFX Pin
Hamid_RT4-Jun-06 0:55
Hamid_RT4-Jun-06 0:55 
QuestionError in alpha blending Pin
Luksky3-Jun-06 9:14
Luksky3-Jun-06 9:14 
AnswerRe: Error in alpha blending Pin
Jim Crafton3-Jun-06 13:49
Jim Crafton3-Jun-06 13:49 
AnswerRe: Error in alpha blending Pin
Hamid_RT4-Jun-06 0:53
Hamid_RT4-Jun-06 0:53 
GeneralRe: Error in alpha blending Pin
Luksky4-Jun-06 3:34
Luksky4-Jun-06 3:34 
QuestionUsing OSK.EXE inside W2K or XP Pin
jumbojetjames3-Jun-06 8:25
jumbojetjames3-Jun-06 8:25 
Questionwhy c++/mfc Pin
Muhammad Chitrali3-Jun-06 8:07
Muhammad Chitrali3-Jun-06 8:07 
AnswerRe: why c++/mfc Pin
bob169723-Jun-06 9:03
bob169723-Jun-06 9:03 
AnswerRe: why c++/mfc Pin
Rick York3-Jun-06 9:33
mveRick York3-Jun-06 9:33 
GeneralRe: why c++/mfc Pin
Trollslayer4-Jun-06 9:30
mentorTrollslayer4-Jun-06 9:30 
AnswerRe: why c++/mfc Pin
George L. Jackson3-Jun-06 10:00
George L. Jackson3-Jun-06 10:00 
QuestionHow to redefine HEX symbols Pin
tbrake3-Jun-06 7:56
tbrake3-Jun-06 7:56 
AnswerRe: How to redefine HEX symbols Pin
bob169723-Jun-06 8:47
bob169723-Jun-06 8:47 
GeneralRe: How to redefine HEX symbols Pin
tbrake3-Jun-06 8:57
tbrake3-Jun-06 8:57 
GeneralRe: How to redefine HEX symbols Pin
bob169723-Jun-06 9:24
bob169723-Jun-06 9:24 
GeneralRe: How to redefine HEX symbols Pin
bob169723-Jun-06 9:38
bob169723-Jun-06 9:38 
GeneralRe: How to redefine HEX symbols Pin
tbrake3-Jun-06 10:07
tbrake3-Jun-06 10:07 
QuestionPolygon and FrameRgn Pin
includeh103-Jun-06 7:00
includeh103-Jun-06 7:00 
AnswerRe: Polygon and FrameRgn Pin
bob169723-Jun-06 8:13
bob169723-Jun-06 8:13 
Here's some code to get the wheels turning. I used a couple of different things and meshed them together.

For what it's worth...

CPen pen;
CPen* pOldPen;

LOGBRUSH logBrush;
logBrush.lbStyle=BS_SOLID;
logBrush.lbColor=RGB(255,0,0);
logBrush.lbHatch=NULL;

if (pDC->BeginPath()) { // Start defining Path

CRect rect(0,0,150,150);
pDC->Rectangle(&rect); // Define the shape for the path

if (pDC->EndPath()) { // Finish defining path

CRgn rgn;
rgn.CreateFromPath(pDC);

if (pDC->SelectClipRgn(&rgn,RGN_COPY)) { // New clipping region

for (int i=0;i<150;i+=15) {
pen.CreatePen(PS_SOLID|PS_ENDCAP_SQUARE|PS_GEOMETRIC,(i/15),&logBrush,0,NULL);
pOldPen=pDC->SelectObject(&pen);
pDC->MoveTo(CPoint(i,150));
pDC->LineTo(CPoint(i+150,0));
pDC->SelectObject(pOldPen);
pen.DeleteObject();
}
}
}
}

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.