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

.

protected override void WndProc(ref Message m)

.

   base.WndProc(ref m);

.
Summary
Structure returned from a WH_CALLWNDPROC windows hook
.

   public WndProc lpfnWndProc;

.

   Public lpfnWndProc As WndProc

.

WndProc, ClassStyles

.
  • lpfnWndProc
.
    • Pointer to the window procedure. You must use the CallWindowProc function to call the window procedure. For more information, see WndProc.
.

    public IntPtr lpfnWndProc; // not WndProc

.

   Public lpfnWndProc As IntPtr

.

WndProc, ClassStyles

.
  • lpfnWndProc
.
    • Pointer to the window procedure. You must use the CallWindowProc function to call the window procedure. For more information, see WndProc.

Constants

.

static readonly int GWL_WNDPROC    = -4;

.

Public Const GWL_WNDPROC    = -4

.

     GWL_WNDPROC = -4,

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.

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
.

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

.

Private Delegate Function WndProc(ByVal hWnd As IntPtr, ByVal msg As UInteger, ByVal wParam As IntPtr, ByVal lParam As IntPtr) As IntPtr

.

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.

.
Documentation
[WndProc] on MSDN

winmm

.

// Override the WndProc function in the form

.

protected override void WndProc(ref Message m)

.

    base.WndProc(ref m);

.

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

.

Protected Overrides Sub WndProc(ByRef m As System.Windows.Forms.Message)

.

     MyBase.WndProc(m)

coredll

.

        protected override  void WndProc(ref Message m)

.

                    base.WndProc(ref m);

user32

.

static extern IntPtr CallWindowProc(WndProcDelegate lpPrevWndFunc, IntPtr hWnd, uint Msg, IntPtr wParam, IntPtr lParam);

.

Private Shared Function CallWindowProc(lpPrevWndFunc As WndProcDelegate, hWnd As IntPtr, Msg As UInteger, wParam As IntPtr, lParam As IntPtr) As IntPtr

.

WndProcDelegate

.

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 ) => {

.

    protected override void WndProc(ref Message m)

.

        base.WndProc(ref m);

.

     GWL_WNDPROC =    (-4),

.

     GWL_WNDPROC = -4

.

     GWL_WNDPROC =    (-4),

.

     GWL_WNDPROC = -4

.

        Public lpfnWndProc As IntPtr

.

        .lpfnWndProc = IntPtr.Zero

.

               "lpfnWndProc: " & .lpfnWndProc.ToString & vbCrLf & _

.

    private static IntPtr WndProc(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled)

.

/// protected override void WndProc(ref Message m)

.

///      base.WndProc(ref m);

.

protected override void WndProc(ref Message m)

.

    base.WndProc (ref m);

.

} //WndProc

.

    protected override void WndProc(ref Message m)

.

        base.WndProc(ref m);

.

Use the version that takes an IntPtr as last parameter and pass it IntPtr.Zero if you are going to handle the WM_TIMER message in your own override of WndProc.

.

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_CALLWNDPROCRET (12)</term>

.

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

.

///         <term>WH_CALLWNDPROCRET (12)</term>

.

    Public lpfnWndProc As IntPtr

.

    .lpfnWndProc = IntPtr.Zero

.

           "lpfnWndProc: " & .lpfnWndProc.ToString & vbCrLf & _

.

    Protected Overrides Sub WndProc(ByRef m As Message)

.

        MyBase.WndProc(m)

.

        protected override void WndProc(ref Message m)

.

            base.WndProc(ref m);

.

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

.

Delegate Function WndProcDelegate(Byval hWnd As IntPtr, Byval msg As UInteger, Byval wParam As IntPtr, Byval lParam As IntPtr) As IntPtr

Enums

.

     GCLP_WNDPROC       = -24,

.

     GCLP_WNDPROC       = -24

.

     GCLP_WNDPROC       As Long = -24

.

     WH_CALLWNDPROC = 4,

.

     WH_CALLWNDPROCRET = 12,

.

     WH_CALLWNDPROC = 4

.

     WH_CALLWNDPROCRET = 12

.

     GWL_WNDPROC = -4,

.

     GWL_WNDPROC = -4

.

     GWL_WNDPROC As Long = -4

.

        protected override void WndProc(ref Message m)

.

            base.WndProc(ref m);

wtsapi32

.

    class SessionChangeHandler : Control // allows us to override WndProc

.

        protected override void WndProc(ref Message m)

.

            base.WndProc(ref m);


 
Access PInvoke.net directly from VS: