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

srvmsg.c File Reference

#include "precomp.h"
#include <messages.h>

Go to the source code of this file.

Defines

#define SfnDDEINIT   SfnDWORD
#define SfnKERNELONLY   SfnDWORD
#define MSGFN(func)   Sfn ## func
#define FNSCSENDMESSAGE   SFNSCSENDMESSAGE

Functions

LRESULT SfnINLBOXSTRING (PWND pwnd, UINT msg, WPARAM wParam, LPARAM lParam, ULONG_PTR xParam, PROC xpfn, DWORD dwSCMSFlags, PSMS psms)
LRESULT SfnOUTLBOXSTRING (PWND pwnd, UINT msg, WPARAM wParam, LPARAM lParam, ULONG_PTR xParam, PROC xpfn, DWORD dwSCMSFlags, PSMS psms)
LRESULT SfnINCBOXSTRING (PWND pwnd, UINT msg, WPARAM wParam, LPARAM lParam, ULONG_PTR xParam, PROC xpfn, DWORD dwSCMSFlags, PSMS psms)
LRESULT SfnOUTCBOXSTRING (PWND pwnd, UINT msg, WPARAM wParam, LPARAM lParam, ULONG_PTR xParam, PROC xpfn, DWORD dwSCMSFlags, PSMS psms)
LRESULT SfnPOWERBROADCAST (PWND pwnd, UINT msg, WPARAM wParam, LPARAM lParam, ULONG_PTR xParam, PROC xpfn, DWORD dwSCMSFlags, PSMS psms)


Define Documentation

#define FNSCSENDMESSAGE   SFNSCSENDMESSAGE
 

Definition at line 27 of file srvmsg.c.

#define MSGFN func   )     Sfn ## func
 

Definition at line 26 of file srvmsg.c.

#define SfnDDEINIT   SfnDWORD
 

Definition at line 14 of file srvmsg.c.

#define SfnKERNELONLY   SfnDWORD
 

Definition at line 15 of file srvmsg.c.


Function Documentation

LRESULT SfnINCBOXSTRING PWND  pwnd,
UINT  msg,
WPARAM  wParam,
LPARAM  lParam,
ULONG_PTR  xParam,
PROC  xpfn,
DWORD  dwSCMSFlags,
PSMS  psms
 

Definition at line 147 of file srvmsg.c.

References DWORD, HW, L, msg, and RevalidateHwnd.

00156 { 00157 DWORD dw; 00158 00159 /* 00160 * See if the control is ownerdraw and does not have the CBS_HASSTRINGS 00161 * style. If so, treat lParam as a DWORD. 00162 */ 00163 if (!RevalidateHwnd(HW(pwnd))) { 00164 return 0L; 00165 } 00166 dw = pwnd->style; 00167 00168 if (!(dw & CBS_HASSTRINGS) && 00169 (dw & (CBS_OWNERDRAWFIXED | CBS_OWNERDRAWVARIABLE))) { 00170 00171 /* 00172 * Treat lParam as a dword. 00173 */ 00174 return SfnDWORD(pwnd, msg, wParam, lParam, xParam, xpfn, dwSCMSFlags, psms); 00175 } 00176 00177 /* 00178 * Treat as a string pointer. Some messages allowed or had certain 00179 * error codes for NULL so send them through the NULL allowed thunk. 00180 * Ventura Publisher does this 00181 */ 00182 switch (msg) { 00183 default: 00184 return SfnINSTRING(pwnd, msg, wParam, lParam, xParam, xpfn, dwSCMSFlags, psms); 00185 break; 00186 00187 case CB_FINDSTRING: 00188 return SfnINSTRINGNULL(pwnd, msg, wParam, lParam, xParam, xpfn, dwSCMSFlags, psms); 00189 break; 00190 } 00191 }

LRESULT SfnINLBOXSTRING PWND  pwnd,
UINT  msg,
WPARAM  wParam,
LPARAM  lParam,
ULONG_PTR  xParam,
PROC  xpfn,
DWORD  dwSCMSFlags,
PSMS  psms
 

Definition at line 39 of file srvmsg.c.

References DWORD, HW, L, msg, and RevalidateHwnd.

00048 { 00049 DWORD dw; 00050 00051 /* 00052 * See if the control is ownerdraw and does not have the LBS_HASSTRINGS 00053 * style. If so, treat lParam as a DWORD. 00054 */ 00055 if (!RevalidateHwnd(HW(pwnd))) { 00056 return 0L; 00057 } 00058 dw = pwnd->style; 00059 00060 if (!(dw & LBS_HASSTRINGS) && 00061 (dw & (LBS_OWNERDRAWFIXED | LBS_OWNERDRAWVARIABLE))) { 00062 00063 /* 00064 * Treat lParam as a dword. 00065 */ 00066 return SfnDWORD(pwnd, msg, wParam, lParam, xParam, xpfn, dwSCMSFlags, psms); 00067 } 00068 00069 /* 00070 * Treat as a string pointer. Some messages allowed or had certain 00071 * error codes for NULL so send them through the NULL allowed thunk. 00072 * Ventura Publisher does this 00073 */ 00074 switch (msg) { 00075 default: 00076 return SfnINSTRING(pwnd, msg, wParam, lParam, xParam, xpfn, dwSCMSFlags, psms); 00077 break; 00078 00079 case LB_FINDSTRING: 00080 return SfnINSTRINGNULL(pwnd, msg, wParam, lParam, xParam, xpfn, dwSCMSFlags, psms); 00081 break; 00082 } 00083 }

LRESULT SfnOUTCBOXSTRING PWND  pwnd,
UINT  msg,
WPARAM  wParam,
LPARAM  lParam,
ULONG_PTR  xParam,
PROC  xpfn,
DWORD  dwSCMSFlags,
PSMS  psms
 

Definition at line 203 of file srvmsg.c.

References BOOL, ClientGetListboxString(), DWORD, HW, L, msg, RevalidateHwnd, ThreadLock, and ThreadUnlock.

00212 { 00213 DWORD dw; 00214 BOOL bNotString; 00215 DWORD dwRet; 00216 TL tlpwnd; 00217 00218 /* 00219 * See if the control is ownerdraw and does not have the CBS_HASSTRINGS 00220 * style. If so, treat lParam as a DWORD. 00221 */ 00222 00223 if (!RevalidateHwnd(HW(pwnd))) { 00224 return 0L; 00225 } 00226 dw = pwnd->style; 00227 00228 bNotString = (!(dw & CBS_HASSTRINGS) && 00229 (dw & (CBS_OWNERDRAWFIXED | CBS_OWNERDRAWVARIABLE))); 00230 00231 /* 00232 * Make this special call which'll know how to copy this string. 00233 */ 00234 ThreadLock(pwnd, &tlpwnd); 00235 dwRet = ClientGetListboxString(pwnd, msg, wParam, 00236 (PLARGE_UNICODE_STRING)lParam, 00237 xParam, xpfn, dwSCMSFlags, bNotString, psms); 00238 ThreadUnlock(&tlpwnd); 00239 return dwRet; 00240 }

LRESULT SfnOUTLBOXSTRING PWND  pwnd,
UINT  msg,
WPARAM  wParam,
LPARAM  lParam,
ULONG_PTR  xParam,
PROC  xpfn,
DWORD  dwSCMSFlags,
PSMS  psms
 

Definition at line 95 of file srvmsg.c.

References BOOL, ClientGetListboxString(), DWORD, HW, L, msg, RevalidateHwnd, ThreadLock, and ThreadUnlock.

00104 { 00105 DWORD dw; 00106 BOOL bNotString; 00107 DWORD dwRet; 00108 TL tlpwnd; 00109 00110 /* 00111 * See if the control is ownerdraw and does not have the LBS_HASSTRINGS 00112 * style. If so, treat lParam as a DWORD. 00113 */ 00114 if (!RevalidateHwnd(HW(pwnd))) { 00115 return 0L; 00116 } 00117 dw = pwnd->style; 00118 00119 /* 00120 * See if the control is ownerdraw and does not have the LBS_HASSTRINGS 00121 * style. If so, treat lParam as a DWORD. 00122 */ 00123 bNotString = (!(dw & LBS_HASSTRINGS) && 00124 (dw & (LBS_OWNERDRAWFIXED | LBS_OWNERDRAWVARIABLE))); 00125 00126 /* 00127 * Make this special call which'll know how to copy this string. 00128 */ 00129 ThreadLock(pwnd, &tlpwnd); 00130 dwRet = ClientGetListboxString(pwnd, msg, wParam, 00131 (PLARGE_UNICODE_STRING)lParam, 00132 xParam, xpfn, dwSCMSFlags, bNotString, psms); 00133 ThreadUnlock(&tlpwnd); 00134 return dwRet; 00135 }

LRESULT SfnPOWERBROADCAST PWND  pwnd,
UINT  msg,
WPARAM  wParam,
LPARAM  lParam,
ULONG_PTR  xParam,
PROC  xpfn,
DWORD  dwSCMSFlags,
PSMS  psms
 

Definition at line 252 of file srvmsg.c.

References ClrWF, msg, SetWF, TestWF, WFGOTQUERYSUSPENDMSG, and WFGOTSUSPENDMSG.

00261 { 00262 switch (wParam) { 00263 case PBT_APMQUERYSUSPEND: 00264 SetWF(pwnd, WFGOTQUERYSUSPENDMSG); 00265 break; 00266 case PBT_APMQUERYSUSPENDFAILED: 00267 if (!TestWF(pwnd, WFGOTQUERYSUSPENDMSG)) 00268 return 0; 00269 ClrWF(pwnd, WFGOTQUERYSUSPENDMSG); 00270 break; 00271 case PBT_APMSUSPEND: 00272 ClrWF(pwnd, WFGOTQUERYSUSPENDMSG); 00273 SetWF(pwnd, WFGOTSUSPENDMSG); 00274 break; 00275 case PBT_APMRESUMESUSPEND: 00276 if (TestWF(pwnd, WFGOTSUSPENDMSG)) { 00277 break; 00278 } 00279 wParam = PBT_APMRESUMECRITICAL; 00280 // FALL THRU 00281 case PBT_APMRESUMECRITICAL: 00282 ClrWF(pwnd, WFGOTQUERYSUSPENDMSG); 00283 ClrWF(pwnd, WFGOTSUSPENDMSG); 00284 break; 00285 } 00286 00287 return SfnDWORD(pwnd, msg, wParam, lParam, xParam, xpfn, dwSCMSFlags, psms); 00288 }


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