
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...