阅读:1106回复:2
ScaleViewportExtEX函数的用法?????
我需要显示屏幕区域的一部分并将此区域放大为全屏幕范围,想要使用API::::ScaleViewportExtEX函数,但不知道HDC怎么猎取,有没有大侠可以帮帮我啊??能给个简单 的例子最好啦
或者应该使用什么其它的方法来实现呢?? |
|
沙发#
发布于:2004-05-15 10:23
ScaleViewportExtEx
The ScaleViewportExtEx function modifies the viewport for a device context using the ratios formed by the specified multiplicands and divisors. BOOL ScaleViewportExtEx( HDC hdc, // handle to device context int Xnum, // horizontal multiplicand int Xdenom, // horizontal divisor int Ynum, // vertical multiplicand int Ydenom, // vertical divisor LPSIZE lpSize // previous viewport extents ); Parameters hdc [in] Handle to the device context. Xnum [in] Specifies the amount by which to multiply the current horizontal extent. Xdenom [in] Specifies the amount by which to divide the current horizontal extent. Ynum [in] Specifies the amount by which to multiply the current vertical extent. Ydenom [in] Specifies the amount by which to divide the current vertical extent. lpSize [out] Pointer to a SIZE structure that receives the previous viewport extents, in device units. If lpSize is NULL, this parameter is not used. Return Values If the function succeeds, the return value is nonzero. If the function fails, the return value is zero. Windows NT/2000/XP: To get extended error information, call GetLastError. Remarks The viewport extents are modified as follows: xNewVE = (xOldVE * Xnum) / Xdenom yNewVE = (yOldVE * Ynum) / Ydenom |
|
|
板凳#
发布于:2004-05-19 10:13
能不能给一点代码呢??帮助我看了很多了,就是不会用啦,谢谢大家
|
|