Search
Module:
Directory

   Desktop Functions:

   Smart Device Functions:


Show Recent Changes
Subscribe (RSS)
Misc. Pages
Comments
FAQ
Helpful Tools
Playground
Suggested Reading
Website TODO List
Download Visual Studio Add-In

Search Results for "WndProc " in [All]

Structures

.
Summary
Structure returned from a WH_CALLWNDPROC windows hook
.

   public WndProc lpfnWndProc;

.

   Public lpfnWndProc As WndProc

.

   Public lpfnWndProc As IntPtr

Delegates

.

delegate IntPtr WndProc (IntPtr hWnd, uint msg, IntPtr wParam, IntPtr lParam);

.

Delegate Function WndProc (ByVal hWnd As IntPtr, ByVal msg As Integer, _

.
Documentation
WndProc @msdn on MSDN
.

Check with WindowsMessages for a list of most (if not all) of the constants that will be passed in as messages to the WndProc method.

misc

.

Things like RegisterWindowClass and GetClassInfo using the WNDCLASS structure in different ways requires creating separate structures with different field types in order to satisfy the marshaller (The WndProc pointer as a raw IntPtr in some cases, or as a method pointer in other cases). I can see that the params for GetClassInfo and RegisterWindowClass do take different structure types, but those types do not appear to be documented here.

user32

.

When you call this function, the WndProc function must respond to the WM_NCCREATE message by returning TRUE. If it does not, the creation process will fail. A null handle will be returned from CreateWindowEx and GetLastError will return 0. See MSDN on WM_NCCREATE (http://msdn.microsoft.com/en-us/library/ms632635.aspx) and also WM_CREATE (http://msdn.microsoft.com/en-us/library/ms632619.aspx). You can have your WndProc call DefWindowProc, which will take care of this issue.

.

            wndclass.lpfnWndProc = (WndProc)((hWnd, message, wParam, lParam ) => {

.

     GWL_WNDPROC =    (-4),

.

     GWL_WNDPROC = -4

.

     GWL_WNDPROC =    (-4),

.

     GWL_WNDPROC = -4

.

        Public lpfnWndProc As IntPtr

.

        .lpfnWndProc = IntPtr.Zero

.

    base.WndProc (ref m);

.

Use the version that takes a delegate as last parameter if you don't explicitly handle the WM_TIMER message or if you don't override WndProc. In that case DefWndProc will invoke your callback when the time-out value elapses.

.

///         <term>WH_CALLWNDPROC (4)</term>

.

///         destination window procedure. For more information, see the CallWndProc hook procedure.

.

///         <term>WH_CALLWNDPROC (4)</term>

.

    Public lpfnWndProc As IntPtr

.

    .lpfnWndProc = IntPtr.Zero

winmm

.

// Override the WndProc function in the form

.

' Override the WndProc function which is called when the play function ends

Enums

.

     GCLP_WNDPROC       = -24,

.

     GCLP_WNDPROC       = -24

.

     GCLP_WNDPROC       As Long = -24

.

     WH_CALLWNDPROC = 4,

.

     WH_CALLWNDPROC = 4

.

     GWL_WNDPROC = -4,

.

     GWL_WNDPROC = -4

.

     GWL_WNDPROC As Long = -4

Constants

.

static readonly int GWL_WNDPROC    = -4;

.

Public Const GWL_WNDPROC    = -4

.

     GWL_WNDPROC = -4,


 
Access PInvoke.net directly from VS: