Help: BorderStyle property don't work for subclassed Edit control 
Author Message
 Help: BorderStyle property don't work for subclassed Edit control

 BorderStyle property (On) work without any problems for any from
 scratch written controls but after subclassing from Edit control
 (like TextBox) only WS_BORDER flag from model structur was accepted.
 Is flag defined -> ALL controls have ALLWAYS border !!
 Not defined -> ALL controls have NEVER a border !!!

 I'm not newby in windows and controls programming but ...

 I try to set or reset WS_BORDER flag in WM_NCCREATE message.
 It work pretty in windows programming but VB ignore it.

 2. In property window show BorderStyle property false too
    and save property don't work !!!

 I wrote new control from scratch like CIRC1.VBX, only
 standrd property and subclass them.
 BorderStyle(on) don't show, don't save, don't work...
 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
 AAAAAAAAAAAAAA UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU
 OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO



Fri, 13 Feb 1998 03:00:00 GMT  
 Help: BorderStyle property don't work for subclassed Edit control

Quote:

> BorderStyle property (On) work without any problems for any from
> scratch written controls but after subclassing from Edit control
> (like TextBox) only WS_BORDER flag from model structur was accepted.
> Is flag defined -> ALL controls have ALLWAYS border !!
> Not defined -> ALL controls have NEVER a border !!!

> I'm not newby in windows and controls programming but ...

> I try to set or reset WS_BORDER flag in WM_NCCREATE message.
> It work pretty in windows programming but VB ignore it.

> 2. In property window show BorderStyle property false too
>    and save property don't work !!!

> I wrote new control from scratch like CIRC1.VBX, only
> standrd property and subclass them.
> BorderStyle(on) don't show, don't save, don't work...

        Well I'm not sure I'm following this exactly, but: There are some
attributes that you can't change after a window's been created, you have to
set them before creating the window. Now, when you're subclassing a VB
control you're changing the window procedure _after_ VB has created the
control - at this point it's too late to change the things that need to
be set before the window is created.
        And I'm pretty sure that the border style is in the "set at create
time only" category. (To put it another way, I bet that your new window
procedure is simply never getting any WM_NCCREATE messages - they're long
gone.)

        Not quite sure whether this answers the question...

--
David Ullrich
Don't you guys find it tedious typing the same thing
after your signature each time you post something?
I know I do, but when in Rome...



Fri, 13 Feb 1998 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. ADO Properties don't Work! Help

2. VB Text boxes don't work when editing

3. VB4 help wanted : Data Controls don't work

4. VB4 help wanted : Data Controls don't work

5. .recordcount and .absoluteposition properties don't work

6. Property Gets don't work in an RDS object

7. I've programmed a game that don't work Help

8. MovePrevious don't work but the MoveNext work's fine

9. Subclassed ActiveX edit control

10. SubClassed MFC Edit Control Used in VB

11. VB6 Text property of UserControl does not work with UpDown Control's buddy property

12. Web Forms Control don't work??

 

 
Powered by phpBB® Forum Software