Re: [WIN] Who wants a tough question?

new topic     » goto parent     » topic index » view thread      » older message » newer message

> Hi Levi, :)
>
> The reason I asked about what *version* of Win32Lib you were using is
> that recent versions don't handle setting styles for windows quite
> like it used to.  The new versions effectively "add" user selected
> styles *to* the default, instead of replacing the default.  I think
> Derek should change it back like it was, where *just* whatever you set
> as style flags for a window was what you got, personally.

Agreed! I was getting quite used to being able to set the styles in the
create() statement, and I had to mess around with my code because
I had a whole bunch of global constants together, and now I've gotta
separate the Window create() constants from all the others :-\ But
hey, i'm a very flexible person, so I've got a hang of the
classDefault() deal.

Okay, what happend was that I has something going like this...

fmj_junk_000 = classDefaults(Window, {{CCflags,
WS_DLGFRAME, WS_SYSMENU}})

Now, with WS_DLGFRAME by itself, it gave me a WS_DLGFRAME
window. However, I add anything else to it, and it resorted to the
default WS_OVERLAPPEDWINDOW.

But shortly after I sent the email off, I figured out I could put in a
or_all()'d sequence to the sequence already there. (Which would
be... duh... [1][1][2] where the style resides... I shoulda figured this
out with what I've been doing forever in the create() function :)) This
came out looking like this:

fmj_junk_000 = classDefaults(Window, {{CCflags, or_all
({WS_DLGFRAME, WS_SYSMENU})}})

I mean, this still doesn't produce the desired result, but hey! I
learned something new! :)

So, my next best question would be: I have a WS_SYSMENU
window... how can I disable the close button in the upper right hand
corner? (I could use removeStyle()... but I don't see a declaration in
win32lib to add a close button, so I guess there isn't a way to
remove it... my next best plan would be, I suppose, to capture the
close signal off the button and point it to a blank procedure? Or send
a disable message to the button altogether?)

And as I sit here typing this, i'm trying to bang out these questions
with another programmer, and he found CS_NOCLOSE... I'd have to
define it in the window class before I go and create the window...
sooo... I know I've got classDefaults here, but its doing me no good
(Can only be used to change styles?)... So it looks like I'm gonna
get a lil gritty with this one :)

TIA,

--"LEVIATHAN"

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu