×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Moveable one dialog window

Moveable one dialog window

Moveable one dialog window

(OP)
I've got a program that looks like

CODE

#include "stdafx.h"
#include "resource.h"
#include "CommentDlg.h"

int APIENTRY WinMain(
   HINSTANCE hInstance,
   HINSTANCE hPrevInstance,
   LPSTR     lpCmdLine,
   int       nCmdShow)
{  
    DialogBox(hInstance, MAKEINTRESOURCE(IDD_COMMENTDLG), 0, (DLGPROC)CommentDlg);
    return 0;
}
CommentDlg is just a switch statement - basically a WinProc.  On XP VS2003, it just stays in the top left corner and cannot be moved.  On Vista VS2005, I can move it round.  I don't have VS2005 on XP.

I'm just wondering: is this an XP problem or a VS2003 problem.  If it is a VS2003 problem then I'll have to uninstall VS2003 and find a copy of VS2005 somewhere that I can install.  

RE: Moveable one dialog window

(OP)
Just copied the VS2005 executable to XP and the VS2003 executable to Vista.  Can't move the window round on XP but I can on Vista so I guess it is an XP problem.

Any idea how I can get around this problem short of rewriting the WinMain bit?  On XP, it doesn't pick up WM_WINPOSCHANGING with any coordinate other than 0,0.  On Vista, I get the value  of the top left corner.  Do I need to set some special property first?

RE: Moveable one dialog window

(OP)
What is even more curious is it doesn't work at all on W2K. Works fine on W95/W98.

RE: Moveable one dialog window

(OP)
The W2K thing is a red herring - it was the ICC stuff.  It is stills stuck in the top left corner.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close