Results 1 to 3 of 3

Thread: Off Screen Image processing

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2000
    Posts
    6
    I made an Active X control the uses 4 Picture objects to store bitmaps.
    I want to make changes to these bitmaps when the user of the control changes a color parameter of the control.
    How can I manipulate the data in the picture objects (without using on screen controls)?

    In other words, I need to read and write to a Picture object.

    Thanks..

  2. #2
    Fanatic Member
    Join Date
    Sep 1999
    Location
    Bethel, North Carolina, USA
    Posts
    987
    You need to load the images into an Offscreen DC and manipulate them in the background here are some API calls you should look into....

    Code:
    Declare Function CreateCompatibleBitmap Lib "gdi32" Alias "CreateCompatibleBitmap" (ByVal hdc As Long, ByVal nWidth As Long, ByVal nHeight As Long) As Long
    Declare Function CreateCompatibleDC Lib "gdi32" Alias "CreateCompatibleDC" (ByVal hdc As Long) As Long
    Declare Function SelectObject Lib "gdi32" Alias "SelectObject" (ByVal hdc As Long, ByVal hObject As Long) As Long
    Declare Function DeleteObject Lib "gdi32" Alias "DeleteObject" (ByVal hObject As Long) As Long
    Declare Function DeleteDC Lib "gdi32" Alias "DeleteDC" (ByVal hdc As Long) As Long
    Declare Function SetPixel Lib "gdi32" Alias "SetPixel" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long, ByVal crColor As Long) As Long
    Declare Function GetPixel Lib "gdi32" Alias "GetPixel" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long) As Long
    If you want some good tutorials check out Fox's website, I think he has some good tutorials never read them but he seems to know what he is doing, GOOD LUCK!
    Last edited by YoungBuck; Jan 29th, 2001 at 12:12 PM.
    {Insert random techno-babble here}

    {Insert quote from some long gone mofo here}

  3. #3

    Thread Starter
    New Member
    Join Date
    Aug 2000
    Posts
    6

    Thumbs up

    Hey, Thanks a lot !
    Read up on those API calls and managed to do it.

    Also, had a look in Fox's Website. He had a demo on just this subject (called OffScreenDC).

    Couldn't get better help

    Shpigi.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width