problem with clearing image in a CStatic control

Hi,

I'm working on a code to load a preview image. I'm able to load the
image in the control but unable to clear it.

I'm developing something like an Open file dialog where in if I click
a file I should see the preview of the file. Once I double click on a
subfolder, it should show me the contents of the subfolder and reset
the image in the Static control.

Now I'm able to load my Bitmap using CStatic::SetBitmap(hBitmap). But
once I click on a folder I should reset it to nothing and I dont know
how to do that.

Thank you.
Rajesh.
0
rajesh79 (4)
5/6/2004 6:23:00 PM
vc.mfc 33608 articles. 0 followers. Follow

1 Replies
461 Views

Similar Articles

[PageSpeed] 35

How about setting it to a bitmap that is 1x1 pixel and the pixel color (you can SetPixel
to set it) is the backgournd color you want for a blank window (e.g.,
::GetSysColor(COLOR_WINDOW))
				joe

On 6 May 2004 11:23:00 -0700, rajesh79@hotmail.com (Rajesh) wrote:

>Hi,
>
>I'm working on a code to load a preview image. I'm able to load the
>image in the control but unable to clear it.
>
>I'm developing something like an Open file dialog where in if I click
>a file I should see the preview of the file. Once I double click on a
>subfolder, it should show me the contents of the subfolder and reset
>the image in the Static control.
>
>Now I'm able to load my Bitmap using CStatic::SetBitmap(hBitmap). But
>once I click on a folder I should reset it to nothing and I dont know
>how to do that.
>
>Thank you.
>Rajesh.

Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
0
newcomer (15974)
5/6/2004 9:23:07 PM
Reply:

Similar Artilces:

Exchange 2k Journaling Problem
The company I work for is going to be moving locations in the next couple of months and, due to the move and several other factors, our email server will be down for a couple of days. As a stop gap measure, we have contracted with a 3rd party, Front Bridge AMC, to handle the email for us during that time period. The Front Bridge AMC maintains 30 days worth of email for each user and allows web access to their email, similiar to OWA. Email that arrives from an external source (hotmail for example) destined for the company I work for is captured, as is internal email destined for outsi...

Problem with connecting automatically
I have a little problem with my Outlook. When I start the program it doesn't connect automatically anymore, I have to wait for about a minute. I've tried to change the setting in Tools>Option (General tab/Send recieve mail) but with no luck. ...

Active Directory problems/dcdiag
I have some problems when i do dcdiag. In the directory service I have a lot of Event IDs 1865, 1311, 1312. I tried a lot of articles on the MS Websites, but still can't figure out how to resolve the problem. We have two locations connected over the internet with two VPN servers. One of the sites has a slow 5MB DSL connection. Also notice the Time service error at the end. Any help is appreciated. Domain Controller Diagnosis Performing initial setup: Done gathering initial info. Doing initial required tests Testing server: Location1\MyServer1 Starting test: Connecti...

MSCRM 3.0 importing Chinese character problem
Hi, I use MSCRM 3.0, when importing, found the original Chinese character be changed to odd code, how can I solve this problem? ...

New to Access 2007
Hi, I am new to Access 2007 and having trouble working with a 2003(?) MDB. I opened it with the Shift Key down and I can see the tables, forms, etc. But when I select a form, I can only open it; the option to Design the form is greyed out and the entire Forms tab in the Ribbon is greyed out too. Help! Thanks much, Glenn "Glenn H" <glenn@pivotal-z.com> wrote in message news:1187024333.492672.70330@q4g2000prc.googlegroups.com... > Hi, I am new to Access 2007 and having trouble working with a 2003(?) > MDB. I opened it with the Shift Key down and I can see the tabl...

Import Problems in Feb 2010
I am using Money 2006, I have 4 accounts that I import transactions to. Two regulary banking accounts work fine. Two credit accounts will no longer import transactions. Actually they import and the account shows there are items to review but the transactions are not visible in the account. I tried deleting the account and re-importing jan/feb but after importing jan, the feb items import ok and 19 items are listed for review but none of them are visible again. I tried deleting again and just imported Feb. A few items came in but not everything and then I could not import J...

Pivot table chart problem, How to show different subtotal levels
Hi, Using Excel 2003, I have a pivot table using external data via ODBC. I have a chart based on my pivot table. The table and chart are working correctly. The PTcontains two levels of sales subtotals 1st level is by county 2nd level is by state. My client is telling me that the data in the chart is too detailed. He wants to have the both levels of subtotals in the PT, but only the county subtotals in the chart. If I delete the county sales subtotals from the chart, they are also deleted from the PT. Is it possible for the chart to be based on the PT and not show ...

Changing password problem
my users are not able to change their outlook passwords from their computers. I am running Exchange 2000, the clients are running Outlook 2000 and XP, on Windows NT/2000/and XP. Any ideas Eric Are your clients use exchange version of outlook or POP version of outlook? "Eric Graham" <egraham22@yahoo.com> wrote in message news:#Nl0C$$nEHA.800@TK2MSFTNGP14.phx.gbl... > my users are not able to change their outlook passwords from their > computers. I am running Exchange 2000, the clients are running Outlook 2000 > and XP, on Windows NT/2000/and XP. Any ideas >...

Upload of file containing images hyperlinked to web page. #2
Hi there. I am using Publisher 2003 with internet explorer using XP SP3. I have prepared my web page and I have kept the images that are hyperlinked to the page in a separate foler from the publication file (which I have not yet published to a web site format). I already know that the FTP protocol from my host does not work and I have to load the files one at a time. I create the directory and within that directory I upload my individual files. My question is: Almost all of the pictures are linked to larger pictures or descriptions. During the creation of the web site I have kept...

Cell Formating Problems
This is what I do: I open up a brand new worksheet. I format cell A1 to text. Then I enter the number 1 into it. Then I format the cell to Numeric and the 1 in the cell does not change. it stays as (left justified 1. If I delete the 1 and type a 1 into that cell and hit Enter, it become 1.00 (a number). Whats happening here??? Why doesn't it convert the 1 to a 1.00 when format the cell to numeric? Why do I have to re-enter the number -- Message posted from http://www.ExcelForum.com brain It was originally entered as Text. Simply re-formatting doesn't change its underlying ...

Unbound Controls
Can I store a field that I calculate in a report in a table. More or less what I want to do is take a stored value on a report and put into a field in one of my tables. Is this possible? On Wed, 12 Dec 2007 13:25:00 -0800, Calvin wrote: > Can I store a field that I calculate in a report in a table. More or less > what I want to do is take a stored value on a report and put into a field in > one of my tables. Is this possible? You have asked a very wide open generic question. Why not take the time to be more specific as to what you wish to do. And why. Did you wish to Update an ...

Reply Problem #2
Can anyone tell me why when you REPLY to any email message, a number "7319" or equivalent appears in the "To" field? This just started happening to some systems with fresh installs of Office 2003/Windows XP. Thank you in advace... ...

Outlook 2003 Time problems
Hello, There are various emails that I receive that aren't getting the time marked correctly in Outlook even though my system time clock is set correctly. I check the time of the emails and there 1 hour behind. Any solutions? Is daylight savings time configured correctly? Also verify that this is set correctly for both the sender and the mail server. -- Robert Sparnaaij [MVP-Outlook] www.howto-outlook.com Tips of the month: -Backup and Restore -Create an Office XP CD slipstreamed with Service Pack 3 ----- "Jessem" <anonymous@discussions.microsoft.com> wrote in ...

Serious Word Problem
Today my WORD 2007 suddenly refuses to recognize and open either doc or docx formatted files. With doc files I get the error message converter cannot open the document and it talks about converter file mswrd632.wpc needing to be removed and reinstalled. As for docx it says word can't read the information in the file. I am suspicious because of the large number of recent microsoft updates. Can anyone help with this? Hi, Many users are encountering this problem. See the "Known Issues" section of http://support.microsoft.com/kb/973904 . -- Hope this helps, Pes...

Problems in viewing Report
Hi we have installed the SQL and CRM in 2 different servers, running on win 2003. I face a problem when viewing reports as it keeps popping up dialog box for username and password which when not given gives a "page cannot be displayed" error. can anybody let me know why the logon request for report section is prompted. I tried to fiddle around with report section datasource, by selecting various options and it works only when a AD user is given in the credential section, since the user's password is prone for expiry, it will be risky to give that option. This is because i...

Date in an Edit Control
Hi i would like to enter a Date value into an edit box To get very spcific... i have an edit box when selected ,the user must be able to just select the date he requires such as 11 02 04 ,.....only the numbers are required and this has to be stored into a fil See this link http://www.codeproject.com/editctrl/datetimedit.asp "NoviceJohn" <anonymous@discussions.microsoft.com> wrote in message news:602F22CD-C213-4F15-B007-39DA6A459BC9@microsoft.com... > Hi i would like to enter a Date value into an edit box. > > To get very spcific.... > i have an edit box when...

Very strange laptop battery problem?
my laptop is a HP CG60-243CL and its about 7 months old. Whenever i would put my battery charger into my laptop it says "plugged in, not charging" this is when it's on. Most particularly it has a blinking LED light on the charging icon (Lightning bolt icon). However, when i charge it when it's put on shutdown/sleep/hibernate the LED light (The lightning bolt icon) has a solid white light. So therefore it is charging. Does anyone know the reason why my laptop is acting this way? -- gamobigz -----------------------------------------------------------------------...

Win2008 R2 Hyper V problem
Hi, I have virtualised a win2003 server that has SQL server 2000 running on it. The parent OS, WIn2008R2, blows up intermittently with a BSOD when the VM is running. I have removed the empty SCSI device from the VM as I read that can cause the problem but it still blows up. Is there any chance that Hyper V can be made to run reliably or am I just wasting my time? Thanks Bob bob wrote: > Hi, > I have virtualised a win2003 server that has SQL server 2000 running > on it. > > The parent OS, WIn2008R2, blows up intermittently with a BSOD when > the...

Exchange Server Problem (I need help)
Hello to you all! The medical clinic I work at has a network. We all have our own email address. Mine, for example is lpeacock@elcardiologist.com. The problem is this. I can send out email as much as I want and they go where I need them to go. However, when anyone attempts to send any of us email, to our work, we don't get them. Now we had experianced some MAJOR problems recently in the past to where the actual IT lady had to set everything back up because things just went down. So our email accounts worked without any problems. But now, we can't recieve anything from an...

problems with tabs
after installing service pack one for Office XP I lost all my tabs in a previous publication. I put them back in and the next time I opened it, they were missing again. The tabs stops are there, just not the tabs only a few spaces. Appears to be a problem with no resolve. -- Hi Wilma (wfreshwater@jam.rr.com) in the Microsoft� newsgroups you posted: || after installing service pack one for Office XP || I lost all my tabs in a previous publication. I put them || back in and the next time I opened it, they were missing || again. The tabs stops are there, just not the tabs only a || few ...

Lookup Problem #2
Hello, I use this formula to sum numbers. I am trying to use the same formul to return text. What do I have to replace sum with? {=SUM(IF(A2>=Sheet2!$E$1:$E$51,IF(Sheet1!A2<=Sheet2!$F$1:$F$51,Sheet2!$G$1:$G$51,0)))} Thanks Gre -- Message posted from http://www.ExcelForum.com Hi thre's no such build-in function. How do you want to 'Sum' text values?. -- Regards Frank Kabel Frankfurt, Germany "Gbonda >" <<Gbonda.19r3p8@excelforum-nospam.com> schrieb im Newsbeitrag news:Gbonda.19r3p8@excelforum-nospam.com... > Hello, > > I use this form...

Search/Lookup Problem
Hi, I have a large list of invoice numbers, for which there can be more than 1 set of data, and I have no other value that could be used as a lookup value etc. Given something like: Col A Col B Row 1 123354 20 Row 2 114868 1235 Row 3 123354 400 Row 4 123354 546 Row 5 194583 2 How could I get separate sheet to lookup the invoice numbers in Col A, then return the respective Col B value, without returning the same number twice, eg 123354 20 123354 400 123354 546 114868 1235 194583 2 Any help would be greatfully received. Cheers Simon "Si...

Embedded images not printing in reports
I have built several reports in Visual Studio and when I preview them there, the graphic (our logo in this case) displays fine. But when I pull them into CRM 4.0, and the graphics show a red "x" as though they aren't there. Do I need to do anything different other than embed them? Anyone else have this problem that can enlighten me as to a solution? Thanks! Andy. ...

Problems sending email #2
Ok I can't quite figure out what the problem is with why I can't send emails. If I do a test email through the email account setup it goes through fine. When I send an email this is the error message that comes up. Your message did not reach some or all of the intended recipients. Subject: test email Sent: 2/3/2007 3:57 PM The following recipient(s) could not be reached: 'djc122984@aol.com' on 2/3/2007 3:57 PM 553 Sorry, that domain isn't in my list of allowed rcpthosts. It does this no matter what email address I send a message to. I...

There is a problem with this website's security certificate
Hi All, This morning I woke up to a problem with my SBS 2008 SSL certificate for the remote company website. When we visit the https://remote.company.com/remote page, we get the following error message: There is a problem with this website's security certificate. Blah blah blah... In short, I reissued, rekeyed, revoked, and created a new SSL certificate at Godaddy...but regardless, I still get the same error message. Is this a problem with IIS? Any insight would be greatly appreciated. Thanks. Ringo A bit more info would be good. As... just wondering, but wha...