- Timestamp:
- Feb 21, 2010, 5:33:53 PM (16 years ago)
- Location:
- trunk/src/user32
- Files:
-
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/callwrap.asm
r10602 r21356 19 19 DGROUP group BSS32, DATA32 20 20 assume cs:FLAT, ds:FLAT, ss:FLAT, es:FLAT 21 22 DATA32 segment dword use32 public 'DATA'23 21 24 22 CODE32 SEGMENT DWORD PUBLIC USE32 'CODE' -
trunk/src/user32/combo.c
r10216 r21356 85 85 * Load combo button bitmap. 86 86 */ 87 static BOOL COMBO_Init( )87 static BOOL COMBO_Init(void) 88 88 { 89 89 HDC hDC; 90 90 91 91 if( hComboBmp ) return TRUE; 92 if( (hDC = CreateCompatibleDC(0)) )92 if( (hDC = CreateCompatibleDC(0)) != 0) 93 93 { 94 94 BOOL bRet = FALSE; 95 if( (hComboBmp = LoadBitmapW(0, MAKEINTRESOURCEW(OBM_COMBO))) )95 if( (hComboBmp = LoadBitmapW(0, MAKEINTRESOURCEW(OBM_COMBO))) != 0) 96 96 { 97 97 BITMAP bm; … … 676 676 PATCOPY ); 677 677 678 if( (bBool = lphc->wState & CBF_BUTTONDOWN) )678 if( (bBool = lphc->wState & CBF_BUTTONDOWN) != FALSE) 679 679 { 680 680 DrawEdge( hdc, &rectButton, EDGE_SUNKEN, BF_RECT ); … … 750 750 { 751 751 size = SendMessageW(lphc->hWndLBox, LB_GETTEXTLEN, id, 0); 752 if( (pText = HeapAlloc( GetProcessHeap(), 0, (size + 1) * sizeof(WCHAR))) )752 if( (pText = HeapAlloc( GetProcessHeap(), 0, (size + 1) * sizeof(WCHAR))) != NULL) 753 753 { 754 754 /* size from LB_GETTEXTLEN may be too large, from LB_GETTEXT is accurate */ … … 1094 1094 if( length ) 1095 1095 { 1096 if( (pText = HeapAlloc( GetProcessHeap(), 0, (length + 1) * sizeof(WCHAR))) )1096 if( (pText = HeapAlloc( GetProcessHeap(), 0, (length + 1) * sizeof(WCHAR))) != NULL) 1097 1097 { 1098 1098 SendMessageW(lphc->hWndLBox, LB_GETTEXT, … … 1897 1897 LPHEADCOMBO lphc = (LPHEADCOMBO)GetWindowLongA( hwnd, 0 ); 1898 1898 1899 TRACE("[%04x]: msg %s wp %08x lp %08lx\n", 1900 hwnd, SPY_GetMsgName(message, hwnd), wParam, lParam ); 1899 TRACE("[%04x]: msg %s wp %08x lp %08lx\n", hwnd, SPY_GetMsgName(message, hwnd), wParam, lParam ); 1901 1900 1902 1901 if( lphc || message == WM_NCCREATE ) -
trunk/src/user32/controls.h
r9523 r21356 84 84 85 85 extern BOOL COMBO_FlipListbox( LPHEADCOMBO, BOOL, BOOL ); 86 extern BOOL COMBO_RollupListbox( LPHEADCOMBO lphc); 86 87 87 88 #endif // __CONTROLS_H -
trunk/src/user32/edit.c
r21308 r21356 720 720 LPSTR textA = (LPSTR)lParam; 721 721 INT countW = MultiByteToWideChar(CP_ACP, 0, textA, -1, NULL, 0); 722 if((textW = HeapAlloc(GetProcessHeap(), 0, countW * sizeof(WCHAR))) )722 if((textW = HeapAlloc(GetProcessHeap(), 0, countW * sizeof(WCHAR))) != NULL) 723 723 MultiByteToWideChar(CP_ACP, 0, textA, -1, textW, countW); 724 724 } … … 824 824 case EM_SETTABSTOPS16: 825 825 DPRINTF_EDIT_MSG16("EM_SETTABSTOPS"); 826 result = (LRESULT)EDIT_EM_SetTabStops16(es, (INT)wParam, MapSL(lParam));826 result = (LRESULT)EDIT_EM_SetTabStops16(es, (INT)wParam, (LPINT16)MapSL(lParam)); 827 827 break; 828 828 case EM_SETTABSTOPS: … … 1059 1059 { 1060 1060 INT countW = MultiByteToWideChar(CP_ACP, 0, nameA, -1, NULL, 0); 1061 if((nameW = HeapAlloc(GetProcessHeap(), 0, countW * sizeof(WCHAR))) )1061 if((nameW = HeapAlloc(GetProcessHeap(), 0, countW * sizeof(WCHAR))) != NULL) 1062 1062 MultiByteToWideChar(CP_ACP, 0, nameA, -1, nameW, countW); 1063 1063 } … … 2287 2287 if (es->hloc32W) { 2288 2288 UINT alloc_size = ROUND_TO_GROW((size + 1) * sizeof(WCHAR)); 2289 if ((hNew32W = LocalReAlloc(es->hloc32W, alloc_size, LMEM_MOVEABLE | LMEM_ZEROINIT)) ) {2289 if ((hNew32W = LocalReAlloc(es->hloc32W, alloc_size, LMEM_MOVEABLE | LMEM_ZEROINIT)) != 0) { 2290 2290 TRACE("Old 32 bit handle %08x, new handle %08x\n", es->hloc32W, hNew32W); 2291 2291 es->hloc32W = hNew32W; … … 2324 2324 2325 2325 alloc_size = ROUND_TO_GROW((size + 1) * sizeof(WCHAR)); 2326 if ((es->undo_text = HeapReAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, es->undo_text, alloc_size)) ) {2326 if ((es->undo_text = HeapReAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, es->undo_text, alloc_size)) != 0) { 2327 2327 #ifdef __WIN32OS2__ 2328 2328 es->undo_buffer_size = alloc_size/sizeof(WCHAR) - 1; … … 5190 5190 5191 5191 OpenClipboard(hwnd); 5192 if ((hsrc = GetClipboardData(CF_UNICODETEXT)) ) {5192 if ((hsrc = GetClipboardData(CF_UNICODETEXT)) != 0) { 5193 5193 src = (LPWSTR)GlobalLock(hsrc); 5194 5194 EDIT_EM_ReplaceSel(hwnd, es, TRUE, src, TRUE); … … 5293 5293 LPCSTR textA = (LPCSTR)lParam; 5294 5294 INT countW = MultiByteToWideChar(CP_ACP, 0, textA, -1, NULL, 0); 5295 if((text = HeapAlloc(GetProcessHeap(), 0, countW * sizeof(WCHAR))) )5295 if((text = HeapAlloc(GetProcessHeap(), 0, countW * sizeof(WCHAR))) != NULL) 5296 5296 MultiByteToWideChar(CP_ACP, 0, textA, -1, text, countW); 5297 5297 } -
trunk/src/user32/exticon.c
r8049 r21356 204 204 /* allocate the phony ICONDIR structure */ 205 205 *uSize = lpcid->idCount * sizeof(CURSORICONDIRENTRY) + HEADER_SIZE; 206 if( (lpID = (CURSORICONDIR*)HeapAlloc(GetProcessHeap(),0, *uSize) ) )206 if( (lpID = (CURSORICONDIR*)HeapAlloc(GetProcessHeap(),0, *uSize) ) != NULL) 207 207 { 208 208 /* copy the header */ -
trunk/src/user32/listbox.c
r21308 r21356 2510 2510 } 2511 2511 2512 TRACE("[%04x]: msg %s wp %08x lp %08lx\n", 2513 hwnd, SPY_GetMsgName(msg, hwnd), wParam, lParam ); 2512 TRACE("[%04x]: msg %s wp %08x lp %08lx\n", hwnd, SPY_GetMsgName(msg, hwnd), wParam, lParam ); 2514 2513 switch(msg) 2515 2514 { … … 2534 2533 LPSTR textA = (LPSTR)lParam; 2535 2534 INT countW = MultiByteToWideChar(CP_ACP, 0, textA, -1, NULL, 0); 2536 if((textW = HeapAlloc(GetProcessHeap(), 0, countW * sizeof(WCHAR))) )2535 if((textW = HeapAlloc(GetProcessHeap(), 0, countW * sizeof(WCHAR))) != NULL) 2537 2536 MultiByteToWideChar(CP_ACP, 0, textA, -1, textW, countW); 2538 2537 } … … 2558 2557 LPSTR textA = (LPSTR)lParam; 2559 2558 INT countW = MultiByteToWideChar(CP_ACP, 0, textA, -1, NULL, 0); 2560 if((textW = HeapAlloc(GetProcessHeap(), 0, countW * sizeof(WCHAR))) )2559 if((textW = HeapAlloc(GetProcessHeap(), 0, countW * sizeof(WCHAR))) != NULL) 2561 2560 MultiByteToWideChar(CP_ACP, 0, textA, -1, textW, countW); 2562 2561 } … … 2580 2579 LPSTR textA = (LPSTR)lParam; 2581 2580 INT countW = MultiByteToWideChar(CP_ACP, 0, textA, -1, NULL, 0); 2582 if((textW = HeapAlloc(GetProcessHeap(), 0, countW * sizeof(WCHAR))) )2581 if((textW = HeapAlloc(GetProcessHeap(), 0, countW * sizeof(WCHAR))) != NULL) 2583 2582 MultiByteToWideChar(CP_ACP, 0, textA, -1, textW, countW); 2584 2583 } … … 2732 2731 LPSTR textA = (LPSTR)lParam; 2733 2732 INT countW = MultiByteToWideChar(CP_ACP, 0, textA, -1, NULL, 0); 2734 if((textW = HeapAlloc(GetProcessHeap(), 0, countW * sizeof(WCHAR))) )2733 if((textW = HeapAlloc(GetProcessHeap(), 0, countW * sizeof(WCHAR))) != NULL) 2735 2734 MultiByteToWideChar(CP_ACP, 0, textA, -1, textW, countW); 2736 2735 } … … 2755 2754 LPSTR textA = (LPSTR)lParam; 2756 2755 INT countW = MultiByteToWideChar(CP_ACP, 0, textA, -1, NULL, 0); 2757 if((textW = HeapAlloc(GetProcessHeap(), 0, countW * sizeof(WCHAR))) )2756 if((textW = HeapAlloc(GetProcessHeap(), 0, countW * sizeof(WCHAR))) != NULL) 2758 2757 MultiByteToWideChar(CP_ACP, 0, textA, -1, textW, countW); 2759 2758 } … … 2782 2781 LPSTR textA = (LPSTR)lParam; 2783 2782 INT countW = MultiByteToWideChar(CP_ACP, 0, textA, -1, NULL, 0); 2784 if((textW = HeapAlloc(GetProcessHeap(), 0, countW * sizeof(WCHAR))) )2783 if((textW = HeapAlloc(GetProcessHeap(), 0, countW * sizeof(WCHAR))) != NULL) 2785 2784 MultiByteToWideChar(CP_ACP, 0, textA, -1, textW, countW); 2786 2785 } … … 2881 2880 LPSTR textA = (LPSTR)lParam; 2882 2881 INT countW = MultiByteToWideChar(CP_ACP, 0, textA, -1, NULL, 0); 2883 if((textW = HeapAlloc(GetProcessHeap(), 0, countW * sizeof(WCHAR))) )2882 if((textW = HeapAlloc(GetProcessHeap(), 0, countW * sizeof(WCHAR))) != NULL) 2884 2883 MultiByteToWideChar(CP_ACP, 0, textA, -1, textW, countW); 2885 2884 } … … 2904 2903 2905 2904 case LB_SETTABSTOPS16: 2906 return LISTBOX_SetTabStops( hwnd, descr, (INT)(INT16)wParam, MapSL( lParam), TRUE );2905 return LISTBOX_SetTabStops( hwnd, descr, (INT)(INT16)wParam, MapSL((LPINT)lParam), TRUE ); 2907 2906 2908 2907 case LB_SETTABSTOPS: … … 3075 3074 if( !descr->lphc ) 3076 3075 { 3077 LPDRAGINFO16 dragInfo = MapSL(lParam );3076 LPDRAGINFO16 dragInfo = (LPDRAGINFO16)MapSL(lParam ); 3078 3077 dragInfo->l = LISTBOX_GetItemFromPoint( descr, dragInfo->pt.x, 3079 3078 dragInfo->pt.y ); … … 3124 3123 LB_DESCR *descr = (LB_DESCR *)GetWindowLongA( hwnd, 0 ); 3125 3124 3126 TRACE_(combo)("[%04x]: msg %s wp %08x lp %08lx\n", 3127 hwnd, SPY_GetMsgName(msg, hwnd), wParam, lParam ); 3125 TRACE_(combo)("[%04x]: msg %s wp %08x lp %08lx\n", hwnd, SPY_GetMsgName(msg, hwnd), wParam, lParam ); 3128 3126 3129 3127 if( descr || msg == WM_CREATE ) -
trunk/src/user32/mdi.c
r9523 r21356 1221 1221 { 1222 1222 if (ci->frameTitle) HeapFree( GetProcessHeap(), 0, ci->frameTitle ); 1223 if ((ci->frameTitle = HeapAlloc( GetProcessHeap(), 0, (strlenW(lpTitle)+1)*sizeof(WCHAR))) )1223 if ((ci->frameTitle = HeapAlloc( GetProcessHeap(), 0, (strlenW(lpTitle)+1)*sizeof(WCHAR))) != NULL) 1224 1224 strcpyW( ci->frameTitle, lpTitle ); 1225 1225 } … … 2046 2046 SetRectEmpty( &childRect ); 2047 2047 2048 if ((list = WIN_ListChildren( hwnd )) )2048 if ((list = WIN_ListChildren( hwnd )) != NULL) 2049 2049 { 2050 2050 int i; -
trunk/src/user32/menu.c
r10190 r21356 395 395 HMENU hMenu; 396 396 397 if ((hMenu = CreateMenu()) )397 if ((hMenu = CreateMenu()) != 0) 398 398 { 399 399 POPUPMENU *menu = MENU_GetMenu(hMenu); … … 411 411 menu->items[0].fType = MF_SYSMENU | MF_POPUP; 412 412 menu->items[0].fState = 0; 413 if ((menu = MENU_GetMenu(hPopupMenu)) ) menu->wFlags |= MF_SYSMENU;413 if ((menu = MENU_GetMenu(hPopupMenu)) != 0) menu->wFlags |= MF_SYSMENU; 414 414 415 415 TRACE("GetSysMenu hMenu=%04x (%04x)\n", hMenu, hPopupMenu ); … … 3573 3573 MENUITEM * lpmi; 3574 3574 3575 if (!(lpmi = MENU_FindItem(&hMenu, &nPos,MF_BYPOSITION))) return -1;3575 if (!(lpmi = MENU_FindItem(&hMenu,(UINT*)&nPos,MF_BYPOSITION))) return -1; 3576 3576 if (lpmi->fType & MF_POPUP) return -1; 3577 3577 return lpmi->wID; … … 4413 4413 else if (unicode) 4414 4414 { 4415 if ((menu->text = HeapAlloc( GetProcessHeap(), 0, (strlenW(text)+1) * sizeof(WCHAR) )) )4415 if ((menu->text = HeapAlloc( GetProcessHeap(), 0, (strlenW(text)+1) * sizeof(WCHAR) )) != NULL) 4416 4416 strcpyW( menu->text, text ); 4417 4417 } … … 4420 4420 LPCSTR str = (LPCSTR)text; 4421 4421 int len = MultiByteToWideChar( CP_ACP, 0, str, -1, NULL, 0 ); 4422 if ((menu->text = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) )) )4422 if ((menu->text = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) )) != NULL) 4423 4423 MultiByteToWideChar( CP_ACP, 0, str, -1, menu->text, len ); 4424 4424 } … … 4817 4817 TRACE("(0x%04x 0x%08lx)\n", hMenu, dwContextHelpID); 4818 4818 4819 if ((menu = MENU_GetMenu(hMenu)) )4819 if ((menu = MENU_GetMenu(hMenu)) != 0) 4820 4820 { 4821 4821 menu->dwContextHelpID = dwContextHelpID; … … 4834 4834 TRACE("(0x%04x)\n", hMenu); 4835 4835 4836 if ((menu = MENU_GetMenu(hMenu)) )4836 if ((menu = MENU_GetMenu(hMenu)) != 0) 4837 4837 { 4838 4838 return menu->dwContextHelpID; -
trunk/src/user32/pmwindow.cpp
r21348 r21356 155 155 // We make sure PM is up and running for our purposes and init the existing 156 156 // thread 0. 157 //************************** ****************************************************157 //******************************************************************************* 158 158 BOOL InitPM() 159 159 { … … 498 498 499 499 SetWin32TIB(); 500 while( hwndEnum = WinGetNextWindow(henum))500 while((hwndEnum = WinGetNextWindow(henum)) != 0) 501 501 { 502 502 WinQueryWindowProcess(hwndEnum, &pidTemp, NULL); … … 2092 2092 henum = WinBeginEnumWindows(HWND_DESKTOP); 2093 2093 2094 while( hwndEnum = WinGetNextWindow(henum))2094 while((hwndEnum = WinGetNextWindow(henum)) != 0) 2095 2095 { 2096 2096 WinQueryWindowProcess(hwndEnum, &pidTemp, NULL); -
trunk/src/user32/text.c
r8754 r21356 470 470 ret = DrawTextExW( hdc, wstr, wcount, rect, flags, NULL ); 471 471 if (flags & DT_MODIFYSTRING) 472 WideCharToMultiByte( CP_ACP, 0, wstr, -1, str, count, NULL, NULL );472 WideCharToMultiByte( CP_ACP, 0, wstr, -1, (LPSTR)str, count, NULL, NULL ); 473 473 HeapFree(GetProcessHeap(), 0, wstr); 474 474 } … … 530 530 slen = strlen((LPCSTR)lp); 531 531 else 532 slen = strlen(MapSL( lp));532 slen = strlen(MapSL((LPCSTR)lp)); 533 533 } 534 534 … … 541 541 GetTextExtentPoint32A(hdc, (LPCSTR)lp, slen, &s); 542 542 else 543 GetTextExtentPoint32A(hdc, MapSL( lp), slen, &s);543 GetTextExtentPoint32A(hdc, MapSL((LPCSTR)lp), slen, &s); 544 544 if(cx == 0) cx = s.cx; 545 545 if(cy == 0) cy = s.cy; … … 569 569 TextOutA(memdc, 0, 0, (LPCSTR)lp, slen); 570 570 else 571 TextOutA(memdc, 0, 0, MapSL( lp), slen);571 TextOutA(memdc, 0, 0, MapSL((LPCSTR)lp), slen); 572 572 } 573 573 -
trunk/src/user32/win32wbase.cpp
r21344 r21356 337 337 } 338 338 /* Make sure parent is valid */ 339 if (!window->IsWindow() ) 339 /*RLW if (!window->IsWindow() ) */ 340 if (!::IsWindow(cs->hwndParent) ) 340 341 { 341 342 RELEASE_WNDOBJ(window); -
trunk/src/user32/win32wbasenonclient.cpp
r10496 r21356 247 247 DispatchMessageA(&msg); 248 248 } 249 if (!IsWindow()) 249 /*RLW if (!IsWindow()) */ 250 if (::IsWindow(getWindowHandle())) 250 251 { 251 252 ReleaseCapture(); -
trunk/src/user32/win32wmisc.cpp
r10119 r21356 65 65 /* Now build the list of all windows */ 66 66 67 if ((list = (HWND *)HeapAlloc( GetProcessHeap(), 0, sizeof(HWND) * (count + 1))) )67 if ((list = (HWND *)HeapAlloc( GetProcessHeap(), 0, sizeof(HWND) * (count + 1))) != NULL) 68 68 { 69 69 win32wnd = (Win32BaseWindow*)parent->getFirstChild(); -
trunk/src/user32/windlg.cpp
r10431 r21356 649 649 SendMessageA( listbox, combo ? CB_GETLBTEXT : LB_GETTEXT, item, (LPARAM)buffer ); 650 650 651 if ((ret = (buffer[0] == '[')) ) /* drive or directory */651 if ((ret = (buffer[0] == '[')) != FALSE) /* drive or directory */ 652 652 { 653 653 if (buffer[1] == '-') /* drive */ … … 701 701 char *p, *p2; 702 702 p = spec; 703 if ((p2 = strrchr( p, '\\' )) ) p = p2;704 if ((p2 = strrchr( p, '/' )) ) p = p2;703 if ((p2 = strrchr( p, '\\' )) != NULL) p = p2; 704 if ((p2 = strrchr( p, '/' )) != NULL) p = p2; 705 705 if (p != spec) 706 706 { … … 756 756 /* Update the original file spec */ 757 757 char *p = spec; 758 while ((*orig_spec++ = *p++) );758 while ((*orig_spec++ = *p++) != 0); 759 759 } 760 760 -
trunk/src/user32/winicon.cpp
r9638 r21356 929 929 930 930 #ifdef __WIN32OS2__ 931 if( (hdc = CreateCompatibleDC( 0 )) )931 if( (hdc = CreateCompatibleDC( 0 )) != 0 ) 932 932 #else 933 933 if( (hdc = GetDC( 0 )) ) … … 948 948 949 949 if ((pInfo = (BITMAPINFO *)HeapAlloc( GetProcessHeap(), 0, 950 max(size, sizeof(BITMAPINFOHEADER) + 2*sizeof(RGBQUAD)))) )950 max(size, sizeof(BITMAPINFOHEADER) + 2*sizeof(RGBQUAD)))) != NULL) 951 951 { 952 952 memcpy( pInfo, bmi, size ); … … 1017 1017 if (DoStretch) 1018 1018 { 1019 if ((hAndBits = CreateBitmap(width, height, 1, 1, NULL)) )1019 if ((hAndBits = CreateBitmap(width, height, 1, 1, NULL)) != 0) 1020 1020 { 1021 1021 HBITMAP hOld; -
trunk/src/user32/wndmsg.h
r10431 r21356 21 21 void DebugPrintMessage(HWND hwnd, UINT Msg, WPARAM wParam, LPARAM lParam, BOOL fUnicode, BOOL fInternalMsg); 22 22 #else 23 #define GetMsgText(Msg) "" 23 24 #define DebugPrintMessage(a, b, c, d, e, f) 24 25 #endif
Note:
See TracChangeset
for help on using the changeset viewer.