Hello, I am a..... erm TASM abuser :-) I made a nice dialogbox with two bmp's overlaying each other and as the user presses 'about' button I want to show the other bitmap (or hide the top bitmap ? )....and refresh the dialogbox. How do I do this in ASM ? the bmp resources are tagged 101 & 102 and are in control 1800 and 1820. Or is this not possible in a DialogBox TIA (I spent 2 hours doing a search but I did not find a solution) Vince
Posted on 2001-05-09 11:18:00 by Vince da'M
Howdy! You could try using ShowWindow using SW_HIDE as the nCmdShow parameter to hide the BMP and let the other one show up. Hope that helps! Latigo
Posted on 2001-05-09 11:42:00 by latigo
Hi Hey thanks for the suggestion. What I attempted was similar to Loading and Showing an ICON. This works fine cos I found a WM_SETICON example ;) . But for this BMP I am not sure of the correct syntax. Of course I can make 3 BMP in a resource file and then fix one on the Dialogbox. I want to swap it with another BMP of same quality, just changed a little (actually a ripple effect) with 2 or 3 BMP's. I could not find how to change this 'control' resource on the DB. So I changed my tactic to make a bmp on a button..... But I still failed :-( Here is what I tried :- Push BMP_RESOURCE_NUMBER ;ie 101 Push hInst call LoadBitmapA mov hObj, eax push eax push 0 push BM_SETIMAGE push hWnd call SendMessage It don't work :-( So is it possible to show a BMP on a button with DB or not ? PS I was just a frustrated nyoobie I am now a bald nyoobie and my wife don't like my new hairstyle ! Can Boga donate some spare follicles please.
Posted on 2001-05-10 04:33:00 by Vince da'M
Hi my bald friend :) One thing that i've noticed in your code is that there seems to be a little error when you SendMessage. What is hWnd in your code? is it the handle to a Dialog or is it a handle to the control that holds the bitmap? When you send the BM_SETIMAGE message you must specify the handle of the control that holds the bmp as first parameter. I think that'll make it. Good Luck! Latigo
Posted on 2001-05-10 10:30:00 by latigo