Changeset 1020 for trunk/src/user32/winmenu.cpp
- Timestamp:
- Sep 23, 1999, 4:54:04 PM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/winmenu.cpp
r985 r1020 1 /* $Id: winmenu.cpp,v 1. 3 1999-09-19 18:33:32 sandervlExp $ */1 /* $Id: winmenu.cpp,v 1.4 1999-09-23 14:53:05 phaller Exp $ */ 2 2 3 3 /* … … 30 30 //****************************************************************************** 31 31 //****************************************************************************** 32 HMENU WIN32API LoadMenuA(HINSTANCE hinst, LPCSTR lpszMenu) 33 { 34 HMENU rc; 35 36 rc = (HMENU)FindResourceA(hinst, lpszMenu, RT_MENUA); 37 dprintf(("LoadMenuA (%X) returned %d\n", hinst, rc)); 38 return(rc); 39 } 40 //****************************************************************************** 41 //****************************************************************************** 42 HMENU WIN32API LoadMenuW(HINSTANCE hinst, LPCWSTR lpszMenu) 43 { 44 HMENU rc; 45 46 rc = (HMENU)FindResourceW(hinst, lpszMenu, RT_MENUW); 47 dprintf(("LoadMenuW (%X) returned %d\n", hinst, rc)); 48 return(rc); 32 ODINFUNCTION2(HMENU, LoadMenuA, 33 HINSTANCE, hinst, 34 LPCSTR, lpszMenu) 35 { 36 return (HMENU)FindResourceA(hinst, lpszMenu, RT_MENUA); 37 } 38 //****************************************************************************** 39 //****************************************************************************** 40 ODINFUNCTION2(HMENU, LoadMenuW, 41 HINSTANCE, hinst, 42 LPCWSTR, lpszMenu) 43 { 44 return (HMENU)FindResourceW(hinst, lpszMenu, RT_MENUW); 49 45 } 50 46 //****************************************************************************** … … 52 48 //NOTE: menutemplate strings are always in Unicode format 53 49 //****************************************************************************** 54 HMENU WIN32API LoadMenuIndirectA( const MENUITEMTEMPLATEHEADER * menuTemplate) 55 { 56 Win32MenuRes *winres; 57 58 dprintf(("OS2LoadMenuIndirectA\n")); 59 60 if(winres == NULL) {61 62 }50 ODINFUNCTION1(HMENU, LoadMenuIndirectA, 51 const MENUITEMTEMPLATEHEADER *, menuTemplate) 52 { 53 Win32MenuRes *winres; 54 55 winres = new Win32MenuRes((LPVOID)menuTemplate); 56 if(winres == NULL) 57 return 0; 58 else 63 59 return (HMENU)winres; 64 60 } 65 61 //****************************************************************************** 66 62 //****************************************************************************** 67 HMENU WIN32API LoadMenuIndirectW(const MENUITEMTEMPLATEHEADER *menuTemplate) 68 { 69 Win32MenuRes *winres; 70 71 dprintf(("OS2LoadMenuIndirectW\n")); 72 73 if(winres == NULL) {74 75 }63 ODINFUNCTION1(HMENU, LoadMenuIndirectW, 64 const MENUITEMTEMPLATEHEADER *, menuTemplate) 65 { 66 Win32MenuRes *winres; 67 68 winres = new Win32MenuRes((LPVOID)menuTemplate); 69 if(winres == NULL) 70 return 0; 71 else 76 72 return (HMENU)winres; 77 73 } 78 74 //****************************************************************************** 79 75 //****************************************************************************** 80 BOOL WIN32API DestroyMenu(HMENU hmenu) 81 { 82 Win32MenuRes *winres; 83 84 dprintf(("OS2DestroyMenu\n")); 85 if(HIWORD(hmenu) == 0) { 86 SetLastError(ERROR_INVALID_PARAMETER); 87 return FALSE; 88 } 89 winres = (Win32MenuRes *)hmenu; 90 delete winres; 91 return TRUE; 92 } 93 //****************************************************************************** 94 //****************************************************************************** 95 HMENU WIN32API GetMenu( HWND hwnd) 76 ODINFUNCTION1(BOOL, DestroyMenu, 77 HMENU, hmenu) 78 { 79 Win32MenuRes *winres; 80 81 if(HIWORD(hmenu) == 0) 82 { 83 SetLastError(ERROR_INVALID_PARAMETER); 84 return FALSE; 85 } 86 87 winres = (Win32MenuRes *)hmenu; 88 delete winres; 89 return TRUE; 90 } 91 //****************************************************************************** 92 //****************************************************************************** 93 ODINFUNCTION1(HMENU, GetMenu, 94 HWND, hwnd) 96 95 { 97 96 Win32BaseWindow *window; 98 97 99 window = Win32BaseWindow::GetWindowFromHandle(hwnd); 100 if(!window) { 101 dprintf(("GetMenu, window %x not found", hwnd)); 102 return 0; 103 } 104 dprintf(("GetMenu %x", hwnd)); 105 return window->GetMenu(); 106 } 107 //****************************************************************************** 108 //****************************************************************************** 109 BOOL WIN32API SetMenu( HWND hwnd, HMENU hmenu) 98 window = Win32BaseWindow::GetWindowFromHandle(hwnd); 99 if(!window) 100 { 101 dprintf(("GetMenu, window %x not found", hwnd)); 102 return 0; 103 } 104 105 return window->GetMenu(); 106 } 107 //****************************************************************************** 108 //****************************************************************************** 109 ODINFUNCTION2(BOOL, SetMenu, 110 HWND, hwnd, 111 HMENU, hmenu) 110 112 { 111 113 Win32BaseWindow *window; 112 114 113 window = Win32BaseWindow::GetWindowFromHandle(hwnd); 114 if(!window) { 115 dprintf(("SetMenu, window %x not found", hwnd)); 116 return 0; 117 } 118 dprintf(("SetMenu %x %x\n", hwnd, hmenu)); 119 window->SetMenu(hmenu); 120 return TRUE; 121 } 122 //****************************************************************************** 123 //****************************************************************************** 124 DWORD WIN32API GetMenuCheckMarkDimensions(void) 125 { 126 dprintf(("USER32: GetMenuCheckMarkDimensions\n")); 127 return O32_GetMenuCheckMarkDimensions(); 128 } 129 //****************************************************************************** 130 //****************************************************************************** 131 int WIN32API GetMenuItemCount( HMENU hMenu) 132 { 133 Win32MenuRes *menu = (Win32MenuRes *)hMenu; 134 135 dprintf(("USER32: GetMenuItemCount %x", hMenu)); 136 if(menu == NULL || menu->getOS2Handle() == 0) 137 { 138 SetLastError(ERROR_INVALID_PARAMETER); 139 return 0; 140 } 141 return OSLibGetMenuItemCount(menu->getOS2Handle()); 142 } 143 //****************************************************************************** 144 //****************************************************************************** 145 UINT WIN32API GetMenuItemID( HMENU hMenu, int nPos) 146 { 147 Win32MenuRes *menu = (Win32MenuRes *)hMenu; 148 149 dprintf(("USER32: GetMenuItemID %x %d\n", hMenu, nPos)); 150 if(menu == NULL || menu->getOS2Handle() == 0) 151 { 152 SetLastError(ERROR_INVALID_PARAMETER); 153 return 0; 154 } 155 return O32_GetMenuItemID(menu->getOS2Handle(), nPos); 156 } 157 //****************************************************************************** 158 //****************************************************************************** 159 UINT WIN32API GetMenuState(HMENU hMenu, UINT arg2, UINT arg3) 160 { 161 Win32MenuRes *menu = (Win32MenuRes *)hMenu; 162 163 dprintf(("USER32: GetMenuState\n")); 164 if(menu == NULL || menu->getOS2Handle() == 0) 165 { 166 SetLastError(ERROR_INVALID_PARAMETER); 167 return 0; 168 } 169 return O32_GetMenuState(menu->getOS2Handle(), arg2, arg3); 170 } 171 //****************************************************************************** 172 //****************************************************************************** 173 int WIN32API GetMenuStringA( HMENU hMenu, UINT arg2, LPSTR arg3, int arg4, UINT arg5) 174 { 175 Win32MenuRes *menu = (Win32MenuRes *)hMenu; 176 177 dprintf(("USER32: GetMenuStringA")); 178 if(menu == NULL || menu->getOS2Handle() == 0) 179 { 180 SetLastError(ERROR_INVALID_PARAMETER); 181 return 0; 182 } 183 return O32_GetMenuString(menu->getOS2Handle(), arg2, arg3, arg4, arg5); 184 } 185 //****************************************************************************** 186 //****************************************************************************** 187 int WIN32API GetMenuStringW(HMENU hMenu, UINT idItem, LPWSTR lpsz, int cchMax, UINT fuFlags) 188 { 189 Win32MenuRes *menu = (Win32MenuRes *)hMenu; 190 char *astring = (char *)malloc(cchMax); 191 int rc; 192 193 dprintf(("USER32: GetMenuStringW")); 194 if(menu == NULL || menu->getOS2Handle() == 0) 195 { 196 SetLastError(ERROR_INVALID_PARAMETER); 197 return 0; 198 } 199 rc = O32_GetMenuString(menu->getOS2Handle(), idItem, astring, cchMax, fuFlags); 200 free(astring); 201 if(rc) { 202 dprintf(("USER32: OS2GetMenuStringW %s\n", astring)); 203 AsciiToUnicode(astring, lpsz); 204 } 205 else lpsz[0] = 0; 206 return(rc); 207 } 208 //****************************************************************************** 209 //****************************************************************************** 210 BOOL WIN32API SetMenuItemBitmaps( HMENU hMenu, UINT arg2, UINT arg3, HBITMAP arg4, HBITMAP arg5) 115 window = Win32BaseWindow::GetWindowFromHandle(hwnd); 116 if(!window) 117 { 118 dprintf(("SetMenu, window %x not found", hwnd)); 119 return 0; 120 } 121 122 window->SetMenu(hmenu); 123 return TRUE; 124 } 125 //****************************************************************************** 126 //****************************************************************************** 127 ODINFUNCTION0(DWORD, GetMenuCheckMarkDimensions) 128 { 129 return O32_GetMenuCheckMarkDimensions(); 130 } 131 //****************************************************************************** 132 //****************************************************************************** 133 ODINFUNCTION1(int, GetMenuItemCount, 134 HMENU, hMenu) 135 { 136 Win32MenuRes *menu = (Win32MenuRes *)hMenu; 137 138 if(menu == NULL || menu->getOS2Handle() == 0) 139 { 140 SetLastError(ERROR_INVALID_PARAMETER); 141 return 0; 142 } 143 144 return OSLibGetMenuItemCount(menu->getOS2Handle()); 145 } 146 //****************************************************************************** 147 //****************************************************************************** 148 ODINFUNCTION2(UINT, GetMenuItemID, 149 HMENU, hMenu, 150 int, nPos) 151 { 152 Win32MenuRes *menu = (Win32MenuRes *)hMenu; 153 154 if(menu == NULL || menu->getOS2Handle() == 0) 155 { 156 SetLastError(ERROR_INVALID_PARAMETER); 157 return 0; 158 } 159 160 return O32_GetMenuItemID(menu->getOS2Handle(), nPos); 161 } 162 //****************************************************************************** 163 //****************************************************************************** 164 ODINFUNCTION3(UINT, GetMenuState, 165 HMENU, hMenu, 166 UINT, arg2, 167 UINT, arg3) 168 { 169 Win32MenuRes *menu = (Win32MenuRes *)hMenu; 170 171 if(menu == NULL || menu->getOS2Handle() == 0) 172 { 173 SetLastError(ERROR_INVALID_PARAMETER); 174 return 0; 175 } 176 177 return O32_GetMenuState(menu->getOS2Handle(), arg2, arg3); 178 } 179 //****************************************************************************** 180 //****************************************************************************** 181 ODINFUNCTION5(int, GetMenuStringA, 182 HMENU, hMenu, 183 UINT, arg2, 184 LPSTR, arg3, 185 int, arg4, 186 UINT, arg5) 187 { 188 Win32MenuRes *menu = (Win32MenuRes *)hMenu; 189 190 if(menu == NULL || menu->getOS2Handle() == 0) 191 { 192 SetLastError(ERROR_INVALID_PARAMETER); 193 return 0; 194 } 195 196 return O32_GetMenuString(menu->getOS2Handle(), arg2, arg3, arg4, arg5); 197 } 198 //****************************************************************************** 199 //****************************************************************************** 200 ODINFUNCTION5(int, GetMenuStringW, 201 HMENU, hMenu, 202 UINT, idItem, 203 LPWSTR,lpsz, 204 int, cchMax, 205 UINT, fuFlags) 206 { 207 Win32MenuRes *menu = (Win32MenuRes *)hMenu; 208 char *astring = (char *)malloc(cchMax); 209 int rc; 210 211 if(menu == NULL || menu->getOS2Handle() == 0) 212 { 213 SetLastError(ERROR_INVALID_PARAMETER); 214 return 0; 215 } 216 217 rc = O32_GetMenuString(menu->getOS2Handle(), idItem, astring, cchMax, fuFlags); 218 free(astring); 219 if(rc) 220 { 221 dprintf(("USER32: OS2GetMenuStringW %s\n", astring)); 222 AsciiToUnicode(astring, lpsz); 223 } 224 else 225 lpsz[0] = 0; 226 227 return(rc); 228 } 229 //****************************************************************************** 230 //****************************************************************************** 231 ODINFUNCTION5(BOOL, SetMenuItemBitmaps, 232 HMENU, hMenu, 233 UINT, arg2, 234 UINT, arg3, 235 HBITMAP, arg4, 236 HBITMAP, arg5) 211 237 { 212 238 Win32MenuRes *menu = (Win32MenuRes *)hMenu; … … 222 248 //****************************************************************************** 223 249 //****************************************************************************** 224 HMENU WIN32API GetSubMenu(HWND hMenu, int arg2) 225 { 226 Win32MenuRes *menu = (Win32MenuRes *)hMenu; 227 228 dprintf(("USER32: GetSubMenu\n")); 229 if(menu == NULL || menu->getOS2Handle() == 0) 230 { 231 SetLastError(ERROR_INVALID_PARAMETER); 232 return 0; 233 } 234 return O32_GetSubMenu(menu->getOS2Handle(), arg2); 250 ODINFUNCTION2(HMENU, GetSubMenu, 251 HWND, hMenu, 252 int, arg2) 253 { 254 Win32MenuRes *menu = (Win32MenuRes *)hMenu; 255 Win32MenuRes *menuReturned; 256 HMENU hMenuReturned; 257 258 if(menu == NULL || menu->getOS2Handle() == 0) 259 { 260 SetLastError(ERROR_INVALID_PARAMETER); 261 return 0; 262 } 263 264 hMenuReturned = O32_GetSubMenu(menu->getOS2Handle(), arg2); 265 /* @@@PH allocate Win32MenuRes object ! */ 266 menuReturned = new Win32MenuRes(hMenu); 267 return ((HMENU)menuReturned); 235 268 } 236 269 //****************************************************************************** … … 254 287 //****************************************************************************** 255 288 //****************************************************************************** 256 BOOL WIN32API IsMenu( HMENU hMenu) 289 ODINFUNCTION1(BOOL, IsMenu, 290 HMENU, hMenu) 257 291 { 258 292 Win32MenuRes *menu = (Win32MenuRes *)hMenu; … … 268 302 //****************************************************************************** 269 303 //****************************************************************************** 270 BOOL WIN32API TrackPopupMenu(HMENU hMenu, UINT arg2, int arg3, int arg4, int arg5, HWND arg6, const RECT * arg7) 304 ODINFUNCTION7(BOOL, TrackPopupMenu, 305 HMENU, hMenu, 306 UINT, arg2, 307 int, arg3, 308 int, arg4, 309 int, arg5, 310 HWND, arg6, 311 const RECT *, arg7) 271 312 { 272 313 Win32MenuRes *menu = (Win32MenuRes *)hMenu; … … 282 323 //****************************************************************************** 283 324 //****************************************************************************** 284 BOOL WIN32API TrackPopupMenuEx(HMENU hMenu, UINT flags, int X, int Y, HWND hwnd, LPTPMPARAMS lpPM) 325 ODINFUNCTION6(BOOL, TrackPopupMenuEx, 326 HMENU, hMenu, 327 UINT, flags, 328 int, X, 329 int, Y, 330 HWND, hwnd, 331 LPTPMPARAMS, lpPM) 285 332 { 286 333 Win32MenuRes *menu = (Win32MenuRes *)hMenu; … … 301 348 //****************************************************************************** 302 349 //****************************************************************************** 303 BOOL WIN32API AppendMenuA(HMENU hMenu, UINT uFlags, UINT ulDNewItem, LPCSTR lpNewItem) 350 ODINFUNCTION4(BOOL, AppendMenuA, 351 HMENU, hMenu, 352 UINT, uFlags, 353 UINT, ulDNewItem, 354 LPCSTR, lpNewItem) 304 355 { 305 356 Win32MenuRes *menu = (Win32MenuRes *)hMenu; … … 322 373 //****************************************************************************** 323 374 //****************************************************************************** 324 BOOL WIN32API AppendMenuW( HMENU hMenu, UINT arg2, UINT arg3, LPCWSTR arg4) 375 ODINFUNCTION4(BOOL, AppendMenuW, 376 HMENU, hMenu, 377 UINT, arg2, 378 UINT, arg3, 379 LPCWSTR, arg4) 325 380 { 326 381 Win32MenuRes *menu = (Win32MenuRes *)hMenu; … … 347 402 //****************************************************************************** 348 403 //****************************************************************************** 349 DWORD WIN32API CheckMenuItem( HMENU hMenu, UINT arg2, UINT arg3) 404 ODINFUNCTION3(DWORD, CheckMenuItem, 405 HMENU, hMenu, 406 UINT, arg2, 407 UINT, arg3) 350 408 { 351 409 Win32MenuRes *menu = (Win32MenuRes *)hMenu; … … 361 419 //****************************************************************************** 362 420 //****************************************************************************** 363 HMENU WIN32API CreateMenu(void) 364 { 365 Win32MenuRes *menu = 0; 366 HMENU hMenu; 367 368 hMenu = O32_CreateMenu(); 369 if(hMenu) { 370 menu = new Win32MenuRes(hMenu); 371 if(menu == NULL) { 372 return 0; 373 } 374 } 375 dprintf(("USER32: OS2CreateMenu returned %d\n", hMenu)); 376 return (HMENU)menu; 377 } 378 //****************************************************************************** 379 //****************************************************************************** 380 HMENU WIN32API CreatePopupMenu(void) 381 { 382 Win32MenuRes *menu = 0; 383 HMENU hMenu; 384 385 dprintf(("USER32: OS2CreatePopupMenu\n")); 386 hMenu = O32_CreatePopupMenu(); 387 if(hMenu) { 388 menu = new Win32MenuRes(hMenu); 389 if(menu == NULL) { 390 return 0; 391 } 392 } 393 return (HMENU)menu; 394 } 395 //****************************************************************************** 396 //****************************************************************************** 397 BOOL WIN32API EnableMenuItem( HMENU hMenu, UINT arg2, UINT arg3) 398 { 399 Win32MenuRes *menu = (Win32MenuRes *)hMenu; 400 401 dprintf(("USER32: OS2EnableMenuItem\n")); 402 if(menu == NULL || menu->getOS2Handle() == 0) 403 { 404 SetLastError(ERROR_INVALID_PARAMETER); 405 return 0; 406 } 407 return O32_EnableMenuItem(menu->getOS2Handle(), arg2, arg3); 408 } 409 //****************************************************************************** 410 //****************************************************************************** 411 BOOL WIN32API ModifyMenuA( HMENU hMenu, UINT arg2, UINT arg3, UINT arg4, LPCSTR arg5) 421 ODINFUNCTION0(HMENU, CreateMenu) 422 { 423 Win32MenuRes *menu = 0; 424 HMENU hMenu; 425 426 hMenu = O32_CreateMenu(); 427 if(hMenu) 428 { 429 menu = new Win32MenuRes(hMenu); 430 if(menu == NULL) 431 return 0; 432 } 433 434 return (HMENU)menu; 435 } 436 //****************************************************************************** 437 //****************************************************************************** 438 ODINFUNCTION0(HMENU, CreatePopupMenu) 439 { 440 Win32MenuRes *menu = 0; 441 HMENU hMenu; 442 443 hMenu = O32_CreatePopupMenu(); 444 if(hMenu) 445 { 446 menu = new Win32MenuRes(hMenu); 447 if(menu == NULL) 448 return 0; 449 } 450 451 return (HMENU)menu; 452 } 453 //****************************************************************************** 454 //****************************************************************************** 455 ODINFUNCTION3(BOOL,EnableMenuItem,HMENU,hMenu, 456 UINT, uIDEnableItem, 457 UINT, uEnable) 458 { 459 Win32MenuRes *menu = (Win32MenuRes *)hMenu; 460 461 if(menu == NULL || menu->getOS2Handle() == 0) 462 { 463 SetLastError(ERROR_INVALID_PARAMETER); 464 return 0; 465 } 466 467 return O32_EnableMenuItem(menu->getOS2Handle(), 468 uIDEnableItem, 469 uEnable); 470 } 471 //****************************************************************************** 472 //****************************************************************************** 473 ODINFUNCTION5(BOOL, ModifyMenuA, 474 HMENU, hMenu, 475 UINT, arg2, 476 UINT, arg3, 477 UINT, arg4, 478 LPCSTR, arg5) 412 479 { 413 480 Win32MenuRes *menu = (Win32MenuRes *)hMenu; … … 423 490 //****************************************************************************** 424 491 //****************************************************************************** 425 BOOL WIN32API ModifyMenuW( HMENU hMenu, UINT arg2, UINT arg3, UINT arg4, LPCWSTR arg5) 492 ODINFUNCTION5(BOOL, ModifyMenuW, 493 HMENU, hMenu, 494 UINT, arg2, 495 UINT, arg3, 496 UINT, arg4, 497 LPCWSTR, arg5) 426 498 { 427 499 BOOL rc; … … 449 521 //****************************************************************************** 450 522 //****************************************************************************** 451 BOOL WIN32API RemoveMenu( HMENU hMenu, UINT arg2, UINT arg3) 523 ODINFUNCTION3(BOOL, RemoveMenu, 524 HMENU, hMenu, 525 UINT, arg2, 526 UINT, arg3) 452 527 { 453 528 Win32MenuRes *menu = (Win32MenuRes *)hMenu; … … 464 539 //****************************************************************************** 465 540 //****************************************************************************** 466 BOOL WIN32API DeleteMenu( HMENU hMenu, UINT arg2, UINT arg3) 541 ODINFUNCTION3(BOOL, DeleteMenu, 542 HMENU, hMenu, 543 UINT, arg2, 544 UINT, arg3) 467 545 { 468 546 Win32MenuRes *menu = (Win32MenuRes *)hMenu; … … 479 557 //****************************************************************************** 480 558 //****************************************************************************** 481 BOOL WIN32API HiliteMenuItem( HWND hMenu, HMENU arg2, UINT arg3, UINT arg4) 559 ODINFUNCTION4(BOOL, HiliteMenuItem, 560 HWND, hMenu, 561 HMENU, arg2, 562 UINT, arg3, 563 UINT, arg4) 482 564 { 483 565 Win32MenuRes *menu = (Win32MenuRes *)hMenu; … … 494 576 //****************************************************************************** 495 577 //****************************************************************************** 496 BOOL WIN32API InsertMenuA( HMENU hMenu, UINT arg2, UINT arg3, UINT arg4, LPCSTR arg5) 578 ODINFUNCTION5(BOOL, InsertMenuA, 579 HMENU, hMenu, 580 UINT, arg2, 581 UINT, arg3, 582 UINT, arg4, 583 LPCSTR, arg5) 497 584 { 498 585 Win32MenuRes *menu = (Win32MenuRes *)hMenu; … … 509 596 //****************************************************************************** 510 597 //****************************************************************************** 511 BOOL WIN32API InsertMenuW(HMENU hMenu, UINT arg2, UINT arg3, UINT arg4, LPCWSTR arg5) 598 ODINFUNCTION5(BOOL, InsertMenuW, 599 HMENU, hMenu, 600 UINT, arg2, 601 UINT, arg3, 602 UINT, arg4, 603 LPCWSTR, arg5) 512 604 { 513 605 BOOL rc; … … 533 625 //****************************************************************************** 534 626 //****************************************************************************** 535 BOOL WIN32API SetMenuContextHelpId(HMENU hmenu, DWORD dwContextHelpId) 627 ODINFUNCTION2(BOOL, SetMenuContextHelpId, 628 HMENU, hmenu, 629 DWORD, dwContextHelpId) 536 630 { 537 631 dprintf(("USER32: OS2SetMenuContextHelpId, not implemented\n")); … … 540 634 //****************************************************************************** 541 635 //****************************************************************************** 542 DWORD WIN32API GetMenuContextHelpId(HMENU hmenu) 636 ODINFUNCTION1(DWORD, GetMenuContextHelpId, 637 HMENU, hmenu) 543 638 { 544 639 dprintf(("USER32: OS2GetMenuContextHelpId, not implemented\n")); … … 547 642 //****************************************************************************** 548 643 //****************************************************************************** 549 BOOL WIN32API CheckMenuRadioItem(HMENU hmenu, UINT idFirst, UINT idLast, 550 UINT idCheck, UINT uFlags) 644 ODINFUNCTION5(BOOL, CheckMenuRadioItem, 645 HMENU, hmenu, 646 UINT, idFirst, 647 UINT, idLast, 648 UINT, idCheck, 649 UINT, uFlags) 551 650 { 552 651 dprintf(("USER32: OS2CheckMenuRadioItem, not implemented\n")); … … 555 654 //****************************************************************************** 556 655 //****************************************************************************** 557 BOOL WIN32API ChangeMenuA(HMENU hMenu, UINT pos, LPCSTR data, UINT id, UINT flags) 656 ODINFUNCTION5(BOOL, ChangeMenuA, 657 HMENU, hMenu, 658 UINT, pos, 659 LPCSTR, data, 660 UINT, id, 661 UINT, flags) 558 662 { 559 663 dprintf(("USER32: ChangeMenuA flags %X\n", flags)); … … 572 676 //****************************************************************************** 573 677 //****************************************************************************** 574 BOOL WIN32API ChangeMenuW(HMENU hMenu, UINT pos, LPCWSTR data, 575 UINT id, UINT flags ) 678 ODINFUNCTION5(BOOL, ChangeMenuW, 679 HMENU, hMenu, 680 UINT, pos, 681 LPCWSTR, data, 682 UINT, id, 683 UINT, flags) 576 684 { 577 685 dprintf(("USER32: ChangeMenuW flags %X\n", flags)); … … 590 698 //****************************************************************************** 591 699 //****************************************************************************** 592 BOOL WIN32API SetMenuItemInfoA(HMENU hmenu, UINT par1, BOOL par2, 593 const MENUITEMINFOA * lpMenuItemInfo) 700 ODINFUNCTION4(BOOL, SetMenuItemInfoA, 701 HMENU, hmenu, 702 UINT, par1, 703 BOOL, par2, 704 const MENUITEMINFOA *, lpMenuItemInfo) 594 705 { 595 706 dprintf(("USER32: SetMenuItemInfoA, faked\n")); … … 597 708 } 598 709 /***************************************************************************** 599 * Name : BOOL WIN32APISetMenuItemInfoW710 * Function : SetMenuItemInfoW 600 711 * Purpose : The SetMenuItemInfo function changes information about a menu item. 601 712 * Parameters: … … 610 721 *****************************************************************************/ 611 722 612 BOOL WIN32API SetMenuItemInfoW(HMENU hMenu, 613 UINT uItem, 614 BOOL fByPosition, 615 const MENUITEMINFOW *lpmmi) 723 ODINFUNCTION4(BOOL, SetMenuItemInfoW, 724 HMENU, hMenu, 725 UINT, uItem, 726 BOOL, fByPosition, 727 const MENUITEMINFOW *, lpmmi) 616 728 { 617 729 dprintf(("USER32:SetMenuItemInfoW (%08xh,%08xh,%08xh,%08x) not implemented.\n", … … 628 740 //****************************************************************************** 629 741 //****************************************************************************** 630 BOOL WIN32API SetMenuDefaultItem(HMENU hmenu, UINT uItem, UINT fByPos ) 742 ODINFUNCTION3(BOOL, SetMenuDefaultItem, 743 HMENU, hmenu, 744 UINT, uItem, 745 UINT, fByPos) 631 746 { 632 747 dprintf(("USER32: SetMenuDefaultItem, faked\n")); … … 635 750 //****************************************************************************** 636 751 //****************************************************************************** 637 BOOL WIN32API GetMenuItemInfoA(HMENU hmenu, UINT uItem, BOOL aBool, 638 MENUITEMINFOA *lpMenuItemInfo ) 639 752 ODINFUNCTION4(BOOL, GetMenuItemInfoA, 753 HMENU, hmenu, 754 UINT, uItem, 755 BOOL, aBool, 756 MENUITEMINFOA *, lpMenuItemInfo) 640 757 { 641 758 dprintf(("USER32: GetMenuItemInfoA, faked\n")); … … 643 760 } 644 761 /***************************************************************************** 645 * Name : UINT WIN32APIGetMenuDefaultItem646 * Purpose : The 762 * Function : GetMenuDefaultItem 763 * Purpose : TheGetMenuDefaultItem function determines the default menu item 647 764 * on the specified menu. 648 765 * Parameters: … … 657 774 *****************************************************************************/ 658 775 659 UINT WIN32API GetMenuDefaultItem(HMENU hMenu, 660 UINT fByPos, 661 UINT gmdiFlags) 776 ODINFUNCTION3(UINT, GetMenuDefaultItem, 777 HMENU, hMenu, 778 UINT, fByPos, 779 UINT, gmdiFlags) 662 780 { 663 781 dprintf(("USER32:GetMenuDefaultItem (%08xh,%u,%08x) not implemented.\n", … … 671 789 672 790 /***************************************************************************** 673 * Name : BOOL WIN32APIGetMenuItemInfoW791 * Function : GetMenuItemInfoW 674 792 * Purpose : The GetMenuItemInfo function retrieves information about a menu item. 675 793 * Parameters: … … 684 802 *****************************************************************************/ 685 803 686 BOOL WIN32API GetMenuItemInfoW(HMENU hMenu, 687 UINT uItem, 688 BOOL fByPosition, 689 MENUITEMINFOW * lpmii) 804 ODINFUNCTION4(BOOL, GetMenuItemInfoW, 805 HMENU, hMenu, 806 UINT, uItem, 807 BOOL, fByPosition, 808 MENUITEMINFOW *, lpmii) 690 809 { 691 810 dprintf(("USER32:GetMenuItemInfoW (%08xh,%08xh,%u,%08x) not implemented.\n", … … 703 822 704 823 /***************************************************************************** 705 * Name : BOOL WIN32APIGetMenuItemRect824 * Function : GetMenuItemRect 706 825 * Purpose : The GetMenuItemRect function retrieves the bounding rectangle 707 826 * for the specified menu item. … … 717 836 *****************************************************************************/ 718 837 719 BOOL WIN32API GetMenuItemRect(HWND hWnd, 720 HMENU hMenu, 721 UINT uItem, 722 LPRECT lprcItem) 838 ODINFUNCTION4(BOOL, GetMenuItemRect, 839 HWND, hWnd, 840 HMENU, hMenu, 841 UINT, uItem, 842 LPRECT, lprcItem) 723 843 { 724 844 dprintf(("USER32:GetMenuItemRect (%08xh,%08xh,%08xh,%08x) not implemented.\n", … … 731 851 } 732 852 /***************************************************************************** 733 * Name : BOOL WIN32APIInsertMenuItemA853 * Function : InsertMenuItemA 734 854 * Purpose : The InsertMenuItem function inserts a new menu item at the specified 735 855 * position in a menu bar or pop-up menu. … … 745 865 *****************************************************************************/ 746 866 747 BOOL WIN32API InsertMenuItemA(HMENU hMenu, 748 UINT uItem, 749 BOOL fByPosition, 750 const MENUITEMINFOA* lpmii) 867 ODINFUNCTION4(BOOL, InsertMenuItemA, 868 HMENU, hMenu, 869 UINT, uItem, 870 BOOL, fByPosition, 871 const MENUITEMINFOA*, lpmii) 751 872 { 752 873 dprintf(("USER32:InsertMenuItemA (%08xh,%08xh,%u,%08x) not implemented.\n", … … 761 882 762 883 /***************************************************************************** 763 * Name : BOOL WIN32APIInsertMenuItemW884 * Function : InsertMenuItemW 764 885 * Purpose : The InsertMenuItem function inserts a new menu item at the specified 765 886 * position in a menu bar or pop-up menu. … … 775 896 *****************************************************************************/ 776 897 777 BOOL WIN32API InsertMenuItemW(HMENU hMenu, 778 UINT uItem, 779 BOOL fByPosition, 780 const MENUITEMINFOW * lpmii) 898 ODINFUNCTION4(BOOL, InsertMenuItemW, 899 HMENU, hMenu, 900 UINT, uItem, 901 BOOL, fByPosition, 902 const MENUITEMINFOW *, lpmii) 781 903 { 782 904 dprintf(("USER32:InsertMenuItemW (%08xh,%08xh,%u,%08x) not implemented.\n", … … 789 911 } 790 912 /***************************************************************************** 791 * Name : UINT WIN32APIMenuItemFromPoint792 * Purpose : The 913 * Function : MenuItemFromPoint 914 * Purpose : TheMenuItemFromPoint function determines which menu item, if 793 915 * any, is at the specified location. 794 916 * Parameters: … … 802 924 *****************************************************************************/ 803 925 804 UINT WIN32API MenuItemFromPoint(HWND hWnd, 805 HMENU hMenu, 806 POINT ptScreen) 926 ODINFUNCTION3(UINT, MenuItemFromPoint, 927 HWND, hWnd, 928 HMENU, hMenu, 929 POINT, ptScreen) 807 930 { 808 931 dprintf(("USER32:MenuItemFromPoint (%08xh,%08xh,%u) not implemented.\n", … … 816 939 817 940 /***************************************************************************** 818 * Name : BOOL WIN32API GetMenuInfo 819 * Purpose : 941 * Function : GetMenuInfo 820 942 * Parameters: 821 943 * Variables : … … 827 949 *****************************************************************************/ 828 950 829 BOOL WIN32API GetMenuInfo (HMENU hMenu, LPMENUINFO lpmi) 951 ODINFUNCTION2(BOOL, GetMenuInfo, 952 HMENU, hMenu, 953 LPMENUINFO, lpmi) 830 954 { 831 955 dprintf(("USER32: GetMenuInfo(%08xh,%08xh) not implemented.\n", … … 867 991 868 992 /***************************************************************************** 869 * Name : BOOL WIN32APISetMenuInfo993 * Function : SetMenuInfo 870 994 * Purpose : 871 995 * Parameters: … … 881 1005 *****************************************************************************/ 882 1006 883 BOOL WIN32API SetMenuInfo (HMENU hMenu, LPCMENUINFO lpmi) 1007 ODINFUNCTION2(BOOL, SetMenuInfo, 1008 HMENU, hMenu, 1009 LPCMENUINFO, lpmi) 884 1010 { 885 1011 dprintf(("USER32: SetMenuInfo(%08xh,%08xh) not implemented.\n", … … 920 1046 #endif 921 1047 1048
Note:
See TracChangeset
for help on using the changeset viewer.