How to change background color of a window that has been created.

I need to change the background of a window that has been created, can
you help?

0
jerryy (5)
8/12/2005 11:10:35 PM
vc.mfc 33608 articles. 0 followers. Follow

2 Replies
461 Views

Similar Articles

[PageSpeed] 14

Hello Jerry,

> I need to change the background of a window that has been created, can
> you help?
> 
Answer depends upon the type of window. Typically you can do this in OnEraseBkgnd. 
Certain controls respond to WM_CTLCOLOR and yet some other, like CButton, 
need to be owner drawn to change the color. 

If you have a generic CWnd, you can always specify the brush in the window 
class; so no special painting is needed. This is good when you know that 
the background will have one color all the time.

-- 
Ajay Kalra [MVP - VC++]
ajaykalra@yahoo.com


0
ajaykalra (6842)
8/13/2005 5:28:38 AM
Hi Ajay,

Thank you for your reply. The window I want to change background color
is from IE WebBrowser control. I used spy++ to find that its class name
is "IE Explorer_Server" and background color handle is NULL. I tried to
use SetClassLong( GCL_HBRBACKGROUND) to set BG color to black, but
still white background.

Thank you,

Jerry

0
jerryy (5)
8/13/2005 12:12:07 PM
Reply:

Similar Artilces:

Sorting by Color in Excel 2000
I want to sort text by color. I have a worksheet with some rows in black font and some in red. I need to group the rows in red font together. Is there anyway to sort by color? Thanks Hi see: http://www.cpearson.com/excel/SortByColor.htm not possible without VBA -- Regards Frank Kabel Frankfurt, Germany "Greg" <gregor1974@hotmail.com> schrieb im Newsbeitrag news:0ce901c4ac89$2be98dc0$a301280a@phx.gbl... > I want to sort text by color. I have a worksheet with > some rows in black font and some in red. I need to group > the rows in red font together. Is there anyw...

entourage and windows
Version: Older version Operating System: Mac OS X 10.4 (Tiger) Processor: Power PC Email Client: pop Hi, <br> Can I use entourage on my windows vista &amp; my husbands xp laptop's? <br> We want to have one email program and use it on all three systems. <br> We also want to be able to have a copy of emails left on our iMac regardless of which computer opened the email (depends on where we are - home or away) <br> Regards, <br> Pam Hi Pam, Entourage is a Mac-only application, meaning that it won't run on a Windows PC. As far as I know, ...

Page Formatting Preferences Seem To Have Changed
Version: 2004 Operating System: Mac OS X 10.5 (Leopard) Processor: Intel Using Word 2004 for Mac version 11.5.6 - For example, I cannot make one line align center with Georgia font and then drop a couple of lines and switch to left alignment and Arial font. Whatever change I make, whether what I am seeking to change is highlighted or not, the entire document changes. <br><br>This used to work fine so it seems like a preference must have changed but I can't figure out how to change it back. Really, really appreciate some advice! Thanks!! You have mistakenly enabled &qu...

How to create stock watch list?
How do I create a watch list of certain funds, stocks, bonds? I only have a Roth IRA retirement account created. There doesn't seem to be a watch list option. Money 2004 Small Business Brett If there isn't already an Investments to Watch account, you can create one by creating an investment account and setting the Watch Account flag in its details. If the account is there, go to Portfolio, Work with investments, Add an investment and add the investments you want to watch to the watch account. "Brett" <account@cygen.com> wrote in message news:c003b25a.0404071613.1f...

How to change pivot table source database?
How can I change the source database for a pivot table in an Excel spreadsheet. Our database server has been changed and when I create a new dsn pointing to the correct server, I get an error message indicating that the query on the old server is still trying to be used. Thanks, Steve This should work for you (?) Open the pivot table and click on it. Menu - Data/Pivot Table report. Click the Back button on the Wizard dialog that appears and connect t the new data source -- Message posted from http://www.ExcelForum.com ...

How do I generate random, non-repeating numbers that don't change?
I'm setting up a spreadsheet that tracks names and generates random, non-repeating four-digit ID#'s. Is it possible in Excel 2000? The usual way to generate non repeating random numbers is to make a complete list of the possible numbers use =RAND() in and adjacent column, then sort both columns by that auxiliary column and read of the desired number of values from the first column. Jerry bsquared0 wrote: > I'm setting up a spreadsheet that tracks names and generates random, > non-repeating four-digit ID#'s. Is it possible in Excel 2000? ...

how to change default delivery location to my new pst file
dear all. my user has outlook 2000 sp3 running on windows 2000. i have change the default delivery location to my new pst file in account manager, but it did not work, new email is delivered to old pst file. do you have any idea on resolving this issue?? Try renaming the old .pst to .old and then retry it when Outlook is opened - point it to the new .pst file. -- Milly Staples [MVP - Outlook] Post all replies to the group to keep the discussion intact. All unsolicited mail sent to my personal account will be deleted without reading. After furious head scratching, sf= asked: | dear al...

Cell text color change
I'm trying to get the text color in a cell to change (to red) if the formula in that cell produces a value above a certain ammount... Could this be done? Look at Format>Conditional Formatting -- HTH RP (remove nothere from the email address if mailing direct) "Steffen" <Steffen@discussions.microsoft.com> wrote in message news:BC53FC5B-81DD-4872-BDCF-A56B42C24159@microsoft.com... > I'm trying to get the text color in a cell to change (to red) if the formula > in that cell produces a value above a certain ammount... > > Could this be done? ...

Creating a prompt in Subject line
How do I create a prompt in the subject line of emails to remind people to enter certain lines of text. For instance many of our employees must inserst a declaration in their subject line, in line with a legal requirement such as "this email is designated as 'Restricted under........." Is there a code I could use to look to see if this text or certain 'words' have not been included and a prompt appear to remind peoplpe to do so? Many people do use the subject line but they omit this particular text - which is a requirement in our particular office for ...

Is there a way to change the effective date on EFT transmit files?
I'm trying to determine if there is a way to adjust the effective date that is located on the transmit file for EFT file transmissions. Our transmit files show the current date as the effective date for our batches. We'd like to see a day or 2 later. I believe the location of this "effective date" is between characters 70 and 75 on the 5 record (company/batch header for all entries). ...

Re: color in ERD diagram ?
Yes it did help, many thanks again. However, it would be really helpful if we could define more properties directly in the definition of the table stored in Visio, like - Fields: Yes/No appear in the diagram - Fields: Format (color, bold, etc...) Do we have any way to customize the application given with the ERD tool of Visio ? "RA" <asdf@microsoft.com> wrote in message news:402d51f1$1@news.microsoft.com... > To change the grey background, > 1. Highlight shape \ Window \ show shapesheet > 2. Find the cell "SelectMode" in Group Properties section. > 3....

Installing SBS SP1 after Windows 2003 SP2 ?
Hi, I have a Small Business Server 2003 that has had 'Windows Server 2003 Service Pack 2' installed on it but 'Windows Small Business Server 2003 Service Pack 1' has NOT been installed on it. I found this out by running Best Practices Analyzer in preparation for migrating to Small Business Server 2008. Having SBS SP1 installed is one of the 2008 pre-requisites. Are there any issues with installing SBS SP1 after Window 2003 SP2 ? Regards Michael Shouldn’t be any problem. Just follow the procedures in the following (multi-page) article: How to install ...

Change theme colors in Excel
Working in the Excel 2010 Beta version, but I think it's the same in 2007... How can I change the theme and/or standard colors? I can find the colors I want with "more colors" but I have to add to recent colors EACH time I use Excel. Any way to change default settings for the color palette? ...

How to disable triggers for changes made by specific session?
Hi, We have built an SSIS custom destination component that uses SQL Server native OLEDB provider to perform INSERT/UPDATE/DELETE on an SQL Server destination table. We want the target database trigger not to be activated for changes made through this custom component. In addition: * The triggers on the target cannot be disabled as they are needed for other users of the target. * The triggers code can't be changed to conditionally do nothing within the trigger. We couldn’t see any option in OLE DB for disabling triggers for a particular OLE DB connection or command. Is t...

Prevent functions from changing when new rows are added
I have a worksheet configured as a timesheet, where each row represents a task performed. For any given day, I track the task(s) performed and the hours spent on each task, and there are many functions in the worksheet. The worksheet contains the following columns: Column A: blank column (not used for anything). Column B: series of dates (with a blank row in between each date). Column C: tasks performed, manually entered. Column D: hours worked on the task. Column E: hours worked for the week. There's a function in each cell where, if it's Sunday, a sum of the week's...

How to resize a CTreeCtl when the dialog window is resized
Hello, Is there any documentation on how to do this? Or does anyone have any suggestions? Thanks, Linda >-----Original Message----- >Hello, > >Is there any documentation on how to do this? Or does anyone have any >suggestions? > >Thanks, >Linda > >. You can handle the message WM_SIZE of dialog to change the size of CTreeCtrl. Use message mapping. Then call the MoveWindow function to change the size: CTreeCtrl::MoveWindow(x, y, width, height) >-----Original Message----- >Hello, > >Is there any documentation on how to do this? Or does anyo...

Can't open database window using shift key...
Hi there, I have an Access database that I distribute to my client on CDROM. The start up options of the database are set so that the database window is not visible to the users. When the database is updgraded the database manager copies it from the CDROM to the relavant PC and then uses the shift key on opening in order to display the database window and link to the tables in the existing back-end. This procedure has been done many many times without a problem... BUT last week he found that holding down the shift key whilst opening the database no longer opened the database window and leave...

Changing default font for all comments
Can I change the default font for all comments in a worksheet? Hi see: http://www.contextures.com/xlcomments02.html#Default -- Regards Frank Kabel Frankfurt, Germany "abbylulu2" <abbylulu2@discussions.microsoft.com> schrieb im Newsbeitrag news:8DEB7970-21EA-45B3-98C4-209E56F315BE@microsoft.com... > Can I change the default font for all comments in a worksheet? ...

why do pictures and text change size on printing?
making birthday card , which i have done many times, but when trying to print, the pictures and text are reducing in size from 168% to 99% . what am i now doing wrong ? ...

Windows Conversion
I have an Access 2000 database which runs perfectly until i loaded it on a new machine. This machine was loaded with Windows 2000 and Access 2000 but it behaves in an odd way. When I go to a pop up form it looses track of the current record when returning to the main part of the system and it appears to do this randomly, sometimes it is OK then it all collapses! I suspect that it may be due to later updates in Windows that somehow make it not backward compatible. I have tried the database on different older machines and in Access 2002, 2003 and it is all OK there. Any suggestions p...

Title Field
Is it possible to change the column type of the 'Title' field in my SharePoint list for example, to a 'Choice' field? I don't really need a 'Title' field, but of course I need to have the 'Edit menu' option on one of the fields, and I don't want it to be a 'single line of text'. Any help would be appreciated. -- Thanks, Rob E. I wouldn't recommend messing with the title column. It's a system column and it's better to be left alone. What you can do however: 1) Hide the Title column See: http://ferraradata.co...

CImageList background
Hi, I have a CListControl list bunch of images. I set the list control's image list, like this. m_iList.Create(THUMBNAIL_WIDTH, THUMBNAIL_HEIGHT, ILC_COLOR32, 0, 1024); SetImageList(&m_iList, LVSIL_NORMAL); Then I add bitmap to my image list like this: m_iList.Replace(i, &mfcBmp, NULL); The problem is if the actual image is smaller than the image size specify when create the image list, the backgound of the space around the image is black. I want the background be white. So I used pmyImageList->SetBkColor(RGB(255, 255, 255)); But it doesn't help. How can I fix this? ...

Change default view on Service Calendar
Hi, Is there a way to change the default view on the Service Calenday. The default "type" is Resouce. I would like to change it to Faciliy/Equipment if that were possible. Any ideas on how to do this. I have searched many areas, but cannot pinpoint this. Thanks for any help in advance. Regards, Keener ...

End of range changes when I add a number
Please could someone explain why Excel 2000 changes the range in another cell when I type a number into a blank cell? I have a spreadsheet that calculates income by month, something like this: Month Income1 Income2 Income3 Cost Total Jan06 23.99 44.77 55.00 123.76 The Total cells contain a formula =SUM(B2:D2)-E2 (actually there are more income columns, but this is the principle.) I copied this Total formula in the first row, and pasted it into the other 11 rows for the other months. Originally there was no cost column. I inserted this column, and then modifi...

Font changes when pasting into another doc
I have two docs created originally in Word 2000, and I am using Office 2007. The docs are in compatibility mode. When I copy a selection that has two different fonts from one doc to the other doc, the whole selection changes to the font/style that is in the selection point. (I have a list of paragraphs, each preceded by some symbols in a proprietary font, i.e.  Your car has ...;  Try toothpaste ...;  This flower is ...; etc. Each paragraph has a line following with a series of ******** which are center aligned for looks) In trying to copy a selection from...