Click here to Skip to main content
15,890,336 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: WM_COMMAND Pin
CPallini5-Mar-11 7:37
mveCPallini5-Mar-11 7:37 
QuestionMoving GDI+ objects question Pin
csrss5-Mar-11 2:13
csrss5-Mar-11 2:13 
AnswerRe: Moving GDI+ objects question Pin
Niklas L5-Mar-11 2:42
Niklas L5-Mar-11 2:42 
GeneralRe: Moving GDI+ objects question Pin
csrss5-Mar-11 3:36
csrss5-Mar-11 3:36 
GeneralRe: Moving GDI+ objects question Pin
Niklas L5-Mar-11 5:39
Niklas L5-Mar-11 5:39 
GeneralRe: Moving GDI+ objects question Pin
csrss5-Mar-11 6:16
csrss5-Mar-11 6:16 
AnswerRe: Moving GDI+ objects question Pin
Andrew Brock5-Mar-11 2:42
Andrew Brock5-Mar-11 2:42 
GeneralRe: Moving GDI+ objects question Pin
csrss5-Mar-11 3:04
csrss5-Mar-11 3:04 
Thanks guys Smile | :)
Looks like invalidating / redrawing window is the only way. This "ball" is actually a part of custom control i am writing (has its own window) - it is already double buffered.

case WM_PAINT: // custom control window paint handler
{
// some checks for need of repainting
Gdiplus::Graphics graphics(hdc);
Gdiplus::Bitmap *bmp = new Gdiplus::Bitmap(CtrlRect.right, CtrlRect.bottom);
Gdiplus::Graphics *temp = Gdiplus::Graphics::FromImage(bmp);
temp->SetSmoothingMode(Gdiplus::SmoothingMode::SmoothingModeAntiAlias);
// .. drawing goes here
// .. paint "ball" with new mouse coords
Gdiplus::CachedBitmap *cbmp = new Gdiplus::CachedBitmap(bmp, &graphics);
delete bmp;
delete temp;
graphics.DrawCachedBitmap(cbmp, 0, 0);
// done
}


Just thought it could be done a way smoother - without redrawing. Anyway, thanks Smile | :)
011011010110000101100011011010000110100101101110
0110010101110011

GeneralRe: Moving GDI+ objects question Pin
Andrew Brock5-Mar-11 3:09
Andrew Brock5-Mar-11 3:09 
GeneralRe: Moving GDI+ objects question Pin
csrss5-Mar-11 3:16
csrss5-Mar-11 3:16 
Question[solved] class size doesn't seem to be determined correctly [modified] Pin
Albert Holguin4-Mar-11 18:13
professionalAlbert Holguin4-Mar-11 18:13 
AnswerRe: class size doesn't seem to be determined correctly Pin
Niklas L4-Mar-11 23:14
Niklas L4-Mar-11 23:14 
GeneralRe: class size doesn't seem to be determined correctly Pin
Albert Holguin5-Mar-11 6:45
professionalAlbert Holguin5-Mar-11 6:45 
AnswerRe: class size doesn't seem to be determined correctly Pin
Ozer Karaagac4-Mar-11 23:22
professionalOzer Karaagac4-Mar-11 23:22 
GeneralRe: class size doesn't seem to be determined correctly Pin
Albert Holguin5-Mar-11 6:48
professionalAlbert Holguin5-Mar-11 6:48 
GeneralRe: class size doesn't seem to be determined correctly Pin
Albert Holguin5-Mar-11 10:21
professionalAlbert Holguin5-Mar-11 10:21 
GeneralRe: class size doesn't seem to be determined correctly Pin
Ozer Karaagac5-Mar-11 11:24
professionalOzer Karaagac5-Mar-11 11:24 
GeneralRe: class size doesn't seem to be determined correctly Pin
Albert Holguin5-Mar-11 11:42
professionalAlbert Holguin5-Mar-11 11:42 
AnswerRe: class size doesn't seem to be determined correctly Pin
CPallini4-Mar-11 23:34
mveCPallini4-Mar-11 23:34 
GeneralRe: class size doesn't seem to be determined correctly Pin
Albert Holguin5-Mar-11 6:50
professionalAlbert Holguin5-Mar-11 6:50 
AnswerRe: class size doesn't seem to be determined correctly Pin
Stephen Hewitt5-Mar-11 0:32
Stephen Hewitt5-Mar-11 0:32 
QuestionBest way to reduce a 128-bit MD5 to 64-bit Pin
Joe Woodbury4-Mar-11 12:04
professionalJoe Woodbury4-Mar-11 12:04 
AnswerRe: Best way to reduce a 128-bit MD5 to 64-bit PinPopular
Peter_in_27805-Mar-11 0:30
professionalPeter_in_27805-Mar-11 0:30 
GeneralRe: Best way to reduce a 128-bit MD5 to 64-bit Pin
Joe Woodbury5-Mar-11 6:04
professionalJoe Woodbury5-Mar-11 6:04 
QuestionCCriticalSection seems to cause some weirdness in dll Pin
Albert Holguin4-Mar-11 10:49
professionalAlbert Holguin4-Mar-11 10:49 

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.