15 мая 2023 года "Исходники.РУ" отмечают своё 23-летие!
Поздравляем всех причастных и неравнодушных с этим событием!
И огромное спасибо всем, кто был и остаётся с нами все эти годы!

Главная Форум Журнал Wiki DRKB Discuz!ML Помощь проекту


MSVC 4.0, autoexp.dat

Niels Ull Jacobsen -- nuj@kruger.dk
Thursday, January 25, 1996

Just a small tip, which isn't strictly MFC, but which I have found to
be very useful: You can customize the "DataTips". 

By chance I looked in the autoexp.dat file in my MSDEV/BIN
directory. It doesn't seem to be documented anywhere (except in the file itself), but it's very easy to do.

If you hav your class CFoo with a CString member m_Name and an int
m_nID, just add

	CFoo =<,t> name= id=

to autoexp.dat and presto - the datatips for a pointer to a CFooDerived will be

{CFooDerived} name="Name" id=3

It's very easy to do. While you're at it, correct the entry for CTimeSpan from
	CTimeSpan =time=
to
	CTimeSpan =span=
and you will be able to see CTimeSpan's correctly.

You can even write 
CTimeSpan =d,::

to see timespans as [3d,14:35:06]

BTW, this should be put in the MFC FAQ.


--
Niels Ull Jacobsen, Kruger A/S

Everything stated herein is THE OFFICIAL POLICY of the entire Kruger
group and should be taken as legally binding in every respect. Pigs
will grow wings and fly.








Jim Beveridge -- 73542.1421@compuserve.com
Sunday, January 28, 1996

Niels Ull Jacobsen wrote:
> 
> Just a small tip, which isn't strictly MFC, but which I have found to
> be very useful: You can customize the "DataTips".
> 

This feature is mentioned in the "What's New" section which you saw
the first time you started VC 4.0.  It is formally called "AutoExpand".
However, as you mentioned, it is completely undocumented where and
how to do it.  It is also hugely useful.

Changes to AUTOEXP.DAT affect more than the datatips.  AUTOEXP.DAT
can also configure what is shown for any unexpanded class member
(even aggregate members) in the locals/this/auto variables window
as well as QuickWatch.

There does not appear to be a way to do templates in the general case,
(e.g. Display the size for all CArray instantiations) but they can be
handled on a case-by-case basis using typedefs in your code to name them.

Note that you can go several layers deep or refer to members in a
base class -- anything you would normally be able to type in the
QuickWatch window.

Entries in AutoExp will not be recursively applied by the IDE.

AutoExp is re-read every time you run your program in the IDE's debugger,
so there is no need to exit VC to load any new changes.

-- Jim Beveridge





Steven Lewis -- smlewis@wln.com
Monday, January 29, 1996

I have tried with a tyyedefed template and it did not work for me.





| Вернуться в корень Архива |