Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Problem with MemDC on W2K

Problem with MemDC on W2K

Scheduled Pinned Locked Moved C / C++ / MFC
help
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    AnTri
    wrote on last edited by
    #1

    Hey, I've developed a custom control with uses a memDc to draw flickerfree. The control works perfectly on WinXP but not on W2k. In W2k is instead of the control a blank screen. Can somebody help me. CDC dcMem; CBitmap *bmpMem; CBitmap* pOldBmp=NULL; bmpMem = new CBitmap(); if(dcMem.CreateCompatibleDC(pDC)) { if(bmpMem->CreateCompatibleBitmap(pDC,iBitmapWidth,iBitmapHeight)) pOldBmp = dcMem.SelectObject(bmpMem); else return -10; } else return -9; //................Hier wird gezeichnet //------------------------------------- pDC->BitBlt(reRect.left, reRect.top, iBitmapWidth, iBitmapHeight, &dcMem, reRect.left, reRect.top +m_iVertScrollbarPos, SRCCOPY);

    J 1 Reply Last reply
    0
    • A AnTri

      Hey, I've developed a custom control with uses a memDc to draw flickerfree. The control works perfectly on WinXP but not on W2k. In W2k is instead of the control a blank screen. Can somebody help me. CDC dcMem; CBitmap *bmpMem; CBitmap* pOldBmp=NULL; bmpMem = new CBitmap(); if(dcMem.CreateCompatibleDC(pDC)) { if(bmpMem->CreateCompatibleBitmap(pDC,iBitmapWidth,iBitmapHeight)) pOldBmp = dcMem.SelectObject(bmpMem); else return -10; } else return -9; //................Hier wird gezeichnet //------------------------------------- pDC->BitBlt(reRect.left, reRect.top, iBitmapWidth, iBitmapHeight, &dcMem, reRect.left, reRect.top +m_iVertScrollbarPos, SRCCOPY);

      J Offline
      J Offline
      JWood
      wrote on last edited by
      #2

      I have had similar problems - sounds like it is creating a very large buffer because of some system dependent call that returns a very large value that causes an error. Check the Scrollbar values for example to see if this is the case - that it returns a large eroneous value.


      A cynic is a man who, when he smells flowers, looks around for a coffin.
      -H.L. Mencken

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups