to ydogg(灰毛兔频频) 在OnInitdDialog里好像也不行, 对话框存储自己的初始位置吗?在什么地方?
Message Map: ON_WM_WINDOWPOSCHANGING() Func: OnWindowPosChanging(WINDOWPOS FAR* lpWndPos)if lpWndPos->x and ipWndPos->y is equal to -1,that indicate the window started.
to ydogg(灰毛兔频频) 多谢,找到问题了我SetWindowPos(NULL,0,0,0,0,SWP_NOSIZE); 不可以,改成SetWindowPos(NULL,1,0,0,0,SWP_NOSIZE);或SetWindowPos(NULL,0,1,0,0,SWP_NOSIZE);都行,左上角的坐标到底应该是多少? to kimryo(immortal code) 我在OnWindowPosChanging(WINDOWPOS FAR* lpWndPos) 里加了一条TRACE语句结果发现输出三组lpWndPos->x and ipWndPos->y第一组是对话框出现时的初始位置,后两组是0,为什么呢?
在OnInitdDialog里好像也不行,
对话框存储自己的初始位置吗?在什么地方?
Message Map:
ON_WM_WINDOWPOSCHANGING()
Func:
OnWindowPosChanging(WINDOWPOS FAR* lpWndPos)if lpWndPos->x and ipWndPos->y is equal to -1,that indicate the window started.
SetWindowPos(&wndTop,10,10,0,0,SWP_NOSIZE);
多谢,找到问题了我SetWindowPos(NULL,0,0,0,0,SWP_NOSIZE);
不可以,改成SetWindowPos(NULL,1,0,0,0,SWP_NOSIZE);或SetWindowPos(NULL,0,1,0,0,SWP_NOSIZE);都行,左上角的坐标到底应该是多少?
to kimryo(immortal code)
我在OnWindowPosChanging(WINDOWPOS FAR* lpWndPos)
里加了一条TRACE语句结果发现输出三组lpWndPos->x and ipWndPos->y第一组是对话框出现时的初始位置,后两组是0,为什么呢?