Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Does setting WS_EX_WINDOWEDGE actually do anything?

1,776 views
Skip to first unread message

Rob

unread,
Feb 16, 2004, 1:31:01 PM2/16/04
to
Does anyone know what the WS_EX_WINDOWEDGE extended style does? I have
tried every combination of styles and extended styles (literally) and this
one steadfastly refuses to have any effect. I am trying to create a user
control with a slightly raised edge and would rather change the window style
than draw it myself. I have seached google and MSDN but cannot find out how
to get this style to work. Anyone out there have any success with this
style?

Thanks
Robert


Tom Esh

unread,
Feb 16, 2004, 2:42:41 PM2/16/04
to

I'm not sure what WS_EX_WINDOWEDGE does either, ...except that it's
obviously not helpful here.<g>
WS_DLGFRAME, WS_EX_DLGMODALFRAME, or WS_THICKFRAME would give you a
~normal~ raised edge (like a form's). However there is no style that
produces a ~slightly~ raised edge (i.e. the opposite of
WS_EX_STATICEDGE). The most help the Api would be for that would be
the DrawEdge function.
Ex (where the scalemode is Pixels):

Dim R As RECT

R.Right = UserControl.ScaleWidth
R.Bottom = UserControl.ScaleHeight
DrawEdge UserControl.hdc, R, BDR_RAISEDINNER, BF_RECT


-Tom
MVP - Visual Basic
(please post replies to the newsgroup)

Randy Birch

unread,
Feb 16, 2004, 11:38:43 PM2/16/04
to
Well, the msdn says:

This article was previously published under Q136311
SUMMARY
The WS_EX_WINDOWEDGE style is new to Windows 95. The style specifies that a
window has a border with a raised edge. If the WS_EX_WINDOWEDGE style is
used on a window that doesn't have either the WS_THICKFRAME or WS_DLGFRAME
style, the WS_EX_WINDOWEDGE style has no effect. This is because the
WS_EX_WINDOWEDGE style modifies the window's frame. Therefore, if no frame
is specified, then the window does not receive the 3-D effect.

This problem typically occurs when you are trying to give a raised edge to a
control. Because controls by default have no frame, only a border, the
WS_EX_WINDOWEDGE style is ignored. To work around the problem, add the
WS_DLGFRAME style to the control.


In another section, it states:

Windows 95/98/Me automatically adds and removes the WS_EX_WINDOWEDGE style
for windows in all applications. For a version 3.x application, Windows
95/98/Me adds the WS_EX_WINDOWEDGE style to a window if, in version 3.1, the
window would have a dialog border or a sizable border. Windows 95/98/Me
removes the WS_EX_WINDOWEDGE style if the window's style changes so that it
would no longer have a dialog border or sizable border in version 3.1.
Windows 95/98/Me uses similar criteria for adding and removing the
WS_EX_WINDOWEDGE style for a version 4.0 or later application, except that
any window that has a title bar receives the WS_EX_WINDOWEDGE style,
regardless of the window's other border styles.

WS_EX_OVERLAPPEDWINDOW
Combines the WS_EX_CLIENTEDGE and WS_EX_WINDOWEDGE styles.


--

Randy Birch
MVP Visual Basic
http://vbnet.mvps.org/
Please respond only to the newsgroups so all can benefit.


"Tom Esh" <tjeshGi...@earthlink.net> wrote in message
news:847230183ee6gktu7...@4ax.com...

Tom Esh

unread,
Feb 17, 2004, 10:07:00 AM2/17/04
to
<g>
I think you left out the paragraph that begins "...except when a full
moon rises before sunset in which case..."

Randy Birch

unread,
Feb 17, 2004, 10:29:33 PM2/17/04
to
I didn't want to confuse the issue. <g>

--

Randy Birch
MVP Visual Basic
http://vbnet.mvps.org/
Please respond only to the newsgroups so all can benefit.


"Tom Esh" <tjeshGi...@earthlink.net> wrote in message

news:hbb430pd6nm4m50cs...@4ax.com...
: <g>

0 new messages