Thread: GetPixel - Have a problem

  1. #1
    Registered User
    Join Date
    Jul 2007
    Posts
    2

    GetPixel - Have a problem

    I get the DC of the full screen ( - GetDc(0) - )
    When I use the GetPixel function everything OK but...
    When I play a dos game or playing a simple video the function returns a "Non True" color

    What is the problem - and how I can solve it?

    thanks in advance

    You can use the example from here to check it
    http://cboard.cprogramming.com/showp...84&postcount=3
    Last edited by yytg; 07-25-2007 at 09:50 AM.

  2. #2
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Can you explain what you actually get? Is the value returned the index in the LUT or just some random garbage?

    Also, have you tried using this in a STANDARD VGA driver, as the graphcis driver may actually be the source of what GetPixel returns.

    --
    Mats

  3. #3
    Registered User Queatrix's Avatar
    Join Date
    Apr 2005
    Posts
    1,342
    Maybe the bits are off?

  4. #4
    Registered User
    Join Date
    Jul 2007
    Posts
    2
    How I check it?

  5. #5
    Dr Dipshi++ mike_g's Avatar
    Join Date
    Oct 2006
    Location
    On me hyperplane
    Posts
    1,218
    When I play a dos game or playing a simple video the function returns a "Non True" color
    Maybe find out what bit depth the program runs at. Dos games ran in stuff like 16 or 256 colour mode. AFAIK "true colour" is 24 bit, with a Byte for each colour element. Lower bit depth colour modes tend to have to distribute the RGB bits unevenly. This may cause problems for your GetPixel function. I dont know.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Memory problem with Borland C 3.1
    By AZ1699 in forum C Programming
    Replies: 16
    Last Post: 11-16-2007, 11:22 AM
  2. Someone having same problem with Code Block?
    By ofayto in forum C++ Programming
    Replies: 1
    Last Post: 07-12-2007, 08:38 AM
  3. A question related to strcmp
    By meili100 in forum C++ Programming
    Replies: 6
    Last Post: 07-07-2007, 02:51 PM
  4. WS_POPUP, continuation of old problem
    By blurrymadness in forum Windows Programming
    Replies: 1
    Last Post: 04-20-2007, 06:54 PM
  5. beginner problem
    By The_Nymph in forum C Programming
    Replies: 4
    Last Post: 03-05-2002, 05:46 PM