LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Using activeX statusbar

Hi I have used the ActiveX controller wizard to generate wrapper functions for the controls in the mscomctrl library,
as I wish to use the statusbar on a labwindows panel.

I have used the function MSComctlLib_NewIStatusBar to add the status bar to the panel. However, it is randomly placed on the form and is not the correct size.

How can I resize this control, place in on the bottom of a panel and place text in different panels on the statusbar.

I would appreciate anyone letting me know where the information for using this activex control from ansi c is on the web.
I have looked but can not find any examples at all.
I assume I am using the wrong search terms as contolling activex control from c cant be that rare.

Thanks for any help.


0 Kudos
Message 1 of 2
(3,112 Views)
Hi,
  the MSComctlLib_NewIStatusBar has top and left parameters, so you need to work out, given the height of the status bar as a default, where you want that placed, given the height of the panel you're placing it on. (try panel height - 35)
Another method would be to use an ActiveX container on the uir, and then you can place it by hand to start with.
If you have a scrollable or sizeable front panel, then you need to capture for the scroll happening, and move the statusbar accordingly.
 
I've included below a project in CVI 8 (although you can use the .c code in your own version of CVI) that works with the .fp file as you would have created it with the default names.
 
Hopefully it will all make sense.
 
Thanks
 
Sacha Emery
National Instruments (UK)
// it takes almost no time to rate an answer Smiley Wink
Message 2 of 2
(3,099 Views)