Re: Re Win32lib questions

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

Skoda wrote:

> What if window has  scrollbars and is
> ChildWindow at the same time?

These are up for discussion; perhaps adding HasScrollbars or something is a
better choice here.

As was pointed out, window scrollbars are fundamentally different than
scrollbar controls. It would be possible in Win32Lib to make the window
scroll events trigger OnScroll() callbacks, but OnScroll doesn't
differentiate between horizontal and vertical scrollbars.

One of the issues is that (AFAIK), window scrollbars can't be created and
destroyed "on the fly". Either the window has horizontal and/or vertical
scrollbars, or it doesn't. You can't add these to a window, or remove them,
once the window has been created.

If you could set/clear the window scrollbar attributes on the fly, that
would be great. In that case, it would be trivial to add window scrollbars
to Win32Lib, as a new class (such as HWinScroll and VWinScroll). The
create() routine could set the attributes for the window, and the scroll
events in the window could be routed to the OnScroll callbacks as if the
scrollbars were independant controls.

I mention this so that if anyone knows that I'm wrong, they can let me know
and it can be added to Win32Lib.

Otherwise, the best that can be offered is some sort of

   OnWindowScroll( id, horiz/vert flag )

event, which I'd really like to avoid, since it's easy to confuse with
OnScroll.


> All next version of Win32Lib must be
> compatible with previous; you are able to run
> programs written with older version with
> new version without modifications of your
> program's code.

Not true; there are occasionally good reasons to break things in the
library. But it's not something that's done lightly. Typically, the
documentation starts off with a header like this:

   WARNING: THIS VERSION WILL CAUSE PRIOR CODE TO BREAK!

For example, WinMain changed a while back and introduced a flag that allowed
the application to be launched minimized. There have been other changes as
well.

-- David Cuny

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

Search



Quick Links

User menu

Not signed in.

Misc Menu