TVS_EX_FADEINOUTEXPANDOS has no effect in a tree view - winapi

The TVS_EX_FADEINOUTEXPANDOS extended style does not seem to have any effect on my tree view.
The documentation says:
Fade expando buttons in or out when the mouse moves away or into a state of hovering over the control.
I set the style like this:
SetWindowTheme(hTreeCtrl, L"Explorer", NULL) ;
TreeView_SetExtendedStyle(hTreeCtrl,
TVS_EX_FADEINOUTEXPANDOS, TVS_EX_FADEINOUTEXPANDOS);
I'm on Windows 10 and the application is manifested to use visual styles.
Am I doing something wrong?

Related

Disable clipping for NSTextView to blend behind a visual effect view

Here is the layout of my view:
The blue bit is an NSTextView, and the gray bit is an NSVisualEffectView. The visual effect view is set to blend with whatever's behind that view within the window. I want the text view to be able to scroll behind the visual effect view so that it blends with the status label and the button. I have tried the following:
In the storyboard, just make the text view go behind the visual effect view. However, the text on the very bottom will just get covered up as the text view won't know that the visual effect view is there and just stops scrolling under it.
From this question, I tried overriding wantsDefaultClipping, alignmentRectInsets as well as using CALayer's maskToBounds property on the text view's enclosing scroll view. But all of those doesn't work either.
Did I do something wrong here? What else should I do to make either of the 2 options work?
Thanks

Expanding visible page area in Expression Blend

I am using Expression Blend for Windows Phone development. If I insert a layout (grid, stackpanel..) that expands LayoutRoot I cannot see the controls beyond the border. Is there any way to overcome this?
If you look at your PhoneApplicationPage XAML, you should see in the first tag:
d:DesignWidth="480"
and
d:DesignHeight="800"
You can manipulate these to extend the design surface to something that lest you see everything. This will have no effect on the runtime version of the page.
Click on your top level control in the Objects and Timeline panel. Now you should be able to drag the sides/corners to shrink and expand the control's area. This affects just the size of your control on the design surface, not the runtime size (assuming you've set width and height to Auto).

Weird black pixels in the corners of CProgressCtrl controls

I have an MFC dialog (actual a dialog bar with in a dialog) that contains a progress bar with these strange black pixels in the corner. I have tried the following to remove them:
Change most of the border type styles and the transparent style of the control.
Override the OnEraseBkgnd in a class derived a CProgressCtrl.
Setting the background color of the control by PBM_SETBKCOLOR.
I have yet to find a way to remove these black pixel.
Here is an example of what it looks like:
It seems I have found the issue. When the progress bar performs its painting it was sending an WM_ERASEBKGND message to the dialog to get the background with which it would paint. Some how the DC brush origin was being messed up. Using the following code at the start of the function seems to have fixed the issue with no ill effects.
CRect rcClip;
pDC->GetClipBox(rcClip);
pDC->SetBrushOrg(-rcClip.left, -rcClip.top);
I've seen this occur when using ActiveX controls inside control containers that don't have a a window or proper Device Contexts (The VB6 frame control is one of these) but I'm not sure if the same problem applies to MFC windows and controls though.
Try making the control parent a normal static window.

How to see controls which are below the bottom of screen in designer

I have a StackPanel in ScrollViewer with many TextBlock+TextBox (so on the screen I see same scrolling list view like in phone's standard Settings page).
In VS's or Blend's designer is it any simple way to see controls which are bellow the bottom of screen? (I need some kind of scrolling in designer). It must be something simple. Now I am switching off visibility of upper controls to see lower controls and it is boring.
Change the d:DesignHeight to a larger value, such as 2000 (the maximum height), and Expression Blend will allow you to see content that otherwise would require scrolling.
Example screenshot

How to resize controls to fit the browser window in C#, Silverlight 4

I have a tab control in my main page. When I have it in the Design view in Visual Studio, everything looks perfect, the tab control is set to fill the entire page. However when I run the program, and I have it in a maximized browser window, the tab control is still the same size as it originally was. In other words, the tab control does not resize proportionally to the browser window resize.
So I was wondering if there was a way to change a setting on my tab control or maybe some code that would force the tab control to resize along with the browser window?
(Using C#, Silverlight 4.0 in VS2010)
Ok, so after tinkering with this for the last couple days, I've finally found the answer. I feel like a rookie for not doing this sooner, but I got to looking at the title bar on the top of the page and noticed that it stretched across the screen when the browser window was maximized and when it was resized, the title bar shrunk to fit. So I looked at the properties of the title bar and saw that it's horizontal/vertical alignment was set to "stretch." I know, it's a rookie mistake, but it just never occurred to me that "stretch" was an option in the alignment property.
Long story short, change the horizontal alignment property to "stretch," vertical alignment property to "stretch," and then set the height property of the control to "auto" and the width property to "auto" and you've got yourself an auto-resized control.

Resources