Click here to Skip to main content
15,885,435 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: link error Pin
linksys20065-Dec-07 12:24
linksys20065-Dec-07 12:24 
GeneralRe: link error Pin
Don Box5-Dec-07 17:41
Don Box5-Dec-07 17:41 
GeneralRe: link error Pin
linksys20066-Dec-07 12:12
linksys20066-Dec-07 12:12 
QuestionHow do I get rid of a DLL out of my project? Pin
Tim_at_sbc5-Dec-07 11:32
Tim_at_sbc5-Dec-07 11:32 
AnswerRe: How do I get rid of a DLL out of my project? Pin
Tim_at_sbc5-Dec-07 12:46
Tim_at_sbc5-Dec-07 12:46 
GeneralRe: How do I get rid of a DLL out of my project? Pin
ThatsAlok5-Dec-07 19:46
ThatsAlok5-Dec-07 19:46 
GeneralMap file format Pin
k rentz5-Dec-07 7:58
sussk rentz5-Dec-07 7:58 
QuestionDifferencies in dataplot between GDI and GDI+ while drawing the same coordinates Pin
JS5-Dec-07 7:04
JS5-Dec-07 7:04 
In a bigger project I found a strange behavior between GDI and GDI+. Drawing some lines with the same coordinates the GDI+ -lines where drawn a little bit lower than the GDI-lines. You can see this after a big zoom (5000 x), see OnInitialUpdate().
I created a MFC-C++ project with a single ScrollView to check this.

If you want to check my project or you have an answer, please send me a mail to

Johannes.Swida@t-online.de

thanks


Code:
void CgdiPlusTestView::OnDraw(CDC* pDC)
{
CgdiPlusTestDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
if (!pDoc)
return;

// draw some lines and a rectangle with alfa-components

SolidBrush cBrush(Color(128, 192, 192, 192));
Pen cPen(Color(255,255, 0, 0),1);
int ii,i;
Point cP[5];
HDC hdc=pDC->m_hDC;

// GDI+
Graphics graphics(hdc);
ii=graphics.SetPageUnit(UnitDisplay);
cP[0].X=295250; cP[0].Y=-506212;
cP[1].X=506559; cP[1].Y=-53058;
cP[2].X=493441; cP[2].Y=-46941;
cP[3].X=282132; cP[3].Y=-500095;
cP[4]=cP[0];
// GDI+ lines and rectangle are together
ii=graphics.FillPolygon(&cBrush,cP,4,FillModeAlternate);
for(i=1;i<5;i++) ii=graphics.DrawLine(&cPen,cP[i-1].X,cP[i-1].Y,cP[i].X,cP[i].Y);

// GDI lines are moved ???
for(i=1;i<5;i++) {
pDC->MoveTo( (int)cP[i-1].X, (int)cP[i-1].Y);
pDC->LineTo( (int)cP[i ].X, (int)cP[i ].Y);
}
}

void CgdiPlusTestView::OnInitialUpdate()
{
CScrollView::OnInitialUpdate();
CSize sizeTotal;
// TODO: Gesamte Größe dieser Ansicht berechnen
sizeTotal.cx = 1485000;
sizeTotal.cy = 1050000;
SetScrollSizes(MM_HIMETRIC, sizeTotal);
}
GeneralVC 2008 compiler errors [modified] - SOLVED Pin
Jim Crafton5-Dec-07 4:57
Jim Crafton5-Dec-07 4:57 
GeneralRe: VC 2008 compiler errors [modified] - SOLVED Pin
toxcct5-Dec-07 5:59
toxcct5-Dec-07 5:59 
Generalbackup network files - problem Pin
sgeocla5-Dec-07 3:58
sgeocla5-Dec-07 3:58 
QuestionHow do I load another programs Icon? Pin
RichardS715-Dec-07 2:23
RichardS715-Dec-07 2:23 
QuestionRe: How do I load another programs Icon? Pin
David Crow5-Dec-07 2:27
David Crow5-Dec-07 2:27 
GeneralRe: How do I load another programs Icon? Pin
Iain Clarke, Warrior Programmer5-Dec-07 3:36
Iain Clarke, Warrior Programmer5-Dec-07 3:36 
AnswerRe: How do I load another programs Icon? Pin
RichardS715-Dec-07 4:43
RichardS715-Dec-07 4:43 
GeneralCInternetSession Problem Pin
Amar Sutar5-Dec-07 1:15
Amar Sutar5-Dec-07 1:15 
GeneralRe: CInternetSession Problem Pin
David Crow5-Dec-07 2:30
David Crow5-Dec-07 2:30 
GeneralRe: CInternetSession Problem Pin
Amar Sutar5-Dec-07 17:22
Amar Sutar5-Dec-07 17:22 
GeneralRe: CInternetSession Problem Pin
Mark Salsbery6-Dec-07 3:31
Mark Salsbery6-Dec-07 3:31 
GeneralRe: CInternetSession Problem Pin
Amar Sutar6-Dec-07 4:15
Amar Sutar6-Dec-07 4:15 
QuestionStruct or class? Pin
George_George5-Dec-07 0:50
George_George5-Dec-07 0:50 
AnswerRe: Struct or class? Pin
CPallini5-Dec-07 1:08
mveCPallini5-Dec-07 1:08 
AnswerRe: Struct or class? Pin
toxcct5-Dec-07 2:25
toxcct5-Dec-07 2:25 
AnswerRe: Struct or class? Pin
followait5-Dec-07 16:05
followait5-Dec-07 16:05 
QuestionHow to add a ComboBox to Browseinfo? Pin
moye25015-Dec-07 0:11
moye25015-Dec-07 0: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.