Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 3rd, 2012  |  syntax: None  |  size: 0.51 KB  |  hits: 18  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Place window relative to parent
  2. //hWnd is the parent window
  3. hwndStatusBox = CreateDialog(hInst, MAKEINTRESOURCE(IDD_STATUSBOX),
  4.                              hWnd, svnStatusBoxProc);
  5.  
  6. SetWindowPos(hwndStatusBox,NULL, 100, 100, 0, 0,
  7.              SWP_SHOWWINDOW | SWP_NOSIZE | SWP_NOZORDER);
  8.        
  9. ClientToScreen
  10.        
  11. message_box_position = {ParentWidth - MessageBoxWidth, ParentHeight - MessageBoxHeight}
  12. ClientToScreen (parent_window_handle, &message_box_position)
  13. SetWindowPos (message_box_handle, messahe_box_position)