Jump to content

PFNWP: Difference between revisions

From EDM2
No edit summary
Ak120 (talk | contribs)
mNo edit summary
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
== PFNWP ==
Pointer to a window procedure.
Pointer to a window procedure.


=== Type ===
=== Type ===
FNWP
FNWP


==== C Declaration Method ====
==== C Declaration Method ====
typedef
typedef


=== Coment ===
=== Coment ===
In the header file, this is a two-part definition as shown below:
In the header file, this is a two-part definition as shown below:
 
  typedef MRESULT (EXPENTRY FNWP) (HWND, ULONG, MPARAM, MPARAM);  
  typedef [[OS2 API:DataType:MRESULT|MRESULT]] ([[OS2  API:DataType:EXPENTRY|EXPENTRY]] FNWP) ([[OS2 API:DataType:HWND|HWND]], [[OS2  API:DataType:ULONG|ULONG]], [[OS2 API:DataType:MPARAM|MPARAM]], [[OS2  API:DataType:MPARAM|MPARAM]]);  
  typedef FNWP *PFNWP;
  typedef FNWP *PFNWP;


The first argument ([[OS2 API:DataType:HWND|HWND]]) is the handle of the window receiving the message.
The first argument ([[HWND]]) is the handle of the window receiving the message.
The second argument ([[OS2 API:DataType:ULONG|ULONG]]) is a message identifier.
The second argument ([[ULONG]]) is a message identifier.
The third argument ([[OS2 API:DataType:MPARAM|MPARAM]]) is the first message parameter (mp1).
The third argument ([[MPARAM]]) is the first message parameter (mp1).
The fourth argument ([[OS2 API:DataType:MPARAM|MPARAM]]) is the second message parameter (mp2).
The fourth argument (MPARAM) is the second message parameter (mp2).
The function returns an [[OS2 API:DataType:MRESULT|MRESULT]].
The function returns an [[MRESULT]].
    
    
This is the standard function definition for window procedures.  
This is the standard function definition for window procedures.  
Line 29: Line 23:
'''Window procedures must be exported''' in the definitions file used by the linker.
'''Window procedures must be exported''' in the definitions file used by the linker.


 
[[Category:PM Data type]]
[[OS2_API | Back to OS/2 API]]
 
 
[[Category:The OS/2 API Project]]

Latest revision as of 07:23, 21 February 2020

Pointer to a window procedure.

Type

FNWP

C Declaration Method

typedef

Coment

In the header file, this is a two-part definition as shown below:

typedef MRESULT (EXPENTRY FNWP) (HWND, ULONG, MPARAM, MPARAM); 
typedef FNWP *PFNWP;

The first argument (HWND) is the handle of the window receiving the message. The second argument (ULONG) is a message identifier. The third argument (MPARAM) is the first message parameter (mp1). The fourth argument (MPARAM) is the second message parameter (mp2). The function returns an MRESULT.

This is the standard function definition for window procedures. Each message has a specific set of possible return codes. The window procedure must return a value that is appropriate for the message being processed.

Window procedures must be exported in the definitions file used by the linker.