long!=long? //RECT problem
-
RECT rect; LPCRECT rect2; AfxGetApp()->GetMainWnd()->GetClientRect(&rect); rect2->left=rect.left; rect2->right=rect.right; rect2->top=rect.top; rect2->bottom=rect.bottom/6; cdc->FillRect(rect2,cb); :wtf::confused: Why isn't this thing working? I know no other way of copying rects. Any suggestions are welcome. --- Blääh
-
RECT rect; LPCRECT rect2; AfxGetApp()->GetMainWnd()->GetClientRect(&rect); rect2->left=rect.left; rect2->right=rect.right; rect2->top=rect.top; rect2->bottom=rect.bottom/6; cdc->FillRect(rect2,cb); :wtf::confused: Why isn't this thing working? I know no other way of copying rects. Any suggestions are welcome. --- Blääh
LPCRECT is a pointer, so do this:
RECT rect;
RECT rect2templ;
LPCRECT rect2 = &rect2templ;
AfxGetApp()->GetMainWnd()->GetClientRect(&rect);
rect2->left=rect.left; rect2->right=rect.right;
rect2->top=rect.top; rect2->bottom=rect.bottom/6;
cdc->FillRect(rect2,cb);:-D Dominik
_outp(0x64, 0xAD);
and__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do?? ;) (doesn't work on NT) -
LPCRECT is a pointer, so do this:
RECT rect;
RECT rect2templ;
LPCRECT rect2 = &rect2templ;
AfxGetApp()->GetMainWnd()->GetClientRect(&rect);
rect2->left=rect.left; rect2->right=rect.right;
rect2->top=rect.top; rect2->bottom=rect.bottom/6;
cdc->FillRect(rect2,cb);:-D Dominik
_outp(0x64, 0xAD);
and__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do?? ;) (doesn't work on NT) -
RECT rect; LPCRECT rect2; AfxGetApp()->GetMainWnd()->GetClientRect(&rect); rect2->left=rect.left; rect2->right=rect.right; rect2->top=rect.top; rect2->bottom=rect.bottom/6; cdc->FillRect(rect2,cb); :wtf::confused: Why isn't this thing working? I know no other way of copying rects. Any suggestions are welcome. --- Blääh
Ask yourself the following question; Where does rect2 point? Also, since you're using MFC, why not use
CRect
? -- Sancte Míchael Archángele, defénde nos in proélio contra nequítiam et insídias diáboli esto præsídium. Imperet illi Deus, súpplices deprecámur: tuque, princeps milítiæ cæléstis, Sátanam aliósque spíritus malígnos, qui ad perditiónem animárum pervagántur in mundo, divína virtúte, In inférnum detrude. Amen. -
RECT rect; LPCRECT rect2; AfxGetApp()->GetMainWnd()->GetClientRect(&rect); rect2->left=rect.left; rect2->right=rect.right; rect2->top=rect.top; rect2->bottom=rect.bottom/6; cdc->FillRect(rect2,cb); :wtf::confused: Why isn't this thing working? I know no other way of copying rects. Any suggestions are welcome. --- Blääh
Why not try this:
CRect rect, rect2; AfxGetApp()->GetMainWnd()GetClientRect(&rect); rect2 = rect; rect2.bottom /= 6; cdc->FillRect(rect2, cb);
OrCRect rect; AfxGetApp()->GetMainWnd()GetClientRect(&rect); rect.bottom /= 6; cdc->FillRect(rect, cb);
if you don't have to use rect anyfurther... Wout Louwers