like i have 2 bitmaps loaded 1 is visible and the other not when a user pass the Mouse Over the Bitmap it changes to the other When he remove the mouse from the BMP the first bmp comes again any snippet will be good as im getting crazy trying to do this and nothing tnx BreakBip
Posted on 2000-12-20 19:13:00 by BreakBip
I have something like that, except it works like a button: Button down -> pic 1 Button up -> pic 2 I used a singel static control, and just setting the image using the STM_SETIMAGE message. In this snippet I load the bitmap from the resource file everytime I need it, which is obviously not needed, but this program isn't done anyways... so don't copy the source entirely, just learn from it pls, or you might end up with more bugs then before. ----- Start snippet --- LOCAL hBmp :DWORD ;invoke MessageBox,0,ADDR Err_Mem,ADDR ErrorMsg,MB_OK .if uMsg == WM_LBUTTONUP invoke LoadBitmap,hInstance,500 mov hBmp, eax ; put the return value into a DWORD variable invoke SendMessage,hArrow1,STM_SETIMAGE,IMAGE_BITMAP,hBmp .if ListPos > 0 dec ListPos invoke UpdateScroll invoke SendMessage,hWnd,WM_PAINT,0,0 .endif mov ListTimerMode, 0 invoke KillTimer, hWnd, hListTimer .elseif uMsg == WM_LBUTTONDOWN invoke LoadBitmap,hInstance,501 mov hBmp, eax ; put the return value into a DWORD variable invoke SendMessage,hArrow1,STM_SETIMAGE,IMAGE_BITMAP,hBmp mov ListTimerMode, 1 invoke SetTimer, hWnd, WM_TIMER, 100, NULL mov hListTimer, eax .elseif uMsg == WM_NCHITTEST ; Hack to make Static control receive mouse messages mov eax, HTCLIENT ret .endif invoke CallWindowProc,lpArrow1,hCtl,uMsg,wParam,lParam ----- End snippet ----- I assume you're familiar with subclassing controls and using resource files. Also, the timer stuff is not important here. See ya! -Qweerdy
Posted on 2000-12-21 09:20:00 by Qweerdy