Click here to Skip to main content
16,019,614 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: Constants optimization Pin
CPallini26-Nov-07 11:22
mveCPallini26-Nov-07 11:22 
AnswerRe: Constants optimization Pin
hint_5426-Nov-07 11:50
hint_5426-Nov-07 11:50 
JokeRe: Constants optimization Pin
Nelek26-Nov-07 20:10
protectorNelek26-Nov-07 20:10 
GeneralRe: Constants optimization Pin
hint_5426-Nov-07 23:56
hint_5426-Nov-07 23:56 
QuestionInvertRgn Pin
bob1697226-Nov-07 8:44
bob1697226-Nov-07 8:44 
AnswerRe: InvertRgn Pin
Mark Salsbery26-Nov-07 8:47
Mark Salsbery26-Nov-07 8:47 
GeneralRe: InvertRgn Pin
bob1697226-Nov-07 8:56
bob1697226-Nov-07 8:56 
GeneralRe: InvertRgn Pin
Mark Salsbery26-Nov-07 9:02
Mark Salsbery26-Nov-07 9:02 
It works fine...here's a little test, a strange mix of MFC and native code...
    CImage img;
    img.Create(320,240,24);   <font color="Green">// creates a bitmap to select into the memory dc</font>
    HDC hmemdc = img.GetDC(); <font color="Green">// creates a memory DC with the bitmap selected into it</font>
    HRGN rgn = ::CreateRectRgn(20,20,100,100);
    ::InvertRgn(hmemdc, rgn);
    ::DeleteObject(rgn);
    CClientDC windowdc(this); <font color="Green">// DC for client area - same as ::GetDC()/::ReleaseDC()</font>
    ::BitBlt(windowdc, 10, 10, 320, 240, hmemdc, 0, 0, SRCCOPY);  <font color="Green">// just a test to see if rect got inverted</font>
    img.ReleaseDC();
Mark



Mark Salsbery
Microsoft MVP - Visual C++

Java | [Coffee]

GeneralRe: InvertRgn Pin
bob1697226-Nov-07 9:20
bob1697226-Nov-07 9:20 
GeneralRe: InvertRgn Pin
bob1697226-Nov-07 10:48
bob1697226-Nov-07 10:48 
GeneralRe: InvertRgn Pin
Mark Salsbery26-Nov-07 12:53
Mark Salsbery26-Nov-07 12:53 
GeneralRe: InvertRgn Pin
bob1697226-Nov-07 18:44
bob1697226-Nov-07 18:44 
GeneralRe: InvertRgn Pin
Mark Salsbery27-Nov-07 7:18
Mark Salsbery27-Nov-07 7:18 
GeneralRe: InvertRgn Pin
bob1697227-Nov-07 9:48
bob1697227-Nov-07 9:48 
GeneralRe: InvertRgn Pin
Mark Salsbery27-Nov-07 9:57
Mark Salsbery27-Nov-07 9:57 
GeneralRe: InvertRgn Pin
bob1697227-Nov-07 10:10
bob1697227-Nov-07 10:10 
GeneralRe: InvertRgn Pin
Mark Salsbery27-Nov-07 10:50
Mark Salsbery27-Nov-07 10:50 
QuestionLoad dll's Pin
Anthony Mushrow26-Nov-07 8:41
professionalAnthony Mushrow26-Nov-07 8:41 
AnswerRe: Load dll's Pin
Mark Salsbery26-Nov-07 8:44
Mark Salsbery26-Nov-07 8:44 
GeneralRe: Load dll's Pin
Anthony Mushrow26-Nov-07 8:49
professionalAnthony Mushrow26-Nov-07 8:49 
Questionnumber of open files limit Pin
Joezer BH26-Nov-07 8:08
professionalJoezer BH26-Nov-07 8:08 
AnswerRe: number of open files limit Pin
Mark Salsbery26-Nov-07 8:30
Mark Salsbery26-Nov-07 8:30 
AnswerRe: number of open files limit Pin
Stephen Hewitt26-Nov-07 13:08
Stephen Hewitt26-Nov-07 13:08 
QuestionTemplate function returning a variable of type T Pin
racette26-Nov-07 7:22
racette26-Nov-07 7:22 
AnswerRe: Template function returning a variable of type T Pin
Cedric Moonen26-Nov-07 7:28
Cedric Moonen26-Nov-07 7:28 

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.