473,769 Members | 2,099 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to get desktop window handle?

Hi,

I use API GetDesktopWindo w to get desktop window handle and compare with
WindowFromPoint (x,y) to get window handle.
GetDesktopWindo w return 65556
WindowFromPoint return 65700
but I use apy++ to get desktop window handle, it return 100A2 or 1000A4
why?
Best Wish,

Harvie

2006-6-27
Jun 27 '06 #1
4 25258
0x100a4 = 65700 in decimal

harvie wang wrote:
Hi,

I use API GetDesktopWindo w to get desktop window handle and compare with
WindowFromPoint (x,y) to get window handle.
GetDesktopWindo w return 65556
WindowFromPoint return 65700
but I use apy++ to get desktop window handle, it return 100A2 or 1000A4
why?
Best Wish,

Harvie

2006-6-27


Jun 27 '06 #2
Hello matt,

thanks very much!
but why the GetDesktopWindo w return do not equal to WindowFromPoint ?
0x100a4 = 65700 in decimal

harvie wang wrote:
Hi,

I use API GetDesktopWindo w to get desktop window handle and compare
with
WindowFromPoint (x,y) to get window handle.
GetDesktopWindo w return 65556
WindowFromPoint return 65700
but I use apy++ to get desktop window handle, it return 100A2 or
1000A4
why?
Best Wish,

Harvie

2006-6-27

Jun 27 '06 #3
harvie wang wrote:
Hello matt,

thanks very much!
but why the GetDesktopWindo w return do not equal to WindowFromPoint ?
0x100a4 = 65700 in decimal

harvie wang wrote:
Hi,

I use API GetDesktopWindo w to get desktop window handle and compare
with
WindowFromPoint (x,y) to get window handle.
GetDesktopWindo w return 65556
WindowFromPoint return 65700
but I use apy++ to get desktop window handle, it return 100A2 or
1000A4
why?
Best Wish,

Harvie

2006-6-27


Hi Harvie,

You may or may not realise that the desktop window isn't what you see on
your screen, when you're looking at your desktop icons. You're seeing a
listview, which fills the desktop window.

--
Hope this helps,
Tom Spink
Jun 27 '06 #4
Hello Tom,

Thanks!
It's right :)
I use spy++ to find window, got "desktop window" class is listview.
Then how can i know the mouse click window is a desktop window or i click
the place is not any other window except the listview.
I want to know use click the place can see the wallpaper (desktop window).

harvie wang wrote:
Hello matt,

thanks very much!
but why the GetDesktopWindo w return do not equal to WindowFromPoint ?
0x100a4 = 65700 in decimal

harvie wang wrote:

Hi,

I use API GetDesktopWindo w to get desktop window handle and compare
with
WindowFromPoint (x,y) to get window handle.
GetDesktopWindo w return 65556
WindowFromPoint return 65700
but I use apy++ to get desktop window handle, it return 100A2 or
1000A4
why?
Best Wish,
Harvie

2006-6-27

Hi Harvie,

You may or may not realise that the desktop window isn't what you see
on your screen, when you're looking at your desktop icons. You're
seeing a listview, which fills the desktop window.

Jun 28 '06 #5

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

Similar topics

9
10225
by: Etienne Charland | last post by:
Hi, there is an application running on a remote desktop (under Citrix ICA, but the same problem applies for RDC or PC Anywhere). Now, I want to send keys to the remote application from a local app. I tried sending keys in VB with SendKeys, as well as using keybd_event API, but I'm not able to send any keys. It works very well for any local applications, but I can't pass the keys remotely. Is there any way to do it? Thanks! Etienne
1
3361
by: kiplring | last post by:
I wrote a program which draw a dancer at cornor of desktop. ( I Accessed through hDC) But It has a problem. I remains all trait at the desktop until I invoke any Redraw( Refresh) action - click, or drag. Is there any way invoke Redraw or Refresh a region of desktop? It should refresh all the window at the region. ( ex) explorer window.) Thanks.
3
14734
by: °Ë´óɽÈË | last post by:
Hi, I create a graphics object for desktop window by following step: IntPtr hWnd = GetDesktopWindow(); // API Graphics g = Graphics.FromHWnd(hWnd); then draw the screen by g, but I can't draw anything. WHY?? And I try to draw by DC (get by GetDC), it's fail either.
3
4760
by: Henrik | last post by:
I need to get a list of clickable objects on the desktop and their positions. I have written a small program in C# and by using the Win32 function: WindowFromPoint -function I get a handle to the desktop but now I'm stuck. For those who need to see the code -look below IntPtr hWnd = Win32.WindowFromPoint(Cursor.Position); With the handle I can get alot of cool information such as: Caption,
3
10934
by: harvie wang | last post by:
Hi, I create a system mouse hook, to get mouse position and click events. use GetDesktopWiindow and WindowFromPoint(x,y) to get window handle in my hook proc. Click mouse on desktop window and print the window handle which i got in hook proc. GetDesktopwindow() == 65557; WindowFromPoint(x,y) == 65700; but when i use spy++ to get the desktop window handle, it's return 0x100A4
15
3039
by: Mephisto187 | last post by:
How can I find the currently visible desktop? By calling EnumWindowStations and EnumDesktops I get a list of all available desktops. But is there a way to figure out which one of them is currently visible? I've tried to find the visible desktop by comparing the desktop handle, returned by the OpenDesktop function, to the desktop handle received by calling OpenInputDesktop. The result is that the default desktop is always the one...
3
1582
by: Jay | last post by:
Hey There, Is it possible to get an unique identifier for a desktop that a particular app is running from, from a service? If there are two instances of the app running on different desktops (one desktop is locked, the other is in use) then the service should have different values for each one. Thanks, Jay (patelj27b at gmail dot com)
1
1434
by: gnrgattadi | last post by:
I have Created A ListBox Control Whose Handle is Desktop. My code for ListBox: #using using namespace System;
2
2105
by: =?Utf-8?B?U2hhdW5P?= | last post by:
Hi, Background: I am taking a render window from another application and placing it upon a panel in my c# application. This is done by getting the handle to the window of interest then setting it's parent to be my panel and moving the window over the panel as follows: w32.MoveWindow(foreignWindowHandle, 0, 0,myPanel.Width, myPanel.Height, true); w32.SetParent(foreignWindowHandle, myPanel.Handle);
0
9589
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9423
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10215
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10049
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9865
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8872
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6674
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
3964
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3564
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.