SetWindowExt

SetWindowExt

exten ction ction

CDC::SetWindowExt


virtualCSizeSetWindowExt(intcx,intcy);
virtualCSizeSetWindowExt(SIZEsize);
返回值
The previous extents of the window (in logical units) as a CSize object. If an error occurs, the x- and y-coordinates of the returned CSize object are both set to 0.
CSize對象,是窗口擴展的前一次取值。出錯時,CSize對象返回的X,Y坐標均設置為0。
參數說明
cx
Specifies the x-extent (in logical units) of the window.
指定視圖埠的X擴展(邏輯單位)。
cy
Specifies the y-extent (in logical units) of the window.
指定視圖埠的Y擴展(邏輯單位)。
size
Specifies the x- and y-extents (in logical units) of the window.
指定視圖埠的X和Y擴展(邏輯單位)。
備註
Sets the x- and y-extents of the window associated with the device context. The window, along with the device-context viewport, defines how GDI maps points in the logical coordinate system to points in the device coordinate system.
設置窗口擴展的X和Y擴展。窗口和設備上下文窗口說明了GDI如何將邏輯坐標中的點映射到實際設備坐標中。換言之,它們說明了GDI如何將邏輯坐標轉換為設備坐標。
When the following mapping modes are set, calls to SetWindowExt and SetViewportExt functions are ignored: 當設置以下映射模式時,對SetWindowExt和SetViewportExt的調用將被覆蓋 MM_HIENGLISHMM_HIMETRICMM_LOENGLISHMM_LOMETRICMM_TEXTMM_TWIPS When MM_ISOTROPIC mode is set, an application must call the SetWindowExt member function before callingSetViewportExt.
當設置MM_ISOTROPIC 時,應用在調用SetWindowExt成員函數之前必須調用SetViewportExt函數