Thread: Bitmap

  1. #1
    Mr Ed


    Ok, i am using the following code to put a bitmap.

    m_rcPosition.Width(), m_rcPosition.Height(),
    &dcMem, 0, 0, bmInfo.bmWidth, bmInfo.bmHeight, SRCAND);

    Now what happens is the bitmaps comes on the screen in the user selected rectangle, After the user has released the LButton.

    I would like that bitmap be displayed while user is selecting the region, so user can properly set the size. That is bitmap be displayed in the rubber band box.

    win98 vc6

  2. #2
    Normal vector Carlos's Avatar
    Join Date
    Sep 2001
    Well, do the stretching (StretchBlt) to the CompatibleDC, then copy the CompatibleDC with BitBlt to the DisplayDC.
    Using WinAPI:

    StretchBlt( hdcScaled,
    0, 0,
    bmInfo.bmWidth * SCALE_FACTOR_X, bmInfo.bmHeight * SCALE_FACTOR_Y,
    dcSource, // a compatible DC wich contains the original image
    0, 0,
    bmInfo.bmWidth, bmInfo.bmHeight,
    SRCCOPY );

    BitBlt( hdcWin, // your display DC
    bmInfo.bmWidth, bmInfo.bmHeight,
    SRCCOPY );

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Loading a bitmap (Without using glaux)
    By Shamino in forum Game Programming
    Replies: 7
    Last Post: 03-16-2006, 09:43 AM
  2. OpenGL -- Bitmaps
    By HQSneaker in forum Game Programming
    Replies: 14
    Last Post: 09-06-2004, 04:04 PM
  3. Loading a Bitmap resource for OpenGL Texture[x]
    By the dead tree in forum Game Programming
    Replies: 4
    Last Post: 08-26-2004, 01:12 PM
  4. bitmap not going onto screen
    By stallion in forum Windows Programming
    Replies: 4
    Last Post: 02-22-2003, 10:07 AM
  5. texture is all white in opengl!
    By Crossbow in forum Game Programming
    Replies: 7
    Last Post: 03-31-2002, 11:54 AM