Using Win32 functions in Visual FoxPro Image Gallery
Bitmap
..msdn
AlphaBlend
BitBlt
CreateCompatibleBitmap
CreateDIBSection
GetDIBits
GradientFill
LoadBitmap
StretchBlt
StretchDIBits
Code examples:
Displaying bitmap using the AlphaBlend function
AlphaBlend
..msdn    Add comment     W32 Constants      Translate this page
The AlphaBlend function displays bitmaps that have transparent or semitransparent pixels.
Code examples:
Displaying bitmap using the AlphaBlend function
Declaration:
 
BOOL AlphaBlend(
  HDC hdcDest,             // handle to dest DC
  int nXOriginDest,        // x-coord upper-left
  int nYOriginDest,        // y-coord upper-left
  int nWidthDest,          // destination width
  int nHeightDest,         // destination height
  HDC hdcSrc,              // handle to source DC
  int nXOriginSrc,         // x-coord upper-left
  int nYOriginSrc,         // y-coord upper-left
  int nWidthSrc,           // source width
  int nHeightSrc,          // source height
  BLENDFUNCTION blendFunc  // alpha-blending func
);
 
FoxPro declaration:
 
DECLARE INTEGER AlphaBlend IN Msimg32;
    INTEGER hDestDC,;
    INTEGER x,;
    INTEGER y,;
    INTEGER nWidth,;
    INTEGER nHeight,;
    INTEGER hSrcDC,;
    INTEGER xSrc,;
    INTEGER ySrc,;
    INTEGER nWidthSrc,;
    INTEGER nHeightSrc,;
    INTEGER blendFunction
 
 
Parameters:
hdcDest
[in] Handle to the destination device context.

nXOriginDest
[in] Specifies the x-coordinate, in logical units, of the upper-left corner of the destination rectangle.

nYOriginDest
[in] Specifies the y-coordinate, in logical units, of the upper-left corner of the destination rectangle.

nWidthDest
[in] Specifies the width, in logical units, of the destination rectangle.

nHeightDest
[in] Specifies the height, in logical units, of the destination rectangle.

hdcSrc
[in] Handle to the source device context.

nXOriginSrc
[in] Specifies the x-coordinate, in logical units, of the upper-left corner of the source rectangle.

nYOriginSrc
[in] Specifies the y-coordinate, in logical units, of the upper-left corner of the source rectangle.

nWidthSrc
[in] Specifies the width, in logical units, of the source rectangle.

nHeightSrc
[in] Specifies the height, in logical units, of the source rectangle.

blendFunction
[in] Specifies the alpha-blending function for source and destination bitmaps.
Return value:
If the function succeeds, the return value is TRUE.
Usage:
 
* assembling the BLENDFUNCTION structure 
lnAlphaBlend = lnBlendOp +;
    BitLShift(lnBlendFlags, 8) +;
    BitLShift(lnSrcConstAlpha, 16) +;
    BitLShift(lnAlphaFormat, 24)
 
lnResult = AlphaBlend(hDC, lnX,lnY, lnWidth,lnHeight,;
    hMemDC, 0,0, lnWidth,lnHeight,;
    lnAlphaBlend)
 
My comment:
See also: GdipDrawImageRectRectI
Word Index links for the AlphaBlend :
Translate this page:
  Spanish    Portuguese    German    French    Italian  
FreeTranslation.com offers instant, free translations of text or web pages.
Created: 2002-03-23 11:07:20
Modified: 2009-01-17 21:16:47
Visited in last 7 days: 46
User Contributed Notes:
There are no notes on this subject.


Copyright © 2001-2013 News2News, Inc. Before reproducing or distributing any data from this site please ask for an approval from its owner. Unless otherwise specified, this page is for your personal and non-commercial use. The information on this page is presented AS IS, meaning that you may use it at your own risk. Microsoft Visual FoxPro and Windows are trade marks of Microsoft Corp. All other trademarks are the property of their respective owners. 

Privacy policy
Credits: PHP (4.4.9), an HTML-embedded scripting language, MySQL (5.1.55-log), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (107.22.127.92)
2 sec.Example: 'Using MessageBeep'
Language: 'C#'
6.05 hrs.Example: 'Obtaining heap handles and enumerating memory blocks for the current VFP session (WinNT only)'
6.06 hrs.Example: 'Retrieving long values associated with the class of the VFP window'
6.29 hrs.Function: 'SHSimpleIDListFromPath'
 Function: 'AddPrinter'
Function group: 'Printing and Print Spooler'
6.4 hrs.Example: 'Dragging files from Explorer window and dropping them on FoxPro control (requires VFP9)'
 Example: 'Attaching menu to a top-level form'
12.9 hrs.Example: 'How to print a bitmap file'
 Example: 'How to ping a remote site using IP Helper API calls'
13.38 hrs.Example: 'Custom GDI+ class'
Google
Advertise here!