Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

StretchBlt doesnt work on Win98...help!

Status
Not open for further replies.

ultra2

Programmer
Jun 26, 2005
46
HU

dim r as long
r = StretchBlt(pictureBox_Dest.hdc, 0, 0, 100, 100, pictureBox_Src.hdc, 0, 0, 500, 500, vbSrcCopy)

r = 1 (success) on WinXP
r = 0 (fail) on Win98

plz help
 
StretchBlt should work on W98. However, it is just possible that the raster device you are trying to do the the StretchBlt on doesn't support stretching ...

Try a GetDeviceCaps call, like:

Private Declare Function GetDeviceCaps Lib "gdi32" (ByVal hdc As Long, ByVal nIndex As Long) As Long
Private Const RASTERCAPS = 38
Private Const RC_STRETCHBLT = &H800

Private Sub Form_Load()
MsgBox "Can use StretchBlt: " & ((GetDeviceCaps(hdc, RASTERCAPS) And RC_STRETCHBLT) = RC_STRETCHBLT)
End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top