Custom window's Style 
Author Message
 Custom window's Style

Hi:
    I want to custom myself window's style,it use for any window.How to let
it don't conflict with window statndat'style?
for message ,I may use WM_USER+XXXX,how to do it?
thanks!


Sun, 11 Jul 2004 09:56:07 GMT  
 Custom window's Style

Quote:

> Hi:
>     I want to custom myself window's style,it use for any window.How to let
> it don't conflict with window statndat'style?
> for message ,I may use WM_USER+XXXX,how to do it?
> thanks!

If it's entirely your WNDCLASS, then I'm pretty sure you can use the LOWORD of the DWORD dwStyle.

Jeff...
--
Please post all follow-ups to the newsgroup only.



Sun, 11 Jul 2004 11:21:42 GMT  
 Custom window's Style
Unfortunately, Microsoft was not so kind as to reserve any style bits for us.
All of the regular style bits are used, and most of the extended style bits, as
well.  There are a few extended style bits not used YET.  It is not recommended
that you use any of the remaining ones, as MS may find use for them within the
next few years.  However, to my knowledge, 0x01000000, 0x02000000, 0x04000000,
0x10000000, 0x20000000, 0x40000000, and 0x80000000 are not yet in use.

Instead of using a style bit, I would recommend you find a way to use the
GWL_USERDATA.  You can get and set this value using GetWindowLong and
SetWindowLong.  Or, depending on how you would have used the style bit, there
are probably a few other ways to accomplish what you need.



Sun, 11 Jul 2004 11:37:31 GMT  
 Custom window's Style
Hi !
WM_USER+XXXX is custom message not style
You can use  WNDCLASS ( as Jeff wrote ) look at cbClsExtra and cbWndExtra
for your custom data
HTH
Arkady


Quote:
> Hi:
>     I want to custom myself window's style,it use for any window.How to
let
> it don't conflict with window statndat'style?
> for message ,I may use WM_USER+XXXX,how to do it?
> thanks!



Sun, 11 Jul 2004 16:17:04 GMT  
 Custom window's Style
Just in case I've been unclear, I was talking about the CreateWindow DWORD dwStyle parameter style
bits.
Quote:

> Hi !
> WM_USER+XXXX is custom message not style
> You can use  WNDCLASS ( as Jeff wrote ) look at cbClsExtra and cbWndExtra
> for your custom data
> HTH
> Arkady



> > Hi:
> >     I want to custom myself window's style,it use for any window.How to
> let
> > it don't conflict with window statndat'style?
> > for message ,I may use WM_USER+XXXX,how to do it?
> > thanks!



Sun, 11 Jul 2004 16:54:01 GMT  
 Custom window's Style
But how to  ensure that my costum style don't conflict with window
statndat'style?for example ,I want add a style 'WS_FLATBUTTON' for
BUTTON,how to ensure it don't confilict with button statndat's style ?


Quote:
> Just in case I've been unclear, I was talking about the CreateWindow DWORD

dwStyle parameter style
Quote:
> bits.




Quote:
> > Hi !
> > WM_USER+XXXX is custom message not style
> > You can use  WNDCLASS ( as Jeff wrote ) look at cbClsExtra and
cbWndExtra
> > for your custom data
> > HTH
> > Arkady



> > > Hi:
> > >     I want to custom myself window's style,it use for any window.How
to
> > let
> > > it don't conflict with window statndat'style?
> > > for message ,I may use WM_USER+XXXX,how to do it?
> > > thanks!



Mon, 12 Jul 2004 08:03:31 GMT  
 Custom window's Style
Oh, I thought this was a custom control WNDCLASS of your own making. I don't think there is any safe
way to add new control style bits to an existing control class. One suggestion I would make is to
define a pair of custom messages like say, RWM_GET... and RWM_SETMYBUTTONEXTENDEDSTYLE and and
maintain these styles internally. Otherwise and or additionally, it may or may not be practical to
usurp an existing style bit for your own purpose. I'd have to know more about the nature of your
implementation to say better. As far as your example style is concerned, how would it differ in
effect from the predefined BS_FLAT style?

Jeff...
--
Please post all follow-ups to the newsgroup only.

Quote:

> But how to  ensure that my costum style don't conflict with window
> statndat'style?for example ,I want add a style 'WS_FLATBUTTON' for
> BUTTON,how to ensure it don't confilict with button statndat's style ?



> > Just in case I've been unclear, I was talking about the CreateWindow DWORD
> dwStyle parameter style
> > bits.



> > > Hi !
> > > WM_USER+XXXX is custom message not style
> > > You can use  WNDCLASS ( as Jeff wrote ) look at cbClsExtra and
> cbWndExtra
> > > for your custom data
> > > HTH
> > > Arkady



> > > > Hi:
> > > >     I want to custom myself window's style,it use for any window.How
> to
> > > let
> > > > it don't conflict with window statndat'style?
> > > > for message ,I may use WM_USER+XXXX,how to do it?
> > > > thanks!



Mon, 12 Jul 2004 10:48:56 GMT  
 Custom window's Style
thanks!

Quote:
> Oh, I thought this was a custom control WNDCLASS of your own making. I

don't think there is any safe
Quote:
> way to add new control style bits to an existing control class. One

suggestion I would make is to
Quote:
> define a pair of custom messages like say, RWM_GET... and

RWM_SETMYBUTTONEXTENDEDSTYLE and and
Quote:
> maintain these styles internally. Otherwise and or additionally, it may or

may not be practical to
Quote:
> usurp an existing style bit for your own purpose. I'd have to know more

about the nature of your
Quote:
> implementation to say better. As far as your example style is concerned,

how would it differ in
Quote:
> effect from the predefined BS_FLAT style?

> Jeff...
> --
> Please post all follow-ups to the newsgroup only.




Quote:
> > But how to  ensure that my costum style don't conflict with window
> > statndat'style?for example ,I want add a style 'WS_FLATBUTTON' for
> > BUTTON,how to ensure it don't confilict with button statndat's style ?



> > > Just in case I've been unclear, I was talking about the CreateWindow
DWORD
> > dwStyle parameter style
> > > bits.



> > > > Hi !
> > > > WM_USER+XXXX is custom message not style
> > > > You can use  WNDCLASS ( as Jeff wrote ) look at cbClsExtra and
> > cbWndExtra
> > > > for your custom data
> > > > HTH
> > > > Arkady



> > > > > Hi:
> > > > >     I want to custom myself window's style,it use for any
window.How
> > to
> > > > let
> > > > > it don't conflict with window statndat'style?
> > > > > for message ,I may use WM_USER+XXXX,how to do it?
> > > > > thanks!



Mon, 12 Jul 2004 15:50:40 GMT  
 
 [ 8 post ] 

 Relevant Pages 

1. Can't find article on custom outlook-style graphic time range control

2. Windows XP Visual Styles and VB Ocx's

3. Modifying a window's style?

4. The change of the windows style LB_SORT of a CListBox doesn't work

5. Visual C's workspace window style

6. VC's workspace window style

7. Tool Windows extended style doesn't work

8. The change of the windows style LB_SORT of a CListBox doesn't work

9. Modifying a window's style?

10. The change of the windows style LB_SORT of a CListBox doesn't work

11. Custom control styles

12. 'One True Brace Style'

 

 
Powered by phpBB® Forum Software