Changeset 698 in dev for trunk/ab5.0
- Timestamp:
- Jul 21, 2008, 12:51:44 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ab5.0/abdev/abdev/SubOperation.cpp
r681 r698 6 6 7 7 void ScreenToClient(HWND hwnd,RECT *pRect){ 8 ScreenToClient(hwnd, (POINT *)pRect);9 ScreenToClient(hwnd, (POINT *)(((long)(void *)pRect)+sizeof(POINT)));8 ScreenToClient(hwnd,reinterpret_cast<POINT*>(pRect)); 9 ScreenToClient(hwnd,reinterpret_cast<POINT*>(reinterpret_cast<char*>(pRect)+sizeof(POINT))); 10 10 } 11 11 void ClientToScreen(HWND hwnd,RECT *pRect){ 12 ClientToScreen(hwnd, (POINT *)pRect);13 ClientToScreen(hwnd, (POINT *)(((long)(void *)pRect)+sizeof(POINT)));12 ClientToScreen(hwnd,reinterpret_cast<POINT*>(pRect)); 13 ClientToScreen(hwnd,reinterpret_cast<POINT*>(reinterpret_cast<char*>(pRect)+sizeof(POINT))); 14 14 } 15 15 … … 556 556 557 557 ICONINFO IconInfo; 558 GetIconInfo(hBaseIcon,&IconInfo); 559 558 if(GetIconInfo(hBaseIcon,&IconInfo) == FALSE){ 559 return 0; 560 } 560 561 561 562 //ビットマップを加工 562 563 BITMAP Bitmap; 563 GetObject(IconInfo.hbmColor,sizeof(Bitmap),&Bitmap); 564 if(GetObject(IconInfo.hbmColor,sizeof(Bitmap),&Bitmap) == 0){ 565 return 0; 566 } 564 567 565 568 BITMAPINFO BitmapInfo; … … 572 575 BitmapInfo.bmiHeader.biCompression=BI_RGB; 573 576 574 HDC hdc; 575 hdc=GetDC(GetDesktopWindow()); 576 577 BYTE *pByte; 578 pByte=(BYTE *)HeapAlloc(hHeap,0,Bitmap.bmWidth*Bitmap.bmHeight*sizeof(COLORREF)); 577 HDC hdc=GetDC(0); 578 579 BYTE *pByte=(BYTE *)HeapAlloc(hHeap,0,Bitmap.bmWidth*Bitmap.bmHeight*sizeof(COLORREF)); 580 if(pByte==0){ 581 return 0; 582 } 579 583 GetDIBits(hdc, 580 584 IconInfo.hbmColor, … … 741 745 extern FWINLAYER pSetLayeredWindowAttributes; 742 746 extern HINSTANCE hUser32Lib; 743 hUser32Lib= LoadLibrary("user32.dll");744 pSetLayeredWindowAttributes= (FWINLAYER)GetProcAddress(hUser32Lib,"pSetLayeredWindowAttributes");747 hUser32Lib=GetModuleHandle("user32.dll"); 748 pSetLayeredWindowAttributes=reinterpret_cast<FWINLAYER>(GetProcAddress(hUser32Lib,"SetLayeredWindowAttributes")); 745 749 746 750 … … 1165 1169 FreeLibrary(hIconResInst); 1166 1170 FreeLibrary(hLib_LuxCtrl); 1167 1168 //アルファブレンド用のAPIを解放1169 extern HINSTANCE hUser32Lib;1170 FreeLibrary(hUser32Lib);1171 1171 } 1172 1172 … … 1253 1253 } 1254 1254 else{ 1255 if(hFind=FindFirstFile(MdiInfo[WndNum]->path.c_str(),&wfd)){ 1256 if(hFind==INVALID_HANDLE_VALUE){ 1257 if(!SaveDocument(hChild,NULL)) return 0; 1258 } 1259 else FindClose(hFind); 1255 hFind=FindFirstFile(MdiInfo[WndNum]->path.c_str(),&wfd); 1256 if(hFind==INVALID_HANDLE_VALUE){ 1257 if(!SaveDocument(hChild,NULL)) return 0; 1260 1258 } 1259 else FindClose(hFind); 1261 1260 } 1262 1261 }
Note:
See TracChangeset
for help on using the changeset viewer.