473,387 Members | 1,569 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Window Position

Does anyone have a code snippet that retrieves a windows
coordinates within the desktop? I can't seem to get
GetWindowPlacement() to work. And GetWindowRect returns
0,0 for the top,left corner, not the current position on
the screen.

Thanks.

Nov 16 '05 #1
2 1861
Use ClientToScreen to get the actual desktop co-ordinates

--
Regards,
Nish [VC++ MVP]

"insomniac" <in**@u-s-tech.com> wrote in message
news:0d****************************@phx.gbl...
Does anyone have a code snippet that retrieves a windows
coordinates within the desktop? I can't seem to get
GetWindowPlacement() to work. And GetWindowRect returns
0,0 for the top,left corner, not the current position on
the screen.

Thanks.

Nov 16 '05 #2
This doesn't work ?

CRect myRect;
GetClientRect(&myRect);

ClientToScreen(myRect);
MoveWindow(myRect.left, myRect.top, myRect.Width() + 20, myRect.Height() +
20);

Mike

"insomniac" <in**@u-s-tech.com> wrote in message
news:0d****************************@phx.gbl...
Does anyone have a code snippet that retrieves a windows
coordinates within the desktop? I can't seem to get
GetWindowPlacement() to work. And GetWindowRect returns
0,0 for the top,left corner, not the current position on
the screen.

Thanks.

Nov 16 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Ian Sedwell | last post by:
Hi guys The following code works just fine in Netscape on MacOS and Windows. But in Explorer on MacOS and Windows it throws a type mismatch error at the point marked with the comment ³// bug out...
19
by: Darren | last post by:
I have a page that opens a popup window and within the window, some databse info is submitted and the window closes. It then refreshes the original window using window.opener.location.reload(). ...
1
by: Matt | last post by:
Hi I am looking for a way in C# to use a IntPtr handle to a (possibly unmanaged) windows form to get the current position of the window on the desktop. I have tried using Form.FromHandle( handle...
6
by: Scott Lee | last post by:
I am displaying an ASP.Net generated form in a popup opened with window.showModalDialog. The form contains DropDownList controls. The first ddl is populated via databinding to a datatable, has...
4
by: alexandre.brisebois | last post by:
Hi, I am using access 2003, I would like to know if there is an option to reorganize the tables in a maner that is readable, as we can do in sql sever 2000 or 2005. I have been given a database...
2
by: Shelly | last post by:
I have a form that updates and stays in the same window. That is the desired behavior. On this form I also have two buttons. I want those buttons to open up a new window with information taken...
31
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - How do I modify the current browser window?...
2
by: wreed06 | last post by:
Hello, I have 2 problems. In my webpage, I have a dropdown list with a button that takes the user to a popup window specific to the option. I am using Firefox 2.0.0.13. I have successfully...
1
by: soms2m | last post by:
HELLO ALL, I want to fill the parent window height with respect to the sub window height which is loading using ajax (mootools). For example if the parent window height is normal and the loading...
1
by: vp.softverm | last post by:
hi all . Am facing problem with the date picker. when i click on date picker in a popup window. the date table is opened in the middle of the pop up window. and it is unable to scroll with...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.