- UID
- 74140
- 积分
- 1782
- 精华
- 贡献
-
- 威望
-
- 活跃度
-
- D豆
-
- 在线时间
- 小时
- 注册时间
- 2003-8-22
- 最后登录
- 1970-1-1
|
发表于 2005-3-23 08:37:47
|
显示全部楼层
AcadStatButton 4.04 for AutoCAD R14-R2004 2003-10-1
Copyright 2003 ManuSoft
http://www.manusoft.com
AcadStatButton is freeware. You are granted a license to use
this library for any purpose and redistribute it in any
manner so long as the copyright notice is clearly visible.
When distributed as source code this notice must also be
included and clearly visible.
WARNING: USE AT YOUR OWN RISK!
+++ Revision notes
Version 4.04 corrects a problem with the version number in
the internal implementation of the ActiveX interface. This
bug prevented the ActiveX interface from working via Visual
Lisp. A Visual Lisp sample is now included.
Version 4.03 corrects a bug which could result in a crash
in AutoCAD after the status bar button code was unloaded
during midsession.
Version 4.0 adds support for AutoCAD 2004. The ActiveX
interface was not changed, and remains at 3.0.
Version 3.0 adds support for fixed/floating button position
and adds a new drag-n-drop repositioning capability. The
ActiveX interface version has been changed to 3.0.
Version 2.11 includes a corrected ActiveX DLL which reflects
the ActiveX interface changes made in version 2.1 and fixes
a bug with the button 'Position' property.
Version 2.1 removed the 'const' attribute from the following
functions:
AcadStatusBarButton::WindowProc()
AcadStatusBarButton::OnClicked()
This may necessitate changes in custom classes derived from
older versions of AcadStatusBarButton.
+++ Purpose
This library is designed to make it easy for application
developers to add custom status bar buttons to the AutoCAD
status bar. The library is designed to allow buttons from
different applications to peacefully coexist even if the
applications know nothing about each other.
An ActiveX interface for this library is provided in a
separate DLL (AxSupport/AxAcadStatusBarButton.dll) in order
to make it possible to utilize status bar buttons from Lisp
and VBA as well as ObjectARX.
+++ Usage (ActiveX)
Register the ActiveX interface for this library by running
AxReg.bat (unregister by running AxUnReg.bat). Once the
ActiveX interface is registered, you can create a button
by calling CreateObject with the following ProgID:
AxAcadStatusBarButtonLib.Button
Note that in VBA you must first 'Reference' the library
in your project before it can be used. A simple VBA project
(SBBTest.dvb) is included as a sample. SBBTest.dvb consists
of two classes (StatusBarCommandButton.cls and
PushlikeStatusBarButton.cls) along with a VBA module
(SBBTest.bas) that implements a simple test macro named
AddButtons. To display the two sample buttons, use the
VBALOAD command to load SBBTest.dvb, then use VBARUN to
run the AddButtons macro.
+++ Usage (C++)
To create a button for your application, simply include the
AcadStatButton.h header file in your source file, then define
a new class derived from AcadStatusBarButton and override the
OnClicked() member function. Additional virtual functions may
be overridden in the derived class to further customize the
behavior or handling of your button. The AcadStatButton.lib
library contains the implementation of AcadStatButton, and
you must include this library when linking.
Additional documentation is included in comments in the
header file. Note that you may create more than one button:
the library will automatically arrange the buttons along the
status bar from right to left by button window Z-Order.
Example:
class TestButton : public AcadStatusBarButton
{
private:
HBITMAP m_hbmpImage;
protected:
virtual void OnClicked();
public:
TestButton( HBITMAP hbmpImage )
: m_hbmpImage( hbmpImage ),
AcadStatusBarButton( (HBITMAP)hbmpImage )
{}
~TestButton()
{ ::DeleteObject( m_hbmpImage ); }
};
void TestButton::OnClicked()
{
DoSomething();
}
+++ No technical support provided
This software is provided as a free service to the AutoCAD
community. While feedback is always welcome, ManuSoft will not
be able to answer technical questions or solve problems caused
by use of this library.
Other feedback may be directed to ManuSoft via email to:
acadsbb@manusoft.com |
|