   C++ Positioning A Dialog Box
  In C++, I have a Modal Dialog Box that is brought up when the user selects a Menu option.The Dialog Box appears in the middle of the screen.  I want to position it in the upperleft or upper right corner of the frame window, but the various functions I have triedrequire a pointer that I just can''t seem to figure out how to obtain.  Anyone have anyexamples they are willing to share?  Thanks.My email address is: cgodfrey7@hotmail.com  
  // all you will need is a handle to the dialog(i used hDlg),// and the x and y position of where you want the window to beSetWindowPos(hDlg, HWND_TOP, x-placement, y-placement,0, 0, SWP_NOSIZE);  ;  try this.CWnd::SetWindowPosBOOL SetWindowPos( const CWnd* pWndInsertAfter, int x, int y, int cx, int cy, UINT nFlags );Any customer dialog derives CWnd.  ;  I thank you for your reply.  I have tried using SetWindowPos and I am unable to get the first parameter correct.I do not know how to get a handle to the dialog box, assuming that is what I am supposed to use as the first parameter.  I could use a working example, if you have the time.  Thanks.  ;  Well, you are using MFC or straight C codes?If you use MFC, you should have an object which is the dialog, and follow this, assuming the object is myDialog:myDialog.SetWindowPos(NULL, 0, 0, 100, 100, SWP_SHOWWINDOW);of course, you can specify the values as you wish.If you use straight C, you should have a variable which gets its value from the CreateDialog function. Use this variable as the first parameter of the SetWindowPos API function.  