请指点

解决方案 »

  1.   

    我知道应该用SetWindowPos or MoveWindow,但屏幕右上角如何得到就是想不起来
      

  2.   

    The return value of GetDesktopWindow()  function has no parameters
      

  3.   

    可以先用GetSystemMetrics函数获得桌面的长和宽的坐标,之后算出窗口在右上角的坐标,调用MoveWindow函数把窗口移到窗口右上角
      

  4.   

    CRect rect;
    ::GetWindowRect( GetDesktopWindow()->GetSafeHwnd(), rect );
    ::SetWindowPos( m_hWnd, HWND_TOPMOST, rect.right - 50, rect.top, 50, 50, SWP_SHOWWINDOW );
    这是我的一个程序的一段代码,作用是把一个小的窗体放在屏幕右上角,同时设置了尺寸。在InitDialog()中调用的。
      

  5.   

    jennyvenus(jennyvenus):You are so kind. Thank u very much!