【发布时间】:2011-01-08 01:03:30
【问题描述】:
我想知道是否为了将带有 Win32 API 的 (ms-windows-) 窗口向右移动 20 像素并向下移动 40 像素,以下 函数调用是怎么做的:
SetWindowPos(
/* hWnd */ hChildDlg2,
/* hWndInsertAfter */ (HWND) -1,
/* X */ 20,
/* Y */ 40,
/* cx */ -1,
/* cy */ -1,
/* uFlags */ SWP_NOSIZE | // Ignore cx, cy
SWP_NOZORDER // and hWndInsertAfter
);
我问是因为在我看来,可能有一个函数只接受 HWND 和 x 和 y 作为参数。
【问题讨论】: