急等...windows programing的问题

来源:百度知道 编辑:UC知道 时间:2024/06/14 15:47:08
任务是做一个画板,大多功能都实现..就是不会缩放..
如何用映射模式进行整体的缩放呢?
SetWindowExtEx 和SetViewportExtEx具体什么功能,为什么说改变里面的参数可以达到缩放的效果呢...一头雾水,望大家指教....

上面的太过分了!

SetViewportExtEx
The SetViewportExtEx function sets the horizontal and vertical extents of the viewport for a device context by using the specified values.

BOOL SetViewportExtEx(
HDC hdc, // handle to device context
int nXExtent, // new horizontal viewport extent
int nYExtent, // new vertical viewport extent
LPSIZE lpSize // original viewport extent
);
Parameters
hdc
[in] Handle to the device context.
nXExtent
[in] Specifies the horizontal extent, in device units, of the viewport.
nYExtent
[in] Specifies the vertical extent, in device units, of the viewport.
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.

Wind