Dialog Box Shadow
Is there any way to get a shadow drawn under a dialog box with no frame. Prior to Vista I used a thin frame, which gives a shadow, but under Vista the thin frame is thick and allows selection and dialog box movement, thus I now have to use no border to get a non-moveable dialog box.
[284 byte] By [
delder] at [2008-1-28]
As far as I'm aware, dialog boxes never had a shadow, regardless of frame thickness, so I don't see how you were getting this on Windows XP either. (And frame thickness has nothing to do with moveable/non-moveable as far as I can tell.) You can register a custom dialog class with the CS_DROPSHADOW style and use that instead.
Raymond,
I never said I was getting a shadow under XP.
I'm pretty sure I'm not imagining the shadows under dialogs on build 5231 of Vista.
The point of my question is this:
With an existing resource file that has a dialog with a thin frame chosen and no caption, under XP when it is displayed it cannot be moved. It's frame is a single pixel.
Under Vista 5231, this same dialog is displayed with no caption, but has a thick frame and can be moved when the upper border is selected and moved.
So, is this a bug in Vista? Should a formally single pixel width frame now be displayed as a thick frame? If I want a single pixel width frame in Vista, what goes in the resource for the dialog box?
Oh sorry I was confusing shadow (which did exist in Windows XP with menus) with glass (new for Windows Vista). I don't know anything about glass.
Raymond,
Any idea where I might post to get this question answered?
I think you're in the right place. Just have to wait for somebody with subject matter expertise to chime in.
No Delder, there is no way, nor are there any plans to support shadows on windows with no frames, or those with custom frames. This refers to the new shadow in Vista, as you can still do CS_DROPSHADOW on any window class.
Thanks, the CS_DROPSHADOW seems to work okay. What prompted my original question was the appearance of a thick, shadowed frame on dialogs designated as thin frame.
When thin frames are selected for dialogs under Vista will they now be movable and shadowed - or is this a bug?
They were not moveable in prior versions of Windows, and this problem first appeared in build 5219.
In XP, the default window frame size when it is "fixed single" is 1 px. it can be changed to be bigger in XP by going to Display Properties > Appearance > Advanced and choosing one of the window options (I dont remmeber off hand, sorry)
In Vista it is set to be bigger so Glass will show up better. It can be changed back to normal easily :)
Changing the Active Window Border width does not have any effect on thin frame dialogs in XP. They remain a single pixel.
The problem your change causes is that by altering the definition of what a "Thin Frame" is you can now move dialogs that before could not be moved, since your thicker frame allows the formally fixed dialog to be moved by simply clicking and dragging in the non-client area at the top of the dialog.
So my question remains. Is this a permanent change to Vista or a bug that needs to be fixed?
Delder, I will have an answer for you on this in a couple of days.