Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

API for scroll bars

Status
Not open for further replies.

badukist

Programmer
Jun 26, 2003
146
RO
Hi all
Anyone knows some API sample code of drawing native windows scroll bars ( no ActiveX ) on forms?
Documentation exists on MSDN, but I don't want to reinvent the wheel.

Thanks
 

Why wouldn't you use the built-in scrollbar in VFP?

Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
badukist,
This won't work because the API will only works this way for windows. Only the VFP Screen and Forms are windows - everything else is a bitmap representation of a control. In other words this is much different than other Windows development environments. (This is at least partly due to FoxPro DOS roots.)

Rick
 
I don't agree on this, at least after seeing Common Controls library from Alex R. Grigorjev.
Seems that is possible to create native windows controls on any form/toolbar, without the need for ActiveX.
And now, we can bind native windows events to VFP, so we can intercept when and how user interacts withe these control windows.

My goal is to design an explorer bar like class.
Of course that I'll make it available for community if I'll ever succced in doing it.
 

Badukist,

My goal is to design an explorer bar like class.

Could you give a bit more details about what you want to do? Maybe someone can suggest a specific solution (although it would be much easier if you were able to use ActiveX controls).

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

My sites:
Visual FoxPro (www.ml-consult.demon.co.uk)
Crystal Reports (www.ml-crystal.com)
 
Hi Mike

My intention is a class that behave in a similar way as the explorer bar from XP. I've seen one in Visual Extend framework, but is form based. This is easy :).
I want one based on container, that can be on the form or toolbars as well.
But I want to look nice, with themed scroll bar if necessary.


 
Hi
It is the left bar with common tasks in Windows Explorer with expandable/colapsable groups of options
 

Badukist,

OK, I see now. You need to choose "Show common tasks in folder" from Tools / Options. I wasn't familiar with that option because I always use "classic" Windows folders.

I guess the buttons that make the panes shrink and grow would be easy enough, but I can't see any way of doing the vertical scroll bar other than via an ActiveX control.

If you manage to find a solution, let us know. This is something I would consider using in my own applications.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

My sites:
Visual FoxPro (www.ml-consult.demon.co.uk)
Crystal Reports (www.ml-crystal.com)
 
Ok, if I will have some time in the near future, I'll check that windows API stuff. If not, I will try with the Flat scroll bar ActiveX.

PS:
I've designed a control that looks like Outlook list bar
Maybe is something you can use too
It has download id 9888 on UT. I plan to update it to work with VFP9
 

Badukist,

Your Outlook-style bar is very impressive. I've run the demos, and I'll have a look at your code when I get time.

In my present app, I was thinking of doing something similar, by means of the Microsoft Listview control (or my own SimpleList sub-class thereof). It would be much simpler than yours -- basically icons without the categories.

Then you showed me the explorer-style "common tasks" bar, which also looks very nice. I might try to implement that myself (unless you do it first). Or I might have a closer look at your Outlook bar.

Good luck with the scrollbar problem. Sorry I can't suggest a non-ActiveX solution.

Mike



__________________________________
Mike Lewis (Edinburgh, Scotland)

My sites:
Visual FoxPro (www.ml-consult.demon.co.uk)
Crystal Reports (www.ml-crystal.com)
 
It's old code.
Now, I would use collections, native themed buttons and the anchor property :)
 
Mike,

I think Badukist means the container displayed on the left edge of XP's Windows Explorer or on the left edge of XP's Control Panel. Basically this is a scrollable vertical container containing "boxes" with related menu items. You can click the contained box's titles to open or close the box, thus hiding or showing the box's menu items. As you expand and collapse boxes, boxes below the affected box readjust their positions and if the total size required to display all boxes is larger than the height of the master container, then a scrollbar needs to show up in this master container.

Malcolm
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top