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.

348 questions
0
votes
1 answer

Win32 , WndProc, and parent-child windows

I'm developing in C code that uses the Win32 Api to create multiple windows. I used createWindow twice - to create parent and child windows. I have a message loop while ( GetMssage (&msg, NULL,0,0)){ . translate dispatch . } But I only get the…
dan
  • 61
  • 2
  • 7
0
votes
1 answer

How to prevent system mouse cursor movement in a C++ applicatioin with custom cursor?

I am writing an OpenGL/DX application in which I read WM_INPUT messages in WndProc() to move a custom mouse cursor. The system mouse cursor is hidden via ShowCursor(false) when it is over/in the application's window. The problem is that the system…
Matthias
  • 9,817
  • 14
  • 66
  • 125
0
votes
0 answers

VB.NET / Get WndProc of a window?

I'm trying to get the WNDPROC from a open Windows Explorer window. I can successfully get the handle of the window, but "GetWindowLongPtr" returns always "0". I'm declaring the entry: _ …
Meyer
  • 1
0
votes
1 answer

Adding a button to form prevents WM_KEYDOWN messages from being sent

The following code works and will print to Label1 when the user presses the a key on the keyboard: Public Class Form1 Sub New() InitializeComponent() End Sub Public Declare Function PostMessage Lib "user32.dll" Alias "PostMessageA" (ByVal…
0
votes
1 answer

Redraw checkbox

I was wondering is it possible to draw a checkBox with custom colors for text and tick? I heard it was possible by overriding WndProc and using WM_PAINT, but I have no experience doing that. Can someone please point me in the right direction?
p0enkie
  • 665
  • 2
  • 11
  • 22
0
votes
1 answer

Win32 ListBox WNDPROC never called

I am writing a fairly simple wrapper around Win32 controls/dialogs/windows. The issue I have is that ListBox's and ComboBox's seem to behave rather differently. In the base Widget class that I am inheriting from, I override the existing WNDPROC…
Gary McLean Hall
  • 984
  • 7
  • 16
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
  • 14,077
  • 14
  • 61
  • 82
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.
  • 266
  • 7
  • 18
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
  • 23,334
  • 2
  • 57
  • 88
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
  • 893
  • 13
  • 27
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
  • 438
  • 7
  • 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,734
  • 21
  • 87
  • 152
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,946
  • 1
  • 19
  • 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
  • 870
  • 2
  • 13
  • 35