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
K

klorin

@klorin
About
Posts
1
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • UpdateLayeredWindow() fails, GetLastError() == 0
    K klorin

    Hi. I have (in my oppinion) a VERY annoying and wierd problem. I'm using UpdateLayeredWindow() according to the code below. I do the FillRect() just for testing. But when I do this UpdateLayeredWindow() returns 0 which, according to the msdn documentation, indicates that the function failed and more info should be in GetLastError(). However, if I call GetLastError() just after UpdateLayeredWindow() it simply returns 0, indicating that there was no last error. I have remembered to set WS_EX_LAYERED... Could it be that FillRect() doesn't set any alpha information? Any ideas? Thanks. HDC dcScreen = ::GetDC(NULL); HDC dcMemory = ::CreateCompatibleDC(dcScreen); HBITMAP bmpMemory = ::CreateCompatibleBitmap(dcScreen, 500, 500); ::SelectObject(dcMemory, bmpMemory); BITMAP bitmap; GetObject(bmpMemory, sizeof(BITMAP), &bitmap); RECT rc = {0, 0, 100, 100}; ::FillRect(dcMemory, &rc, ::GetSysColorBrush(COLOR_HIGHLIGHTTEXT)); BLENDFUNCTION bf = {AC_SRC_OVER, 0, 255, AC_SRC_ALPHA}; UpdateLayeredWindow(m_hWnd, dcScreen, NULL, NULL, dcMemory, NULL, 0, &bf, ULW_ALPHA);

    Graphics help graphics testing beta-testing question
  • Login

  • Don't have an account? Register

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