![]() |
|
#1
|
|||
|
|||
Clearing a Picture ControlHi,
I am on an MFC project in VC++ wherein am using some Picture Controls on the dialog. I load bitmaps onto the picture control using "StretchBlt" function. I require to clear the loaded image at some point of time fromt he picture control. How do I do it? Can someone help me with this?. Thank you in advance. |
|
#2
|
||||
|
||||
Re: Clearing a Picture ControlTry:
CPP / C++ / C Code:
__________________
Use the force...read the source!! WYCIWYG -- what you code is what you get! |
|
#3
|
|||
|
|||
Re: Clearing a Picture ControlThank you for you kind reply.
I tried the SetBitmap(). But let me tell you the problem. Currently I draw the image into the control using StretchBlt(). I thought I could clear the control if I mention NULL instead fof the filename in the LoadImage() and then StretchBlt(). Loading works fine, but clearing does not happen. Secondly, SetBitmap() loads and clears the image properly. But I've problem in this too. 1. When I load the image, the image is not scaled to the size of the picture control and instead, only the part of it that fits into the control is displayed, unlike StretchBlt which fits the whole image into the control 2. When I clear the image, even the border of the control is cleared, thus leaving a blank space on the dialog which looks very odd. Will you be kind enough to help me out with either clearing the image using StretchBlt() or SetBitmap() that retains the border of the control and just clears the image alone. Awaiting your reply. Thank you in advance for your reply. |
Recent GIDBlog
Writing a book by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| need help with a console menu system | BullBuchanan | C++ Forum | 6 | 20-Aug-2006 14:46 |
| ActiveX control inside ActiveX control ? | sirnowy | MS Visual C++ / MFC Forum | 1 | 13-Jul-2006 02:31 |
| [winapi] edit control is lying to me... | ubergeek | C Programming Language | 8 | 15-May-2005 18:02 |
| Help! Some basal questions about MFC | xutingnjupt | MS Visual C++ / MFC Forum | 1 | 05-Dec-2004 03:38 |
| Detecting a mouse click outside of control | arran.s | MS Visual C++ / MFC Forum | 1 | 27-Oct-2004 06:01 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The