Einzelnen Beitrag anzeigen

Benutzerbild von Garfield
Garfield

Registriert seit: 9. Jul 2004
Ort: Aken (Anhalt-Bitterfeld)
1.335 Beiträge
 
Delphi XE5 Professional
 
#88

Re: Bildschirmlupe - Bereich unter Formular ermitteln

  Alt 4. Jan 2009, 18:53
Das Beispiel von http://msdn.microsoft.com/en-us/library/aa969541.aspx

Code:
 HRESULT hr = S_OK;

   //Register Thumbnail
   HTHUMBNAIL thumbnail = NULL;

   hr = DwmRegisterThumbnail(hwnd, FindWindow(_T("Progman"), NULL), &thumbnail);
   if (SUCCEEDED(hr))
   {
      //destination rectangle size
      RECT dest = {0,50,100,150};

      //Set thumbnail properties for use
      DWM_THUMBNAIL_PROPERTIES dskThumbProps;
      dskThumbProps.dwFlags = DWM_TNP_RECTDESTINATION | DWM_TNP_VISIBLE | DWM_TNP_SOURCECLIENTAREAONLY;
      //use window frame and client area
      dskThumbProps.fSourceClientAreaOnly = FALSE;
      dskThumbProps.fVisible = TRUE;
      dskThumbProps.opacity = (255 * 70)/100;
      dskThumbProps.rcDestination = dest;

      //display the thumbnail
      hr = DwmUpdateThumbnailProperties(thumbnail,&dskThumbProps);
      if (SUCCEEDED(hr))
      {
         //do more things
      }
   }
   return hr;
Sieht so aus, als könnte es funktionieren: http://msdn.microsoft.com/en-us/libr...02(VS.85).aspx

Code:
DWM_THUMBNAIL_PROPERTIES Structure

Specifies Desktop Window Manager (DWM) thumbnail properties.

Syntax

    typedef struct _DWM_THUMBNAIL_PROPERTIES {
        DWORD dwFlags;
        RECT rcDestination;
        RECT rcSource;
        BYTE opacity;
        BOOL fVisible;
        BOOL fSourceClientAreaOnly;
    } DWM_THUMBNAIL_PROPERTIES, *PDWM_THUMBNAIL_PROPERTIES;

Members

    dwFlags
        A bitwise combination of DWM Thumbnail Constants values indicating which members are set.
    rcDestination
        The rectangle in the destination window the thumbnail will be rendered.
    rcSource
        The rectangle specifying the region of the source window to use as the thumbnail. The default is to use the entire window as the thumbnail.
    opacity
        The opacity with which to render the thumbnail. 0 is fully transparent while 255 is fully opaque. The default value is 255.
    fVisible
        TRUE to make the thumbnail visible; FALSE to make the thumbnail invisible. The default is FALSE.
    fSourceClientAreaOnly
        TRUE to only use the thumbnail source's client area; otherwise, FALSE; The default is FALSE.
http://11011.net/archives/000651.html + http://11011.net/archives/000653.html

http://www.youtube.com/watch?v=pSaN5...p://siwu.info/

Ein C# Beispiel mit Source: http://community.bartdesmet.net/blog...0/05/4495.aspx
Etwas in Delphi: http://www.delphipraxis.net/internal...ct.php?t=89270
Gruss Garfield
Ubuntu 22.04: Laz2.2.2/FPC3.2.2 - VirtBox6.1+W10: D7PE, DXE5Prof
  Mit Zitat antworten Zitat