Make thinner border for checkbox in winapi, WTL - c++

I have the following checkbox, in visual studio I have set it's flat property to TRUE, I want to make it's rectangle border thinner. How could I do that in windows api, WTL, ATL ? C++. Is there some sort of message that I can send to the dialog in order to do this?

You can choose between control styles, e.g. flat vs. non-flat, and you can use owner drawn controls (buttons) to take over visual presentation of the control. There is no dedicated message to adjust the thickness of the box.

Related

How to create a borderless window with titlebar in windows c++

I am trying to create a Direct3D app that is operating in windowed mode with a title bar and minimize/quit button. However, I'd really like to be able to axe the border around the window.
I am looking to do this because it looks pretty cheesy on dual monitors when the app is filling the primary monitor horizontally (with room to move the app vertically), but its window border overflows onto the secondary screen. I've tried a bunch of combinations of setwindowlong with GWL_STYLE and GWL_EXSTYLE, but can't seem to make headway unless I disable the title bar.
I've seen a bunch of apps that are borderless however they seem to emulate the title bar rather than using the built in one provided by Microsoft.
Thanks for any suggestions.
You can't remove the border and keep the titlebar AFAIK.
You can reimplement the titlebar by using WM_NCHITTEST but you still need to draw it yourself which would not be a bad idea if you want your D3D app to look its best.
Visual Studio, last time I checked, achieves its border with transparent layered windows standing behind the primary one. They are the shadows you see.

Create borders around controls in MFC Form

I have an MFC form, basic stuff, a few group boxes, a few text boxes, some buttons, and a list box. What I'd like to do is add a border around all of it, preferably without a group box. Like, drawing lines along the right areas. I was told this is bad to do on a dialog though. What would I need to go about doing something like that?
I am currently using MFC C++ with Visual Studio 2008.
The easiest way is to add a Picture control to the dialog and set the style to have a border only. If the control has a width or height of 0 you can get a single line. Doing it in the dialog editor will only give you positioning down to the dialog unit, if you need pixel level control you'll have to create or reposition it in OnInitDialog.

C++ WinAPI - How to make button appear pressed?

I have in my editor few editing modes. I can choose specific mode using buttons that are placed on a toolbar. I want to indicate which mode is currently on. When I press appropriate button - I want to make the clicked button remain pushed. How do I do that in WinAPI? My toolbar uses bitmaps for icons if that's relevant.
There used to be a way to get something like the look and feel of a toolbar by using a normal check box with the BS_PUSHLIKE style set. But that got broken a bit with Windows XP because of mouse hover effects, so it's not widely used any more.
If you want to create your own toolbar, without the help of MFC, there is an MSDN article that covers the creation and management of a toolbar window (actually a dedicated window class as part of the Common Controls Library).

Windows Mobile (MFC). CListView with buttons instead of usual strings?

i have no idea how to realize this feature.
My temporary solution is to place a fixed number of visible CBitmapButton and a scrollbar. Then I handle the scrollbar position changing and choose the appropriate appearance of the placed buttons.
With normal (not Mobile) MFC, the answer would be to put the CListView into Icon mode (LVS_ICON), and use an CImageList with the bitmaps. This offers 32x32 icons, and there is also a LVS_SMALLICON mode for 16x16 icons. These options may also be available for Mobile.

Styles of buttons on win32 C++

i know there are some styles you can put on a button in C++ win32 exa. like BS_DEFPUSHBUTTON BS_RADIOBUTTON but i do not know all of them and also how would i go about making a user drawn button
You can find the reference of all button styles on MSDN (as usual). And an overview of the Button control in general.
To create an owner drawn button, you need to specify the BS_OWNERDRAW flag and pocess the WM_DRAWITEM notification in the button parent window.
And if you only want to tweak the button drawing algorithm, you should look at the DrawThemeBackground API - that allows you to draw the button using the same visuals that the standard Windows Theme engine uses.
You do need to be careful to handle the case when theming is disabled (when OpenTheme fails) however - in that case you're on your own unfortunately.