CMFCTabCtrl color customising - colors

Is there the way to change the line and background colors of CMFCBaseTabCtrl?
I can change tabs color via SetTabBkColor(...) or SetAutoColors(...) but control's header and lines remain grey.
SetSysColors(...) is not an option because it changes colors globally for entire OS.
Basically we need to apply some lite/dark color scheme. I can not find the way to change tab control background and line colors. When the tab background color is set by SetTabBkColor(...) it leaves the space near the tab border.
Also its expected that SetActiveTabColor(...) will change the background of the active tab but it does pretty nothing.
And there is no way to change the text color of the active tab. I belive this stuff is customisable but can not find how.

The colors are retrieved from the current instance of the CMFCVisualManager.
CMFCVisualManager::GetTabFrameColors is used. And some other manager functions like OnEraseTabsFrame and OnEraseTabsArea.
So derive your own visual manager from the one you prefer. Overwrite the specific functions and so you can change the colors and behavior.
There is no other way. Just lok into the source code in void CMFCTabCtrl::OnDraw(CDC* pDC)
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\atlmfc\src\mfc\afxtabctrl.cpp

Related

Is there any way to set background color of lines in GoLand (JetBrains IDE)?

Is there any way to set the background color for certain lines in GoLand (JetBrains IDE) so I can sign what code I have read?
Is it possible to do this? Does not matter if it's an IDE function or via some plugin.
There are a few ways to mark some lines and add them to the "Reading" list:
Bookmarks. It is built-in functionality in IntelliJ-based IDEs. You can go to the line with Authenticator interface declaration and select Edit | Bookmarks | Toggle Bookmark in the main menu. All bookmarks are available in View | Tool Windows | Bookmarks.
3rd-party plugins. I'm aware of MultiHighlight plugin that supports selection of the piece of code.
Sticky selection can do that trick.
there is the brief intro about it:
you can mark a selection to be permanently highlighted, even when your caret moves away. Inspired by "Style token" of Notepad++.
You can define an arbitrary number of Paint Groups. Selecting the appropriate editor action (keystroke or context menu), the all occurrences of currently selected text will be added to the Paint Group and will be permanently highlighted (until you clear the selection with an other editor action). So you can have different text fragments to be selected with the same Paint Group. The Paint Groups are kept when IntelliJ is closed.
You can set different colours for each Paint Group
You can set a marker to be visible on the right side of the editor
You can add multiple selections to the same group
You can convert a Paint Group to multi caret selection (and thus edit, copy, delete, etc. it)
For convenience you can undo the last addition (until the document is edited)
You can cycle through each element in a given Paint Group or in all Paint Groups
Keymap actions are added dynamically for paint, clear and convert as you add more Paint Group

Changing Android Studio tab color for Unit Tests

I am aware that is possible to change the tab colors in Android Studio, but I would like to know if anybody has found a way to change the tab colors for Unit Tests.
As you probably know, the Tabs for Unit Tests have a distinct color (greenish if you use the defaults I think); this is true for Android projects (not sure about others).
In settings, it's possible to alter Both the foreground, background, and underline of active and inactive tabs, but I found no mention of "tests". Am I missing a setting?
Turns out I was really missing a setting. They are located in a different place: Appearance & Behavior -> File Colors.
This same color is used when you search within a project, so use with care. Also this only affects the background of the text, so it must play nice with the tab colors you set in your normal tabs.

How to recover color palette in Sublime Text 3

Something strange happened to me recently. I was testing the color schemes of Sublime Text 3 by selecting them from the menu Sublime Text > Preferences > Color Scheme. I did not find any that I liked more than my current one, but then I realized that the one I was using was not among the color schemes listed. Unfortunately I do not remember the name of the color scheme I was using.
By searching for popular color schemes online, I found one that is close: "Afterglow-twilight". However, the scheme I was using had much higher contrast, i.e. darker background and more vivid code highlight colors.
Is there a way in Sublime Text 3 to recover the color scheme I was using?
The color scheme that you're using is set as the color_scheme setting in your user preferences and the menu item Preferences > Color Scheme (which is under Sublime Text if you're on MacOS) allows you to more easily set that preference by showing you a list of all all most available color schemes along with letting you preview what they look like.
The short answer to your question is No, but the longer answer to your question is Yes.
The No is because unless you have your Preferences.sublime-settings file backed up somewhere (say if you use Dropbox to sync it) or under version control of some sort, then the value of the setting is gone now and the only way to get it back is to figure out what color scheme you were using so that you can reset it.
The Yes is because Sublime will only allow you to use color schemes that you have installed locally, and using the menu item outlined above allows you to pick between those you have installed (changing the setting as appropriate) but it doesn't remove any installed color schemes.
That means that unless you uninstalled a package in between when you were playing and noticed that your color scheme is no longer listed, that color scheme is still present even if the list isn't displaying it (and if you did uninstall a package, re-installing the package will bring it back). So all you need to do is figure out what it was.
There's a strikethrough in the first paragraph because Sublime hides some color schemes from you, so if you were using one of those it won't appear in the list and you need other means to find it.
The first thing to try is to add the following setting to your user settings (if it's not already there) to tell Sublime that legacy color schemes should also be listed:
"show_legacy_color_schemes": true,
Around the time the menu item for changing color schemes was added to the interface, some of the color schemes that used to ship with Sublime were relegated to Legacy status because they were wildly out of date and either not popular enough to warrant work to update them or impossible to fix without making visual changes.
Those color schemes are still present, but they're masked from the list of displayed color schemes unless you turn that setting on. So, in the case that you happened to be using one of those previously, this setting should let you find it again. Syntaxes that fall into this category will say Color Scheme - Legacy under them in the list.
If that doesn't turn up the color scheme that you were using, there is one last avenue of exploration. Sublime supports the idea of a hidden color scheme, which is generally something used by packages to give color schemes to things without more generally exposing them. Possibly there is a Theme out there for Sublime that distributes it's color schemes this way as well.
If you open the Sublime console with View > Show Console, you can enter the following lines one at a time into the input at the bottom of the window:
sublime.find_resources("*.hidden-tmTheme")
sublime.find_resources("*.hidden-color-scheme")
This will get Sublime to show you a list of all of the hidden color schemes (there are two different formats). Assuming either list is not empty, the items in the list represent hidden color schemes that the command mentioned above doesn't display.
If so, you can open your user preferences and manually set the color_scheme setting to each of the items in turn to see if one of them is the one you're looking for.

change background colour of notepad++ editor

I knew that colour can be set through
Settings->Style Configurator
but when the line that I am editing has a different font and background colour which I don't know how to set.
Also when I am selecting an block of code, I can't control the colour of the selection.
Basically I just want to set the editor to have the same color as the typical console, green on black background (which is friendly to eyes, not straining).
Is it possible to customise the color in the notepad++ editor ?
Or anyone knows of an editor that can meet this requirement ?
Thanks
For me it works fine to do the following:
Go to "Settings" Menu and choose "Style Configurator".
There you choose "Global Styles" (language list) and "Default Style" (style list) and set the colors you want.
You can also try to use the "Global override" style and check the different checkboxes.
In Notepad++ there is quick option without change color setting. In Notepad++ have many themes with different color option.
Notepad++ has many themes which you can select in a dropdown box in the Style Configurator window. Many of these themes (e.g. Bespin, Black board, Twilight) have dark background and different colors for different kinds of text for programming languages.
After Click “Save & Close” Button then Background and Font Color will change, like in the below image.
more information click here

RichEdit, How to set the background color of one single line

I have a TRichEdit control containing source code. I want to set the background color of a single line.
I know how to set the text color, but isn't there a way to set the background color as well? I'm not talking about the entire background colour for the whole control, only how to change one single line.
Do I really have to write a custom control to do this?
There is no TRichEdit property for setting the background color of individual characters/lines. However, you can use the Win32 API SendMessage() function, or the TRichEdit's own Perform() method, to send it an EM_SETCHARFORMAT message, specifying a CHARFORMAT2 structure whose crBackColor field is set to the desired color. You can apply formatting to existing characters by highlighting them first, or you can apply formatting to the current caret position if there is no selection.
The MSDN on RTF specifies \cbN, where N is the color index.
Other searches suggest this is not supported by a lot of applications (OS X's native RTF viewer, Microsoft Word) so maybe you should look for a custom solution.

Resources