Search Results - CodeGuru Forums
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: Cambalinho

Page 1 of 35 1 2 3 4

Search: Search took 0.03 seconds.

  1. Replies
    6
    Views
    264

    Re: win32 - how can i build a Region?

    i know build a mask. the backcolor is white and the rest is black. i don't know the 3 BitBlt() raster combinations.
    but if i do that, it will hide the control backcolor?
  2. Re: win32 - how the ::DrawText() RECT can change the Region size?

    seems that the only way is draw the image, destroying the region and then create a new region:


    void DrawText(string strText,int PosX=0, int PosY=0)
    {
    // geting the text rectangle...
  3. Re: win32 - how the ::DrawText() RECT can change the Region size?

    but these code don't:

    char *text=(char*)inst->strCaption.c_str();

    RECT b={test.rcPaint.left+2, test.rcPaint.top, test.rcPaint.right-2, test.rcPaint.bottom};
    ...
  4. win32 - how the ::DrawText() RECT can change the Region size?

    see my DrawText():

    void DrawText(string strText, int x=0, int y=0)
    {
    // geting the text rectangle
    RECT r = { 0, 0, 0, 0 };
    char *text=(char*)strText.c_str();
    ...
  5. Replies
    6
    Views
    264

    Re: win32 - how can i build a Region?

    finally i have 1 working code:

    BYTE* Get24BitPixels(HBITMAP pBitmap, WORD *pwWidth, WORD *pwHeight)
    {
    // a bitmap object just to get bitmap width and height
    BITMAP bmpBmp;

    //...
  6. Re: [win32] - avoid flicker and do a correct redraw

    i have tested now. the parente using the WS_EX_COMPOSITED extended window style and the child control using the WS_EX_TRANSPARENT extended window style, but i get some flickers too.
    nothing better...
  7. Re: [win32] - avoid flicker and do a correct redraw

    lets going back, please.
    the flicker happens when 1 color 1 showed aboved other(like the show the backcolor 2 times), right?
    the WS_CLIPCHILDREN can resolve that, but i can when several problems...
  8. Re: win32 - how can i copy the parent background?

    that's why the BitBlt() give me a black rectangle. understood
    thanks for correct me
  9. Replies
    6
    Views
    264

    win32 - how can i build a Region?

    i have these code for create an Region:


    class MemoryDC
    {
    private:
    HDC memoryDC;

    public:
    MemoryDC ()
  10. Re: [win32] - avoid flicker and do a correct redraw

    the Layered, for child controls, only works with windows 8 or above
  11. win32 - how can i copy the parent background?

    is there any way for copy the parent background(behind the child control)?
  12. Re: [win32] - avoid flicker and do a correct redraw

    i'm confused with just 1 thing that i can't do with WS_CLIPCHILDREN :(
    the WS_CLIPCHILDREN don't let me clear the child control, unless i fill it with a rectangle.
    can i clear the child control...
  13. Re: [win32] - avoid flicker and do a correct redraw

    so the only way is copy the parent background, right?
  14. Re: [win32] - avoid flicker and do a correct redraw

    let me ask 1 thing: using the WS_CLIPCHILDREN, why the control ins't clean before use the WM_PAINT?(i'm testing these too)
  15. Re: [win32] - avoid flicker and do a correct redraw

    i can make it transparent, but without the WS_CLIPCHILDREN. without it, i have flickers :(
  16. Re: [win32] - avoid flicker and do a correct redraw

    depending the blnTransparent been true or false, i need show it transparent or with a brush with clrBackcolor(respectible)
  17. Re: [win32] - avoid flicker and do a correct redraw

    in these case i'm doing wrong :(
    why WS_CLIPCHILDREN style on parent window(is what avoid the flicker), don't let the child control been clear?
  18. Re: [win32] - avoid flicker and do a correct redraw

    that's true:

    case WM_ERASEBKGND:
    {
    HBRUSH bkBrush;
    if(inst->blnTransparent==true)
    {
    ...
  19. Re: [win32] - avoid flicker and do a correct redraw

    i need the control been complety clear and then:
    - if is transparent, don't show the brush color;
    - if isn't transparent, draw the brush color.
  20. Re: [win32] - avoid flicker and do a correct redraw

    i'm confused :(
  21. Re: [win32] - avoid flicker and do a correct redraw

    i'm doing it:

    case WM_ERASEBKGND:
    {
    if(inst->blnTransparent==true)
    {
    SetClassLongPtr(hwnd,...
  22. Re: [win32] - avoid flicker and do a correct redraw

    i'm confused..i thot that i was doing it :(
    from MSDN: "An application should return nonzero if it erases the background; otherwise, it should return zero."
    so what i'm doing wrong?
  23. Re: [win32] - avoid flicker and do a correct redraw

    1 - for do transparent i do(for all drawed controls):

    case WM_ERASEBKGND:
    {
    return (LRESULT)TRUE;
    }
    break;
    2 - for avoid flicker i add the...
  24. Re: [RESOLVED] win32: how detect if the Joystick is connected to pc?

    case WM_TIMER:
    {
    if(wParam==JoystickTimer)
    {
    if(JoystickIsConneted==false)
    break;

    ...
  25. Re: why a transparent static don't clean the last image before show the new one?

    now i have the problem resolved using the RedrawWindow() function:

    RECT d;
    GetClientRect(hwnd,&d);
    RedrawWindow(hwnd,&d,nullptr,RDW_UPDATENOW | RDW_INVALIDATE);
Results 1 to 25 of 855
Page 1 of 35 1 2 3 4


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center