Changeset 336 for trunk/src/user32/new/loadres.cpp
- Timestamp:
- Jul 19, 1999, 1:50:04 PM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/new/loadres.cpp
r300 r336 1 /* $Id: loadres.cpp,v 1. 1 1999-07-14 08:35:34 sandervl Exp $ */1 /* $Id: loadres.cpp,v 1.2 1999-07-19 11:50:04 sandervl Exp $ */ 2 2 3 3 /* … … 201 201 HMENU rc; 202 202 203 #if 1 204 rc = (HMENU)FindResourceA(hinst, lpszMenu, RT_MENUA); 205 #else 203 206 if((int)lpszMenu >> 16 != 0) {//convert string name identifier to numeric id 204 207 dprintf(("lpszMenu %s\n", lpszMenu)); … … 209 212 210 213 rc = O32_LoadMenu(hinst, lpszMenu); 211 214 #endif 212 215 dprintf(("LoadMenuA (%X) returned %d\n", hinst, rc)); 216 return(rc); 217 } 218 //****************************************************************************** 219 //****************************************************************************** 220 HMENU WIN32API LoadMenuW(HINSTANCE hinst, LPCWSTR lpszMenu) 221 { 222 HMENU rc; 223 224 #if 1 225 rc = (HMENU)FindResourceW(hinst, lpszMenu, RT_MENUW); 226 #else 227 char *astring = NULL; 228 if((int)lpszMenu >> 16 != 0) {//convert string name identifier to numeric id 229 astring = UnicodeToAsciiString((LPWSTR)lpszMenu); 230 231 dprintf(("lpszMenu %s\n", astring)); 232 lpszMenu = (LPWSTR)ConvertNameId(hinst, (char *)astring); 233 } 234 else dprintf(("lpszMenu %d\n", (int)lpszMenu)); 235 236 rc = O32_LoadMenu(hinst, (char *)lpszMenu); 237 if(astring) 238 FreeAsciiString(astring); 239 #endif 240 dprintf(("LoadMenuW (%X) returned %d\n", hinst, rc)); 213 241 return(rc); 214 242 } … … 236 264 return 0; 237 265 // return O32_LoadMenuIndirect(arg1); 238 }239 //******************************************************************************240 //******************************************************************************241 HMENU WIN32API LoadMenuW(HINSTANCE hinst, LPCWSTR lpszMenu)242 {243 char *astring = NULL;244 HMENU rc;245 246 if((int)lpszMenu >> 16 != 0) {//convert string name identifier to numeric id247 astring = UnicodeToAsciiString((LPWSTR)lpszMenu);248 249 dprintf(("lpszMenu %s\n", astring));250 lpszMenu = (LPWSTR)ConvertNameId(hinst, (char *)astring);251 }252 else dprintf(("lpszMenu %d\n", (int)lpszMenu));253 254 rc = O32_LoadMenu(hinst, (char *)lpszMenu);255 if(astring)256 FreeAsciiString(astring);257 258 dprintf(("LoadMenuA (%X) returned %d\n", hinst, rc));259 return(rc);260 266 } 261 267 //******************************************************************************
Note:
See TracChangeset
for help on using the changeset viewer.