LVM_GETBKCOLOR returns -1

Win32 Programming

    Next

  • 1. pixels from webcam?
    Hi How can i read a pixels one screen with my web cam? I capturing images from my web cam but i cant read the pixels proprieties. When i record in a AVI and show on the form with TMediaPlayer taht work fine. Thanks Edward. for(xx = 0 ; xx < 320; xx++) { for(yy = 0; yy < 240; yy++) { Application->ProcessMessages(); test = bmpNew->Canvas->Pixels[xx][yy]; if(test != -1) { RichEditLog->Lines->Add(AnsiString(xx) + AnsiString(",") + AnsiString(yy) + AnsiString("=") + AnsiString(test)); } } } i have return -1.
  • 2. Capturing a window without displaying it?
    Hi, This is strange request, but I want to capture the output of a window without displaying it on the monitor. Is this possible? I have been able to capture the output in a second monitor on a multi-monitor setup, but now we need to eliminate the second monitor and still capture the output. If I could figure out how to get windows multiple monitor support to work when only one physical monitor was installed, I think I would be OK. But, windows and the video drivers seem to be detecting the lack of a monitor and shutting down the display for the second port on the video card if no monitor is present. Any thoughts? Thanks, jerry
  • 3. sample code for frame buffer mapping
    Is there a saple code available to map framebuffer to user allocated memory and modifying it from the user mode itself
  • 4. Color Keys and Video
    This may not be completely GDI related but here it goes: I am using a Macromedia flash control with a layered window to display the control with a transparent background. I am using the SetLayeredWindowAttributes function and a color key to achieve this. The problem is that the flash control may show video that uses the color key. This will cause unwanted tranparency in the video. I cannot use the UpdateLayeredWindow function because I would like the ability to update part of the window when painting. UpdateLayeredWindow requires the whole window to be repainted. Any one have any suggestions? Thanks.
  • 5. Setting print quality
    Hi, i experienced the following behaviour: Is used SetPrinter to change a printers "Print Quality" setting to DMRES_something. After the successful call, i used GetPrinter to re-read the settings but now the dwPrintQuality member of the DEVMODE structure doesn't contain DMRES_something, but some resolution in DPI! Another quite strange behaviour is, that I have a printer driver which maps two of the four DMRES_* values to the same DPI values. My problem is, that I want to display the current settings using radio buttons which represent the DMRES_* values, but it's difficult with DPI values, because I don't know which values the printer supports. Has anybody an idea how i can solve this problem and if it's possible to map DPI values to DMRES_* values? Thank you very much! Max

LVM_GETBKCOLOR returns -1

Postby sittingduck » Wed, 28 Apr 2004 00:18:45 GMT

Hello,

     I have noticed that XP's desktop window (actually SysListView32)
receives LVM_GETBKCOLOR and returns -1 for me. Does this mean its
background is completely transparent or just the icon text background
is transparent?

     I am trying to figure out if Progman or SysListView32 are the
ones painting the desktop wallpaper. I can't seem to figure out which
one it is. Do they both do it? My current understanding is that
SysListView32 gets LVM_GETBKCOLOR, returns -1, and Progman draws the
actual wallpaper. If this is the case, and I cannot subclass Progman
(I've read this in multiple places), then how am I supposed to safely
override the wallpaper-drawing code?

     I've tried causing LVM_GETBKCOLOR to return 1 (the color black)
and indeed the desktop wallpaper became solid black but the problem
then is when I drag a window back a forth across the desktop very
quickly I see Progman's wallpaper "leaking through" before the
SysListView32 background draws. Any ideas on how to solve this?

Thanks,
Gili

Re: LVM_GETBKCOLOR returns -1

Postby Timo Kunze » Wed, 28 Apr 2004 03:00:09 GMT

The SysListView32 class supports background images, so it's probably the 
listview that is drawing the wallpaper.
Also MSDN says the following for LVM_SETBKCOLOR:
Background color to set or the CLR_NONE value for no background color. 
List-view controls with background colors redraw themselves 
significantly faster than those without background colors.

HTH
Timo
-- 
www.TimoSoft-Software.de     English: www.en.TimoSoft-Software.de
Stopp TCPA/TCG & NGSCB/Palladium/DRM www.notcpa.org

Re: LVM_GETBKCOLOR returns -1

Postby sittingduck » Wed, 28 Apr 2004 07:42:09 GMT



Thanks Timo,

   FYI: What I actually saw is that unless LVM_GETBKCOLOR returned a
solid color (i.e. anything but -1) then the image specified by
LVM_GETBKIMAGE would keep on getting clobbered by the Program Manager
background. When LVM_GETBKCOLOR returned 1 (black), the image
specified by LVM_GETBKIMAGE would draw just fine.

Gili


Return to Win32 Programming

 

Who is online

Users browsing this forum: No registered users and 95 guest