Click here to Skip to main content
15,888,454 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Linkage Problem Pin
Member 1125835327-Mar-15 3:07
Member 1125835327-Mar-15 3:07 
QuestionNeed to open an instance of excel in the same process as my main program. Pin
Raj Abhishek26-Mar-15 4:15
Raj Abhishek26-Mar-15 4:15 
AnswerRe: Need to open an instance of excel in the same process as my main program. Pin
Melqui Andrade31-Mar-15 2:10
Melqui Andrade31-Mar-15 2:10 
QuestionControls, variable and dialogs Pin
lor7526-Mar-15 1:10
lor7526-Mar-15 1:10 
AnswerRe: Controls, variable and dialogs Pin
David Crow26-Mar-15 3:26
David Crow26-Mar-15 3:26 
GeneralRe: Controls, variable and dialogs Pin
lor7526-Mar-15 4:19
lor7526-Mar-15 4:19 
AnswerRe: Controls, variable and dialogs Pin
Freak3030-Mar-15 1:22
Freak3030-Mar-15 1:22 
Questionwin32 - how avoid flickers? Pin
Member 1154582425-Mar-15 11:50
Member 1154582425-Mar-15 11:50 
for avoid flickers i must do:
1 - use the WS_CLIPCHILDREN on parent window;
2 -
C++
case WM_ERASEBKGND:
                {
                    return (LRESULT) 1;
                }
                break;

seems be used only on parent window too.
the child controls are transparent:
(i use the button class for create a label. why?!? because be correctly transparent using the BS_OWNERDRAW style.)
C++
case WM_ERASEBKGND:
            {
                return (LRESULT)1;
            }
            break;

            case WM_CTLCOLORSTATIC:
            {
                return (LRESULT)GetStockObject(NULL_BRUSH);
            }
            break;
            case WM_PAINT:
            {
                PAINTSTRUCT test;
                BeginPaint(hwnd, &test);
                image imglabel(test.rcPaint.right-test.rcPaint.left,test.rcPaint.bottom - test.rcPaint.top);
                brush brshbackcolor(inst->clrBackColor);
                brshbackcolor.ToDC(imglabel);
                brush brshTransparent;

                FillRect(imglabel,&test.rcPaint,brshbackcolor);
                if(inst->imgtest.haveimage())
                    DrawHICONtoHDC(imglabel, inst->imgtest,1,1);
                SetBkMode(imglabel,TRANSPARENT);
                char *text=(char*)inst->strCaption.c_str();
                SetTextColor(imglabel,inst->clrTextColor );
                DrawTextEx(imglabel,text,-1,&test.rcPaint,DT_LEFT,NULL);
                if(inst->blnBorder==true)
                    DrawEdge(imglabel, &test.rcPaint,BDR_SUNKENINNER | BDR_RAISEDOUTER,BF_RECT);
                TransparentBlt(test.hdc,0,0,test.rcPaint.right,test.rcPaint.bottom,imglabel,0,0,test.rcPaint.right,test.rcPaint.bottom, inst->clrBackColor);
                //BitBlt(test.hdc,0,0,test.rcPaint.right,test.rcPaint.bottom,imglabel,0,0, SRCCOPY);
                EndPaint(hwnd, &test);
                return 0;
            }
            break;

and the how i readraw the window:
C++
RECT d;
                GetClientRect(hwnd,&d);
                RedrawWindow(hwnd,&d,nullptr,RDW_UPDATENOW | RDW_INVALIDATE | RDW_ERASENOW);

but when, with animation\timer, the next image is drawed above the older one, instead clean all control and then redraw it.
(i need avoid the flicker and draw the control correctly and not 1 image above other)
can anyone advice me?
QuestionVisual Studio C++ compiler empty functions Pin
severin025-Mar-15 10:28
severin025-Mar-15 10:28 
AnswerRe: Visual Studio C++ compiler empty functions Pin
Richard Andrew x6425-Mar-15 15:39
professionalRichard Andrew x6425-Mar-15 15:39 
AnswerRe: Visual Studio C++ compiler empty functions Pin
Daniel Pfeffer25-Mar-15 23:00
professionalDaniel Pfeffer25-Mar-15 23:00 
AnswerRe: Visual Studio C++ compiler empty functions Pin
Maximilien26-Mar-15 4:38
Maximilien26-Mar-15 4:38 
QuestionUnable to get WTS_SESSION_LOGON event notification. How to capture the event when user log on to the machine.? Pin
mbatra3124-Mar-15 0:09
mbatra3124-Mar-15 0:09 
QuestionIs there a way to accelerate the following algorithm for hamming distance calculation? By assembly language? Pin
prime_tang23-Mar-15 23:37
prime_tang23-Mar-15 23:37 
AnswerRe: Is there a way to accelerate the following algorithm for hamming distance calculation? By assembly language? Pin
Richard MacCutchan24-Mar-15 3:40
mveRichard MacCutchan24-Mar-15 3:40 
AnswerRe: Is there a way to accelerate the following algorithm for hamming distance calculation? By assembly language? Pin
Jochen Arndt24-Mar-15 4:14
professionalJochen Arndt24-Mar-15 4:14 
AnswerRe: Is there a way to accelerate the following algorithm for hamming distance calculation? By assembly language? Pin
Chris Losinger24-Mar-15 9:06
professionalChris Losinger24-Mar-15 9:06 
SuggestionRe: Is there a way to accelerate the following algorithm for hamming distance calculation? By assembly language? Pin
.Shoaib25-Mar-15 6:35
.Shoaib25-Mar-15 6:35 
AnswerRe: Is there a way to accelerate the following algorithm for hamming distance calculation? By assembly language? Pin
jschell25-Mar-15 10:58
jschell25-Mar-15 10:58 
AnswerRe: Is there a way to accelerate the following algorithm for hamming distance calculation? By assembly language? Pin
Stefan_Lang8-Apr-15 4:52
Stefan_Lang8-Apr-15 4:52 
QuestionLink Error Which .lib to include Pin
ForNow21-Mar-15 19:28
ForNow21-Mar-15 19:28 
AnswerRe: Link Error Which .lib to include Pin
Richard MacCutchan21-Mar-15 23:58
mveRichard MacCutchan21-Mar-15 23:58 
GeneralRe: Link Error Which .lib to include Pin
ForNow22-Mar-15 16:50
ForNow22-Mar-15 16:50 
GeneralRe: Link Error Which .lib to include Pin
Frankie-C23-Mar-15 0:36
Frankie-C23-Mar-15 0:36 
GeneralRe: Link Error Which .lib to include Pin
ForNow23-Mar-15 2:10
ForNow23-Mar-15 2:10 

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.