Questions tagged [wndproc]

WndProc is a .NET method that process Windows messages. It is the .NET equivalent of the C++ WindowProc method.

Official documentation including example.

For more information on how Windows messages are processed, can consult WindowProc.

325 questions
0
votes
3 answers

How to use WndProc from a C++ dll?

I want to handle some SAPI messages from a DLL, which is some sort of plugin. How to handle messages/events inside a VC++ dll. The SAPI event handling is shown in the example at: http://msdn.microsoft.com/en-us/library/ms720165%28VS.85%29.aspx
Priyank Bolia
  • 12,942
  • 13
  • 57
  • 81
0
votes
0 answers

How to use override WndProc messages to detect usb attach/detach

I'm using this(link) library to detect attach and detach events of USB devices. After detecting the right device attached(identified with specific VID/PID combination) I open a serial port connection and similarly when the device is detached I close…
Florin C.
  • 256
  • 5
  • 15
0
votes
0 answers

Windows Proc "Unavailable" for processes spawned by service

I'm attempting to use psexec to spawn a process on a remote machine (for automated testing purposes) and noticed that the spawned process wasn't correctly responding to a message (WM_GETOBJECT, but that's another question entirely). I opened spy++…
Patrick Quirk
  • 21,498
  • 1
  • 51
  • 85
0
votes
0 answers

override wndproc in class

I have encountered problem that I wasn't able to solve so maybe I ll have some luck here. I am overriding WndProc in my application like this : #include "stdafx.h" #include #using #using…
Peter Kottas
  • 733
  • 9
  • 23
0
votes
1 answer

How do I draw to the window's title bar in C++.NET?

I'm trying to draw a custom title bar, and I've read that in order to paint outside a window's client area, I need to override WndProc and handle the WM_NCPAINT message. Currently, I'm doing that like this: //WndProc override virtual void…
smoth190
  • 428
  • 6
  • 26
0
votes
1 answer

Processing windows messages in Internet Explorer_Server (IE9)

I'm developing a windowless plugin using Firebreath and I want to catch a particular message for further processing, I'm able to do it so but the rest of the messages are "lost" I think. I have this code to hook the messages loop: bool…
0
votes
3 answers

Preventing a VB.Net form from closing

We are using this coding to handle the clicking of the big red X as a means to bypass all textbox validation on the form. The code will test if any changes are made to the data bound controls on the form. The code handle cancelling changes made…
Emad-ud-deen
  • 4,322
  • 19
  • 78
  • 146
0
votes
1 answer

Hittest transparency for an entire form

Is it possible for the entire bounds of a form to be hittest transparent without adjusting the visibility of the form? I am using a user32 api call to WindowFromPoint in order to find the control under the mouse. In some circumstances I would like…
roken
  • 3,756
  • 1
  • 16
  • 32
0
votes
1 answer

USB Device Removal in Windows 8

I've got the following code the detect the arrival and removal of a Prolific Serial based USB Device. protected override void WndProc(ref Message m) { DBT changeType = (DBT)m.WParam; string portName; if (m.Msg ==…
Jan de Jager
  • 830
  • 2
  • 12
  • 35
0
votes
1 answer

C# MDI - Hide MDI Scrollbars after MDI resize when MDIChild is out of bounds

I have a MDI Parent (Form1) and a MDI Child (Form2). I have currently disabled scroll bars for Form1 when Form2 goes past the bounds of Form1 by placing the following code within Form2: protected override void WndProc(ref Message m) { const int…
user1108076
  • 81
  • 1
  • 9
-1
votes
1 answer

C# disable resize custom control on WncProc

With form1, when i hold bottom-left to resize, it's is limit at MinumumSize(300, 300). But although set MinimumSize = new Size(50, 50), Width and Height of MyControl still can less than 50. Do you know how to make MyControl like Form? Thank in…
-1
votes
1 answer

How to stop Wndproc() loop?

I have overridden wndproc() to use Hotkeys. but the form won't close anymore. and onclosing form the program stuck in an infinite loop in wndproc(). protected override void WndProc(ref Message m) { base.WndProc(ref m); if…
Mamo Ghandi
  • 67
  • 2
  • 10
-1
votes
1 answer

C# IntPtr values

I would like to know what the different value of IntPtr mean. For example, I know that 202 means left button up. Where can I find a list of the values? I am particularly interested in the meaning of 562, 274, and 161. Thanks!
-1
votes
1 answer

Window message loop ( WndProc | While (GetMEssage)) thread in .NET Core

I am trying to subscribe to window messages using .Net Core I am able to receive initial messages to create a window ( through pinvoke) and destroy messages. But after that my created windows gets blocked and does not receive any other messages. …
-1
votes
1 answer

Handling Window Movement after setting GWL_STYLE to 0

i want to have a border and title less window so i do SetWindowLongPtrW( window_handle, GWL_STYLE, 0 ); After that i can't move my Window so in my WndProc i do if( message == WM_NCHITTEST ) { RECT rc; GetClientRect( hwnd, &rc…
1 2 3
21
22