Background color of the whole app

Hello,

I am developing a property sheet app which creates the sheet and pages in 
the OnCreate() in the view.

It would be nice to be able to modify the colors of the app to give it a 
little more pizazz than the standard gray that MFC defaults to.

I know about handling OnCtlColor() and also calling  SetDialogBkColor() in 
the InitInstance() of the app class. The problem with these is that there is 
always the menu bar/ Tab control/etc  that remain the default color. Since 
MFC colors everything to this default color, is there a quick easy way to 
change this color... for everything? I suspect that it all must be done 
manually but if someone knows a better way I'd appreciate the info.

Thanks alot.

Bob


0
1/17/2007 3:24:37 PM
vc.mfc 33608 articles. 0 followers. Follow

9 Replies
583 Views

Similar Articles

[PageSpeed] 58

It's a lot of work to do this sort of thing.  This article might help you 
get started:

http://www.codeproject.com/library/USkin.asp

Tom

"Bob" <bsagusti@comcast.net> wrote in message 
news:u0U5LukOHHA.4484@TK2MSFTNGP02.phx.gbl...
> Hello,
>
> I am developing a property sheet app which creates the sheet and pages in 
> the OnCreate() in the view.
>
> It would be nice to be able to modify the colors of the app to give it a 
> little more pizazz than the standard gray that MFC defaults to.
>
> I know about handling OnCtlColor() and also calling  SetDialogBkColor() in 
> the InitInstance() of the app class. The problem with these is that there 
> is always the menu bar/ Tab control/etc  that remain the default color. 
> Since MFC colors everything to this default color, is there a quick easy 
> way to change this color... for everything? I suspect that it all must be 
> done manually but if someone knows a better way I'd appreciate the info.
>
> Thanks alot.
>
> Bob
>
> 

0
tserface (3861)
1/17/2007 4:03:26 PM
Thanks Tom, that's what I thought, and was worried about.
Is this tough in .Net as well?

Bob


"Tom Serface" <tserface@msn.com> wrote in message 
news:26A246CE-5401-47F8-B5AC-8BEA678EF66D@microsoft.com...
> It's a lot of work to do this sort of thing.  This article might help you 
> get started:
>
> http://www.codeproject.com/library/USkin.asp
>
> Tom
>
> "Bob" <bsagusti@comcast.net> wrote in message 
> news:u0U5LukOHHA.4484@TK2MSFTNGP02.phx.gbl...
>> Hello,
>>
>> I am developing a property sheet app which creates the sheet and pages in 
>> the OnCreate() in the view.
>>
>> It would be nice to be able to modify the colors of the app to give it a 
>> little more pizazz than the standard gray that MFC defaults to.
>>
>> I know about handling OnCtlColor() and also calling  SetDialogBkColor() 
>> in the InitInstance() of the app class. The problem with these is that 
>> there is always the menu bar/ Tab control/etc  that remain the default 
>> color. Since MFC colors everything to this default color, is there a 
>> quick easy way to change this color... for everything? I suspect that it 
>> all must be done manually but if someone knows a better way I'd 
>> appreciate the info.
>>
>> Thanks alot.
>>
>> Bob
>>
>>
> 


0
1/17/2007 4:26:06 PM
I haven't tried that in .NET, but my guess is it would be the same problem 
only there may be some tools to handle it.  I use this package with MFC 
http://www.codejock.com and they have lots of color choices to match various 
"other" applications built into the framework.  It's pricey, but there is a 
lot of stuff in it.

Tom

"Bob" <bsagusti@comcast.net> wrote in message 
news:eAx6kQlOHHA.320@TK2MSFTNGP06.phx.gbl...
> Thanks Tom, that's what I thought, and was worried about.
> Is this tough in .Net as well?
>
> Bob

0
tserface (3861)
1/17/2007 4:30:21 PM
I think code jock lets you do alot of this sort of thing with slightly less 
amount of work.

http://www.codejock.com

AliR.


"Tom Serface" <tserface@msn.com> wrote in message 
news:F12A3208-95D1-47A4-8D3E-54E8DC55C3AF@microsoft.com...
>I haven't tried that in .NET, but my guess is it would be the same problem 
>only there may be some tools to handle it.  I use this package with MFC 
>http://www.codejock.com and they have lots of color choices to match 
>various "other" applications built into the framework.  It's pricey, but 
>there is a lot of stuff in it.
>
> Tom
>
> "Bob" <bsagusti@comcast.net> wrote in message 
> news:eAx6kQlOHHA.320@TK2MSFTNGP06.phx.gbl...
>> Thanks Tom, that's what I thought, and was worried about.
>> Is this tough in .Net as well?
>>
>> Bob
> 


0
AliR3470 (3236)
1/17/2007 5:38:49 PM
> Thanks Tom, that's what I thought, and was worried about.
> Is this tough in .Net as well?

No its not. Its one line of code in .Net. Backgrouund color is a property of
the form/control in .Net thereby avoiding all the work you need in
Win32/MFC.

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





0
ajaykalra (6842)
1/17/2007 6:34:41 PM
Hi Ajay,

I think OP wants to change lots of different kinds of colors.  You can also 
change background color in many controls in MFC pretty easily, but not for 
all of the controls and NC areas although that's possible as well, just more 
work.

Tom

"Ajay Kalra" <ajaykalra@yahoo.com> wrote in message 
news:OzJuMXmOHHA.4376@TK2MSFTNGP02.phx.gbl...
>> Thanks Tom, that's what I thought, and was worried about.
>> Is this tough in .Net as well?
>
> No its not. Its one line of code in .Net. Backgrouund color is a property 
> of
> the form/control in .Net thereby avoiding all the work you need in
> Win32/MFC.
>
> --
> Ajay Kalra [MVP - VC++]
> ajaykalra@yahoo.com
>
>
>
>
> 

0
tserface (3861)
1/17/2007 6:51:32 PM
> You can also
> change background color in many controls in MFC pretty easily,

Which ones are those?  Its Nothing compared to what .Net offers. No need for
OnErasebkgnd, OnCtlColor etc. .Net is very friendly from usablitiy
perspective.

For captions, its identical to Win32/MFC but I think thats by design as they
dont want to make it easier to change caption color.

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



0
ajaykalra (6842)
1/17/2007 8:12:54 PM
OK, I can't argue with .NET having some of those features of course, however 
there are "tools" for MFC like the Xtreme Toolkit and Ultimate Toolbox where 
it's like a single line of code to change the whole look and feel so for a 
reasonable price you can always get what you want.

Tom

"Ajay Kalra" <ajaykalra@yahoo.com> wrote in message 
news:OFL9EOnOHHA.320@TK2MSFTNGP06.phx.gbl...
>> You can also
>> change background color in many controls in MFC pretty easily,
>
> Which ones are those?  Its Nothing compared to what .Net offers. No need 
> for
> OnErasebkgnd, OnCtlColor etc. .Net is very friendly from usablitiy
> perspective.
>
> For captions, its identical to Win32/MFC but I think thats by design as 
> they
> dont want to make it easier to change caption color.

0
tserface (3861)
1/17/2007 9:05:30 PM


"Tom Serface" <tserface@msn.com> wrote in message
news:EB3890A2-8988-4D2A-B2DF-1999ED109123@microsoft.com...
> OK, I can't argue with .NET having some of those features of course,
however
> there are "tools" for MFC like the Xtreme Toolkit and Ultimate Toolbox
where
> it's like a single line of code to change the whole look and feel so for a
> reasonable price you can always get what you want.

I am sure, but thats not a standard and only special people get to do it.
Then of course you get a dependency on a 3rd party which may or may not
support new compilers, esepcially since its MFC based.  I think .Net has
significant advantages over MFC in lot of ways, but it makes sense to look
at it for new apps. Existing apps have no reason to migrate unless there is
a specific reason.

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



0
ajaykalra (6842)
1/17/2007 10:50:31 PM
Reply:

Similar Artilces:

a WHITE BORDER IS LEFT WHEN i ATTEMPT A FULL COLOR BACKGROUND
Either in Word or Publisher, when applying an entire page color background, I am always left with a white border on the page. How can I get the entire page backgrond to print? Could be your printer's margin limitations Tutorial: Finding your Maximum Print Area http://ed.mvps.org/Static.aspx?=Publisher/horidiag -- Mary Sauer MSFT MVP http://office.microsoft.com/ http://msauer.mvps.org/ news://msnews.microsoft.com http://officebeta.iponet.net/en-us/publisher/FX100649111033.aspx "David Gauthier" <David Gauthier@discussions.microsoft.com> wrote in message news:D1390ACA-6...

Console app with no console window
I'm trying to replace our fairly crappy scheduler with the NT Task Scheduler to run a console app. When our scheduler runs this app, it does so with no console window and the app then closes its standard in/out handles. Our scheduler calls CreateProcess() and sets the flag parameter to DETACHED_PROCESS. The command line for the console app includes a /d switch to tell it to close its IO handles. How would I get the same behaviour when running the console app from the NT Task Scheduler? I've looked at the interface for the task object and can't see anything there that would stop t...

Colorize/Clip Art Outlook Folders
Dear Patricia, Thank you for your response. Can you imagine how great it would be to have the ability to create your folders to show an image to correspond with the contents of the folder? For ex. an accounting folder, clip art a $ sign and so on. For those of us who have many folders, it would be a perfect tool for 'at a glance' to speed up the process of finding the right folder. Color/ Clip Art Outlook Folders? <ColorClipArtOutlookFolders@discussions.microsoft.com> wrote: > Can you imagine how great it would be > to have the ability to create your folders to s...

Changing a line color when it crosses another benchmark line?
I have a chart where the average of the coporation as a whole is used as a benchmark and then from a drop down list you can select an entity you want to compare to the benchmark. I am hoping to have the line of the entity change colors (i.e. from solid black to solid red) if it exceeds the benchmark line. Is this possible? Andy Pope has an example like this on his web site: http://andypope.info/charts/conditionalline.htm - Jon ------- Jon Peltier, Microsoft Excel MVP Peltier Technical Services Tutorials and Custom Solutions http://PeltierTech.com/ _______ "JB12" <JB12...

Whole number converts to decimal
Somehow, I've changed a setting in Excel so that when I enter a number (say, 5) into any cell on a blank worksheet (thus, the cell is formatted as general) and hit enter, the number is automatically converted to .05. The only way I can stop Excel from doing this is by entering a "." after the number, so it realizes that I want the whole number. It only does it when the cell is formatted as General or Number (even when the decimal places is set to 0 -- putting in 4 will return .04 which displays as a 0). Any ideas? Nevermind, I figured it out from another post. I had the...

1 serial port 2 parity types? MFC based app needs assistance.
Hello all I am workiing in MFC on an app which has an odd requirement.. for me anyway. I have only one serial port availbale. The task is that one portion of my GUI has to send serial data out with EVEN parity. The other, a keypad, has to send serial data out with ODD parity. The reciever is always receiving ODD parity. So.. unless I am wrong.. I am thinking I have to switch to ODD parity before sending out keypad strings and tehn, when the last character is shifted out I hvae to set the port back to even parity in time to get the host's response. Anyone have any ideas? How do ...

XP Look in VC7 apps
I tried to follow the information I could read about using the new comctrl32.dll (v6) to access the XP look and feel, but it seems not to be working well. Where could I find more information on this subject? Thanks Jacques I went to Google, typed in "Microsoft XP Visual Style" and then pressed "Search". http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwxp/html/xptheming.asp "Jacques Abada" <Jacques.Abada(supprimerceci)@wanadoo.fr> wrote in message news:bn0a04$b6p$1@news-reader2.wanadoo.fr... > I tried to follow the information I ...

print only one mailing label (not whole sheet) in Publisher
I'm trying to print just one label on a sheet of mailing labels. Is there a way that I can choose which label I can print--like in Word? Not easily. I use Word for that. And if I want a fancy-schmancy label like I produce in Publisher, I use copy and paste. :-) -- JoAnn Paules MVP Microsoft [Publisher] "TeacherTerry" <TeacherTerry@discussions.microsoft.com> wrote in message news:CE966B70-B5E5-48F6-A0B7-A64962ABD895@microsoft.com... > I'm trying to print just one label on a sheet of mailing labels. Is there > a > way that I can choose which label I...

change cell colors for 2 seconds
Dear users, I have already a macro running for activecell actvated by ctrl + f. To ensure my colleagues, that the macro did its job, I would like to change the color of the cell for 1 or 2 seconds. Can anybody assists? I recorded a macro and changed the color to yellow and back to 'no fill'. But the macro is too fast - you don't see anything. Is there a possibility to define how many seconds the macro should wait between yellow and no fill? Thanks a lot for your answers. Regards, Rico Look at ontime http://www.cpearson.com/excel/ontime.htm -- HTH Bob (there's no email...

Excel VBA: Dropdown Box and Image Color Change
I have drop down boxes (with values of red, blue, and yellow) and after I select a color - I would like the drop down box color to feed into an image (T-shirt) so that is is changed the color of the shirt is changed. For my image, I am using an embedded Flash Movie. I don't know if this is capable - any creative ideas are welcome. --- Message posted from http://www.ExcelForum.com/ ...

Apply gradient to background
How can I apply a gradient to a file background to dissolve from 100% to )% trasnparancy side to side. my email is now davidroth05@charter.net Thanks! rothamd wrote: > How can I apply a gradient to a file background to > dissolve from 100% to )% trasnparancy side to side. my > email is now davidroth05@charter.net Thanks! ============================== Are you using Microsoft Publisher? Which version? -- *Notice* This is not tech support. I am only a volunteer..... Solutions that work for me may not work for you. Proceed at your own risk. John Inzer Picture...

sample client server app
cannot find equivalent control for winsock in vb2005. can someone please explain why and additionally provide a small sample to get me going. thanks jerryys On 2010-01-12, jerryys <jerryys@discussions.microsoft.com> wrote: > cannot find equivalent control for winsock in vb2005. can someone please > explain > why and additionally provide a small sample to get me going. > > thanks > > jerryys System.Net.TcpClient - I believe there are examples in the documentation. -- Tom Shelton On Jan 12, 6:46=A0am, Tom Shelton <tom_shel...@comc...

Color formatting pivot bar chart
I have a bar chart that shows the top 5 40 segments broken down by each teritory. It graphs good, but I need to color code the segments into their groups. So 1-5 may be one group, 6-13 will be another. When I color code all turn the same color. I would like to conditional format on the worksheet. Can that transfer to the chart? How do I manually make the segments change. Each territory will not have the same top 5 segments, thus using pivot to help with this task. The top 5 are from a generated report. I could bring all 40 but will still want to graph top 5. Thanks. Hi, It i...

Bubble Chart
Hi, I wish to edit the color within the plot area from point A but they only allow me to select the whole area and change. Below is an example. I wish to color the area R in red. How to do about it? I do have bubbles around the plot area but don't need to make any change to them. I just want some good advice on the plot area. Will appreciate some help here. Y axis 5 Red (Area R) 4 ____________________ 3 Yellow (Area Y) 2 ____________________ 1 _______Green (Area G)_ A B C D ...

How to Round Whole Numbers?
What is the formula for rounding whole numbers down (ie not decimals to whole numbers)? I want to round numbers like 14427 to 14420. The numbers are in a formula such as: =SUM(C6:C22)*.08 and I want to round the result to the nearest 10. Thanks for any help. =FLOOR(SUM(C6:C22)*.08 ,10) -- HTH Bob Phillips "blank" <blank@void.net> wrote in message news:428af534$0$25599$5a62ac22@per-qv1-newsreader-01.iinet.net.au... > What is the formula for rounding whole numbers down (ie not decimals to > whole numbers)? > I want to round numbers like 14427 to 14420. The num...

Palm category colors
Is it possible to sync specific categories and colors from a palm device = to=20 Entourage 2004...and vice versa? ...

Gridview Gridlines color
I have a small GridView that defaults to the gridlines being white. The problem is that I am setting my background to white. How do I set the GridLines to "#a6a6a6"? Thanks, Tom On Jan 20, 12:55=A0am, "tshad" <t...@pdsa.com> wrote: > I have a small GridView that defaults to the gridlines being white. > > The problem is that I am setting my background to white. > > How do I set the GridLines to "#a6a6a6"? > > Thanks, > > Tom Did you try to set like this BorderColor=3D"#a6a6a6" BorderStyle=3D...

How do I underline words without underlining the whole field?
I have created a database in the form view. I would like to be able to underline certain words in one of the fields without underlining everything in the field. Anyone who has some helpful advice would be greatly appreciated. In a form? I think the only approach would be to use RTF. It's possible in a report, though, with some limitations: see what Stephen Lebans has at http://www.lebans.com/mixbold-plain.htm While you're at Stephen's site, check his free RTF control at http://www.lebans.com/richtext.htm -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no e-...

How to translate text in a whole spreadsheet one language to anoth
I would like to be able to translate the text in a complete Excel spread sheet from one language to another, e.g. Italian to English using Excel 2007. There is no automated way of doing that. I am affraid you have to translate it yourself. Computers are not good at translating languages. Too many obscure rules and words that don't translate well... -- HTH... Jim Thomlinson "hmo1" wrote: > I would like to be able to translate the text in a complete Excel spread > sheet from one language to another, e.g. Italian to English using Excel 2007. Even ta...

How to Color a Cell Based on a Range of Cells with Colors
I am trying to setup a formula in one cell to look at a range of cells to see if any are filled with colors. The range of cells contain numeric values and I created a conditional format to make the cell color red or yellow. If the range of cells are colored, then I want the one cell's format to change to the same color. Can anyone help me determine a solution? What are the rules for the range cells changing color? Could you perhaps use the same rule(s) for the "one cell"? Counting cells based upon colors created by Conditional Fomatting is not very easy and r...

Colors for chart bars
Hi, in a document I want to add a bar chart. This document will is a paper and later converted to pdf. In the diagram I will have tree groups with 4 bars each. My question: which color would you take for the 4 adjacent bars? And what DPI? The diagram (figure in eps format) will be relatively small and I want that the reader can still distinguish among the bars when the paper is printed. Are there any preferred combinations of colors due to the "theory of colors"? Thank you. Chris If you're trying to get the most visually diverse colors, I would try to take colors from op...

Background picture doesn't display when taking copy off of a Word template
Hi All Sorry for the myriad of posts from me today. I am trying to fathom stuff myself, but I'm on a hot streak of doing stuff today, but at the same time hitting a few brickwalls. Basically I have created a background image and applied to my MS Word template, eg Format / Background / Fill Effects and selected my pic from in there, and when I'm editing my template I see the bg image no probs. However when I call a copy of this template via my VB6 app, all of the text appears but my background image doesn't appear. If I go back to the template the image is sti...

How to sort rows by Colors
hi there, can anybody help me out to sort the rows by Colors. like I have two colored rows Light Green and Light Yellow and some are without colors. how do i sort them that same colors come with eachother? -- Sheikh Saadi Sheikh, this is not a buit in function in excel, will be in the next version, have a look here for a way to do it http://www.cpearson.com/excel/SortByColor.htm -- Paul B Always backup your data before trying something new Please post any response to the newsgroups so others can benefit from it Feedback on answers is always appreciated! Using Excel 2002 & 2003 &qu...

How do I change the color in a graph?
I want to highlight two columns (out of about 15) by making them a different color than the other 13 columns. I have done everything and nothing seems to work. Any ideas?? Hi, To manually change the colour select the columns and then click the specific column you want to format. Once the single column is selected bring up the format dialog by either double clicking it or pressing CTRL+1. On the pattern tab change the area colour. Repeat procress for the other column. If the columns to be coloured vary with the data the have a look at Jon's explanation of how to make conditional...

App Unicode call MBCS dll
Hi!, I've got a great problem, and I don't have any idea how can I to solve it. I hope that there is a solution to solve it :-). Well. I've got an App UNICODE that call a routine in a dll MBCS: App UNICODE CString dir; bDameValorINI (dir, "Directorios", "Ejecutables", "C:\", true); Routine dll MBCS bool bDameValorINI (CString &valor, const CString &clave, const CString &variable, const CString &nombre_ficheroINI, bool obligatorio); When I try to call to that function, I can see with Debug that clave is only "D&qu...