Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

getset.c

Go to the documentation of this file.
00001 /****************************** Module Header ******************************\ 00002 * Module Name: getset.c 00003 * 00004 * Copyright (c) 1985 - 1999, Microsoft Corporation 00005 * 00006 * This module contains window manager information routines 00007 * 00008 * History: 00009 * 10-22-90 MikeHar Ported functions from Win 3.0 sources. 00010 * 13-Feb-1991 mikeke Added Revalidation code (None) 00011 * 08-Feb-1991 IanJa Unicode/ANSI aware and neutral 00012 \***************************************************************************/ 00013 00014 /***************************************************************************\ 00015 * MapServerToClientPfn 00016 * 00017 * Returns the client wndproc representing the server wndproc passed in 00018 * 00019 * 01-13-92 ScottLu Created. 00020 \***************************************************************************/ 00021 00022 ULONG_PTR MapServerToClientPfn( 00023 KERNEL_ULONG_PTR dw, 00024 BOOL bAnsi) 00025 { 00026 int i; 00027 00028 for (i = FNID_WNDPROCSTART; i <= FNID_WNDPROCEND; i++) { 00029 if ((WNDPROC_PWND)dw == STOCID(i)) { 00030 if (bAnsi) { 00031 return FNID_TO_CLIENT_PFNA_CLIENT(i); 00032 } else { 00033 return FNID_TO_CLIENT_PFNW_CLIENT(i); 00034 } 00035 } 00036 } 00037 return 0; 00038 } 00039 00040 /***************************************************************************\ 00041 * MapClientNeuterToClientPfn 00042 * 00043 * Maps client Neuter routines like editwndproc to Ansi or Unicode versions 00044 * and back again. 00045 * 00046 * 01-13-92 ScottLu Created. 00047 \***************************************************************************/ 00048 00049 ULONG_PTR MapClientNeuterToClientPfn( 00050 PCLS pcls, 00051 KERNEL_ULONG_PTR dw, 00052 BOOL bAnsi) 00053 { 00054 /* 00055 * Default to the class window proc. 00056 */ 00057 if (dw == 0) { 00058 dw = (KERNEL_ULONG_PTR)pcls->lpfnWndProc; 00059 } 00060 00061 /* 00062 * If this is one of our controls and it hasn't been subclassed, try 00063 * to return the correct ANSI/Unicode function. 00064 */ 00065 if (pcls->fnid >= FNID_CONTROLSTART && pcls->fnid <= FNID_CONTROLEND) { 00066 if (!bAnsi) { 00067 if (FNID_TO_CLIENT_PFNA_KERNEL(pcls->fnid) == dw) 00068 return FNID_TO_CLIENT_PFNW_CLIENT(pcls->fnid); 00069 } else { 00070 if (FNID_TO_CLIENT_PFNW_KERNEL(pcls->fnid) == dw) 00071 return FNID_TO_CLIENT_PFNA_CLIENT(pcls->fnid); 00072 } 00073 #ifdef BUILD_WOW6432 00074 if (!bAnsi) { 00075 if (FNID_TO_CLIENT_PFNW_KERNEL(pcls->fnid) == dw) 00076 return FNID_TO_CLIENT_PFNW_CLIENT(pcls->fnid); 00077 } else { 00078 if (FNID_TO_CLIENT_PFNA_KERNEL(pcls->fnid) == dw) 00079 return FNID_TO_CLIENT_PFNA_CLIENT(pcls->fnid); 00080 } 00081 #endif 00082 } 00083 00084 return (ULONG_PTR)dw; 00085 }

Generated on Sat May 15 19:40:13 2004 for test by doxygen 1.3.7