473,792 Members | 3,251 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Cursor on Win32 Window

I have a control (created by interop from Win32) wich placed into other
control (regular C#), BUT I can not recieve mouse events from Win32 control
even when listening to WM_MOUSE... messages from WinProc. The only way I
can capture the mouse in the control is using MyWin32Control. Capture = true;
from the parent form, BUT after the first click in parent form the capture
stops ( even if MyWin32Control. Capture = true after perform of OnClick
event), How to rid of it? How to get Win32 control listen to parent mouse
forever???

TNX

--
Tamir Khason
You want dot.NET? Just ask:
"Please, www.dotnet.us "
Nov 16 '05 #1
2 3628
Hi Tamir,

First of all, I would like to confirm my understanding of your issue. From
your description, I understand that when you put a win32 control in a .net
control (such as form), the win32 control cannot receive any mouse
messages. If there is any misunderstandin g, please feel free to let me know.

Could you let me know what kind if control you are working on? Is it an
ActiveX control? I have tried to put an ActiveX control on a C# windows
application form. However, it works well on my computer. Could you please
try to use Spy++ to check if the message can be captured. Here are the
steps:

1. Start Spy++ from Start -> All Programs -> Microsoft Visual Studio .NET
2003 -> Visual Studio .NET Tools -> Spy++.
2. Start your application from VS.NET.
3. Click on Log Message button on the toolbar of Spy++.
4. Drag and drop the Finder Tool to the ActiveX control and click ok.
5. Then you can move mouse to the control to see if message can be captured.

HTH.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Nov 16 '05 #2
Thank you for response. The control added is DirectShow Windows, in Spy++ I
can see Wnd event, but the control do not escalate those messages to parent
control, HOWEVER I already solved it by inplementing
put_MessageDrai n callbackes into parent.

Thank you for your time:

Following the solution (for those who interested in)

----------------Win32-----------------------------

[PreserveSig]

int put_MessageDrai n( IntPtr drain );

[PreserveSig]

int get_MessageDrai n( out IntPtr drain );

-------------------------------------------------------

-----------------C#-----------------------------------

hr = videoWin.put_Me ssageDrain(this .Handle);

if( hr < 0 )

Marshal.ThrowEx ceptionForHR( hr );

------------------------------------------------------------

TNX to all
--
Tamir Khason
You want dot.NET? Just ask:
"Please, www.dotnet.us "

"Kevin Yu [MSFT]" <v-****@online.mic rosoft.com> wrote in message
news:wj******** *****@cpmsftngx a10.phx.gbl...
Hi Tamir,

First of all, I would like to confirm my understanding of your issue. From
your description, I understand that when you put a win32 control in a .net
control (such as form), the win32 control cannot receive any mouse
messages. If there is any misunderstandin g, please feel free to let me
know.

Could you let me know what kind if control you are working on? Is it an
ActiveX control? I have tried to put an ActiveX control on a C# windows
application form. However, it works well on my computer. Could you please
try to use Spy++ to check if the message can be captured. Here are the
steps:

1. Start Spy++ from Start -> All Programs -> Microsoft Visual Studio .NET
2003 -> Visual Studio .NET Tools -> Spy++.
2. Start your application from VS.NET.
3. Click on Log Message button on the toolbar of Spy++.
4. Drag and drop the Finder Tool to the ActiveX control and click ok.
5. Then you can move mouse to the control to see if message can be
captured.

HTH.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Nov 16 '05 #3

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

Similar topics

2
4582
by: Csaba2000 | last post by:
The following code has me so confused, I don't even know the right questions to ask. Opera 7.01 and IE 5.5 both exhibit behaviours I don't understand while NN 6.1 seems to ignore me altogether. The upshot: .style.cursor seems to be ignored under certain circumstances. Let's take something that's mostly repeatable and maybe someone can explain to me what's happening. In Opera 7.01
3
17312
by: Csaba2000 | last post by:
I have set onmousedown to change the cursor, but this setting is ignored (IE 5.5; NN 6.1 on Win 2K Pro) until the mouse is either moved or the mouse button is released. On Opera 7.01, the setting seems to be ignored completely, even when I try with window.setTimeout. So my two questions are: (1) Most important: Is there anything I can do so that I don't have to wait for the next mouse event before the cursor gets repainted. (2) Why...
9
8334
by: Chris Michael | last post by:
I am using the following class in a CSS document: ..loginsubmit { background-color: #ffffff; FONT-WEIGHT: bold; color: #002980; cursor: hand } It works perfectly well, but it won't validate in the W3C CSS validator saying: Invalid number : cursorhand is not a cursor value : hand
1
2198
by: Tee | last post by:
Hi, From my main form, I am executing another application using System.Diagnostics.Process.Start. The application has its own window displaying when the applicaiton is run. I want to change the cursor to a hourglass. But I only can change my own form's cursor using Cursor.Current, whenever I move my mouse cursor into the window, the mouse cursor back to default cursor. I want to change the cursor in the process's window too. Can...
5
14463
by: Vlad Simionescu | last post by:
Hello I'm trying to let my Windows Form application perform a lengthy operation while displaying a progress bar in a modal dialog window; the dialog has a cancel button. The dialog is displayed in the main thread while the work is done in a background thread. I managed to do it except for one minor problem: I want the cursor to be hourglass when it is over the main window and be normal (arrow) when it is over the dialog box. I cannot do...
1
5984
by: Thilo Frank | last post by:
I want to add a flashing text cursor to my selfmade user control. Is there an existing class availible for this problem or do I have to write a thread, which flashs the cursor? THX for your help Thilo
2
10603
by: Paul Cheetham | last post by:
Hi, I am trying to load a custom cursor from my programs resources. I have successfully included the cursor resource, and I have confirmed that the name I am using is correct. Below is the code I am using to try and load the cursor - which always returns null. I have tried using LoadImage and LoadCursor with the same result.
5
10220
by: Paul Cheetham | last post by:
Hi, I have some custom colour cursors which I have added to my c# project, and set them to be compiled as "Embedded Resource" It seems impossible to load a colour cursor using the standard Cursor class, so I have had to resort to loading it using the Win32 API, and creating the cursor with - new Cursor(HCURSOR) The code I am using is shown at the bottom of this post.
2
13020
by: Danny | last post by:
Hi I need to get the handle to the windows control that is directly below the mouse. This must work on any windows application, win32 and dotnet forms. The reason is I would like to highlight the window's bounderies if possible, and change the text in controls that allow it. For example , when I hover the mouse over a win32 application with edit boxes on, am going to drawy around the text box ( some how) not got that bit yet!
0
9670
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
9518
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
10211
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...
1
10159
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10000
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
9033
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...
1
7538
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5560
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3719
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.