Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Dialog_loadImage
#3
Bugs:
GdipLoadPictureFile unknown. Need link.
GetImageSize unknown. Need code or link.
id(15 hDlg). What is 15?
Bitmap handle management:
1. Does not delete the source bitmap. Use flag LR_COPYDELETEORG with CopyImage.
2. STM_SETIMAGE does not delete previous bitmap. DeleteObject SendMessage(...).
3. The __GdiHandle-- line supports just single bitmap in thread. Maybe use array...

Optimizations:
GetImageSize - use bitmap handle, not file. Example:
Function GetBitmapRect
Code:
Copy      Help
;/
function! hbm RECT&r
BITMAP bi
if(GetObjectW(hbm sizeof(bi) &bi))
,r.left=0; r.top=0
,r.right=bi.bmWidth
,r.bottom=bi.bmHeight
,ret 1


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)