Changeset 342 for trunk/src/user32/new/winaccel.cpp
- Timestamp:
- Jul 20, 1999, 9:42:36 AM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/new/winaccel.cpp
r332 r342 1 /* $Id: winaccel.cpp,v 1. 2 1999-07-18 18:04:30sandervl Exp $ */1 /* $Id: winaccel.cpp,v 1.3 1999-07-20 07:42:36 sandervl Exp $ */ 2 2 /* 3 3 * Win32 accelartor key functions for OS/2 … … 11 11 #include <os2win.h> 12 12 #include <misc.h> 13 #include <win32wnd.h> 13 14 15 //****************************************************************************** 16 //****************************************************************************** 17 HACCEL WIN32API LoadAcceleratorsA(HINSTANCE hinst, LPCSTR lpszAcc) 18 { 19 HACCEL rc; 20 21 rc = (HACCEL)FindResourceA(hinst, lpszAcc, RT_ACCELERATORA); 22 23 dprintf(("LoadAcceleratorsA returned %d\n", rc)); 24 return(rc); 25 } 26 //****************************************************************************** 27 //****************************************************************************** 28 HACCEL WIN32API LoadAcceleratorsW(HINSTANCE hinst, LPCWSTR lpszAccel) 29 { 30 HACCEL rc; 31 32 rc = (HACCEL)FindResourceW(hinst, lpszAccel, RT_ACCELERATORW); 33 34 dprintf(("LoadAcceleratorsW returned %d\n", rc)); 35 return(rc); 36 } 37 //****************************************************************************** 38 //****************************************************************************** 39 BOOL WIN32API DestroyAcceleratorTable( HACCEL haccel) 40 { 41 Win32Resource *winres; 42 43 if(HIWORD(haccel) == 0) { 44 dprintf(("DestroyAcceleratorTable: invalid haccel %x", haccel)); 45 SetLastError(ERROR_INVALID_PARAMETER); 46 return FALSE; 47 } 48 dprintf(("DestroyAcceleratorTable %x\n", haccel)); 49 winres = (Win32Resource *)haccel; 50 delete winres; 51 return TRUE; 52 } 14 53 //****************************************************************************** 15 54 //TODO: Do more than just return? … … 17 56 int WIN32API TranslateAcceleratorA(HWND hwnd, HACCEL haccel, LPMSG lpmsg) 18 57 { 19 //CB: needs more work 20 //WinTranslateAccel(); 21 //get hab, translate 58 Win32Window *window; 59 60 window = Win32Window::GetWindowFromHandle(hwnd); 61 if(!window) { 62 //Msg for (non-client) child of our frame window 63 // dprintf(("TranslateAcceleratorA, window %x not found", hwnd)); 64 return FALSE; 65 } 66 if(window->GetAccelTable() != haccel) { 67 dprintf(("TranslateAcceleratorA %X %X %X", hwnd, haccel, lpmsg->hwnd)); 68 window->SetAccelTable(haccel); 69 } 70 22 71 //SvL: OS/2 automatically translates accelerator keys 23 72 return FALSE; … … 25 74 //****************************************************************************** 26 75 //****************************************************************************** 27 int WIN32API TranslateAccelerator ( HWND arg1, HACCEL arg2, LPMSG arg3)76 int WIN32API TranslateAcceleratorW( HWND hwnd, HACCEL hAccel, LPMSG lpMsg) 28 77 { 29 //SvL: OS/2 automatically translates accelerator keys 30 return FALSE; 31 } 32 //****************************************************************************** 33 //****************************************************************************** 34 int WIN32API TranslateAcceleratorW( HWND arg1, HACCEL arg2, LPMSG arg3) 35 { 36 //SvL: OS/2 automatically translates accelerator keys 37 return FALSE; 78 return TranslateAcceleratorA(hwnd, hAccel, lpMsg); 38 79 } 39 80 //****************************************************************************** … … 67 108 //****************************************************************************** 68 109 //****************************************************************************** 69 BOOL WIN32API DestroyAcceleratorTable( HACCEL arg1)70 {71 #ifdef DEBUG72 WriteLog("USER32: DestroyAcceleratorTable\n");73 #endif74 return O32_DestroyAcceleratorTable(arg1);75 }76 //******************************************************************************77 //******************************************************************************78 110 int WIN32API CopyAcceleratorTableA(HACCEL hAccelSrc, LPACCEL lpAccelDest, 79 111 int cAccelEntries)
Note:
See TracChangeset
for help on using the changeset viewer.