[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

move-mania

Posted on 1999-01-12
8
Medium Priority
?
141 Views
Last Modified: 2010-04-06
How to move and resize external app window if I know it's handle?
0
Comment
Question by:duke_n
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
8 Comments
 
LVL 13

Expert Comment

by:Mirkwood
ID: 1356018
Use sendmessage with WM_SIZE
0
 
LVL 20

Expert Comment

by:Madshi
ID: 1356019
Hmm. I think the more official way would be to call MoveWindow.

Regards, Madshi.
0
 
LVL 20

Expert Comment

by:Madshi
ID: 1356020
BOOL MoveWindow(
    HWND hWnd,      // handle of window
    int X,      // horizontal position
    int Y,      // vertical position
    int nWidth,      // width
    int nHeight,      // height
    BOOL bRepaint       // repaint flag
   );      
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 1

Author Comment

by:duke_n
ID: 1356021
//to madshi
and what is I only want to RESIZE the window or only to MOVE it,
how shall I know the other two parameters?
0
 
LVL 1

Author Comment

by:duke_n
ID: 1356022
I mean: how to retrieve window position and size?
0
 
LVL 20

Expert Comment

by:Madshi
ID: 1356023
You could call GetWindowRect before the MoveWindow call.

BOOL GetWindowRect(
    HWND hWnd,      // handle of window
    LPRECT lpRect       // address of structure for window coordinates
   );

Or you could use SetWindowPos instead of MoveWindow. You can give several Flags into SetWindowPos. But I like MoveWindow more, because it's much easier to call...

Regards, Madshi.
0
 
LVL 1

Author Comment

by:duke_n
ID: 1356024
//to madshi
that's it!!!!!
this is just what I needed.
one last STUPID Q:
is there a possibility to 2D rotate windows??????
0
 
LVL 20

Accepted Solution

by:
Madshi earned 320 total points
ID: 1356025
Hi duke_n,

>> is there a possibility to 2D rotate windows??????

Hmmm. You CAN do it, but it will be quite difficult. You'll have to do it all by yourself.
You'll have to use SetWindowRgn with a region created by CreatePolygonRgn. This polygon must hold the four corners of the rotated window. Then you'll have to rotate the pixel window content by your own and draw it into the cycled region.
Uaaa... I think it is a lot of work, and I'm not sure if the effect is worth this work.

Regards, Madshi.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Suggested Courses

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question