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
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. StretchBlt - logical units ?

StretchBlt - logical units ?

Scheduled Pinned Locked Moved C / C++ / MFC
helpquestion
6 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    TalSt
    wrote on last edited by
    #1

    Hello, Do you know what it means logical units at the help (MSDN) of StretchBlt ? I found problem to define to origin at this function... Thanks! :confused:

    H G H 3 Replies Last reply
    0
    • T TalSt

      Hello, Do you know what it means logical units at the help (MSDN) of StretchBlt ? I found problem to define to origin at this function... Thanks! :confused:

      H Offline
      H Offline
      Hanan888
      wrote on last edited by
      #2

      you better post the link :) I got the documentation about Windows GDI . Without knowing anything I guess origin (0,0) is the top left corner of the window, and logical coordinates are pixels.

      G 1 Reply Last reply
      0
      • T TalSt

        Hello, Do you know what it means logical units at the help (MSDN) of StretchBlt ? I found problem to define to origin at this function... Thanks! :confused:

        G Offline
        G Offline
        Graham Shanks
        wrote on last edited by
        #3

        TalSt wrote:

        Do you know what it means logical units at the help (MSDN) of StretchBlt ?

        This[^] explains it

        Graham Librarians rule, Ook!

        1 Reply Last reply
        0
        • H Hanan888

          you better post the link :) I got the documentation about Windows GDI . Without knowing anything I guess origin (0,0) is the top left corner of the window, and logical coordinates are pixels.

          G Offline
          G Offline
          Graham Shanks
          wrote on last edited by
          #4

          Hanan888 wrote:

          logical coordinates are pixels.

          Only in MM_TEXT mode, see here[^]

          Graham Librarians rule, Ook!

          1 Reply Last reply
          0
          • T TalSt

            Hello, Do you know what it means logical units at the help (MSDN) of StretchBlt ? I found problem to define to origin at this function... Thanks! :confused:

            H Offline
            H Offline
            Hamid Taebi
            wrote on last edited by
            #5

            Do you want to print any thing?

            T 1 Reply Last reply
            0
            • H Hamid Taebi

              Do you want to print any thing?

              T Offline
              T Offline
              TalSt
              wrote on last edited by
              #6

              Hello, I want to draw a BYTE* array on the screen by creating a bitmap and use StrechBlt function. The problem was that the origin point was not (top, left) but (bottom, left). I thought that it may be the StrechBlt function but finally I found that the problem is the creation of the bitmap from the BYTE* array. The fix is: m_bitmapInfo.bmiHeader.biHeight = -m_nImageHeight; // top-down DIB The height should be -. // Populate bitmapinfo header m_bitmapInfo.bmiHeader.biSize = m_nBitmapInfoSize; m_bitmapInfo.bmiHeader.biWidth = m_nImageWidth; m_bitmapInfo.bmiHeader.biHeight = -m_nImageHeight; // top-down DIB m_bitmapInfo.bmiHeader.biPlanes = 1; m_bitmapInfo.bmiHeader.biBitCount = BPP; m_bitmapInfo.bmiHeader.biSizeImage = m_nImageSize; m_bitmapInfo.bmiHeader.biCompression = BI_RGB; m_bitmapInfo.bmiHeader.biClrImportant = 0; m_bitmapInfo.bmiHeader.biClrUsed = 0; m_bitmapInfo.bmiHeader.biXPelsPerMeter = 0; m_bitmapInfo.bmiHeader.biYPelsPerMeter = 0; Thanks for all!

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

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