Hi fellows, How do I do the following: I created a dialog Box with DialogParam, it has an edit control and two buttons on it, if you click a button it is supposed to show a picture, in the edit control you enter the path off the bitmap, when you click the button now it is supposed to show the bitmap on the second button How does that work ? I don't know how i do that with the path as input for the file
well it definetly depends on where you have your bmp stored at assemble time. if you have a bmp in a folder named resources and the resource folder is in your project folder you can put something like this in your .rc file. BMP_BUTTON BITMAP DISCARDABLE "resources\\thename.bmp" then in your .asm file put this in your .const BMP_BUTTON equ 500 <--- or whatever const you would like another example: lets say you have a folder in your c:\program files\fun\thename.bmp. it would look like this then BMP_BUTTON BITMAP DISCARDABLE "program files\\fun\\thename.bmp" the double \\ is required because a single \ means null also the bmp must reside on the same partition masm is installed. hope this answers your question smurf This message was edited by smurf, on 4/9/2001 10:13:41 PM
Smurf, i know that, my problem is choosing a file at runtime. I mean that you only enter a path and filename in an editbox and than click "show" and the picture in that certain path on your hd is shown on the button know what i mean ? if not mail me Regards Typhoon
look at your win32 api reference for createbitmapindirect. that' s how i did it.
If I am not completely wrong then Thomas (exagone) does something similar to what you want in his tutorial on creating a small game (Download it here). He shows in detail how to open a specific bitmap and making it available as a bitmap for his problem. Chapter 11.2 should be wht you want! ;) From your posts I assume you know how to assign the bitmap to the button!? :confused: If so then you are ready to go. You load the bitmap with Thomas' way, keep the handle to it and then put it on the button. I hope this is of help (at least of some :D) help for you. Good luck Stefan
Thanks for your hints, but i found a way that works just great for my: LoadImage with the LR_LOADFROMFILE flag it's a very easy and fast way Hey Stefan, Your name sounds kinda German, am i Right ? *Ich meine Krause hoert sich total deutsch an, von wo bistn du ?* Regards Typhoon
I know this is very OFF-TOPIC, so for those who are not Typhoon may ignore this post! Yes, you are right! I am German! By looking at those guestbook entries I made in SaFc0n's guestbook you should already see where I am from, but just in case you didn't notice :) * Ich komme aus Rösrath, in der Nähe von Köln. Falls dir das nichts sagt: (das soll es immer wieder mal geben) Köln liegt am Rhein und ist nur sehr knapp von der ehemaligen Hauptstadt Bonn entfernt. * For further questions I think it would be better if you ask via E-Mail or ICQ. In this way we don't disturb others spamming the message board and we can get more into detail. Stefan