荔园在线

荔园之美,在春之萌芽,在夏之绽放,在秋之收获,在冬之沉淀

[回到开始] [上一篇][下一篇]


发信人: tang (独孤九剑〖玄铁重剑〗), 信区: Program
标  题: [转载]  MSVC Digest - 13 Jan 1999 to 14 Jan 1999 (#1999-14)
发信站: BBS 荔园晨风站 (Fri Jan 15 17:51:23 1999), 站内信件

【 以下文字转载自 tang 的信箱 】
【 原文由 Automatic 所发表 】
There are 11 messages totalling 577 lines in this issue.

Topics of the day:

  1. Not a problem - just a query... (2)
  2. CFileDialog Cutomisation (2)
  3. Can I view an ivt file (2)
  4. Query on RUNTIME_CLASS() !!
  5. Way off topic but I am lost (3)
  6. NT Real time

--------------------------------------------------------------------------
The MSVC list is hosted on a Windows NT(TM) machine running L-Soft
international's LISTSERV(R) software.  For subscription/signoff info
and archives, see http://peach.ease.lsoft.com/archives/msvc.html .

----------------------------------------------------------------------

Date:    Thu, 14 Jan 1999 09:39:03 +0100
From:    Volker Glave <gla@ADTRANZSIG.DE>
Subject: Re: Not a problem - just a query...

Richard Pickett wrote:
>
>         Now about the return type.  The default return type (decl-specifier)
> if no return type is specified is void.

The default return type is int, not void, I think.

Or *was* int, since implicit int in declarations
is banned in the now Standard C++.

Volker

------------------------------

Date:    Thu, 14 Jan 1999 14:41:07 +0530
From:    Chethan DS <DS.Chethan@BLR.SPCNL.CO.IN>
Subject: CFileDialog Cutomisation

Hi

        I've customised CFileDialog by deriving a class from it and using it
for directory selection. But I'm finding it difficult to get control of the
ListBox displaying the contents of a folder. The list boxes ID is lst1 and
is defined in DGLS.H . My problem is to get the selected folder item without
closing the dialog or changing to that folder. How do I do this? I've tried
GetDlgItem with GetParent, also tried hittest, used GETSPEC macro etc, but
can't get the selected item before closing the dialog or opening the
selected folder.

> REGARDS,
> Chethan D Srikant
> Engineer-Software Development,
> SIEMENS PUBLIC COMMUNICATION NETWORKS LTD.
> 4th floor, Du Parc Trinity, M G Road,
> Bangalore-560 001, INDIA
> Office Ph: +91- 80- 559 4067, Extn: 3155
> Res Ph:    91-80-669 3067
>
> [mailto:DS.Chethan@blr.spcnl.co.in]
>
>

------------------------------

Date:    Thu, 14 Jan 1999 04:09:38 -0500
From:    "Swirski, Zbyszek" <Zbyszek.Swirski@AEXP.COM>
Subject: Re: Not a problem - just a query...

I am afraid you are completely wrong. Default type in C (C++) is always
int.
C++ allows to miss type when declaring function, but I would expect =
that
in this
example it would complain against lack of return. As far as I remember
lack of
return is legal in C++, however illegal in VC++.
I think that compiler was simply confused and did not know if type was
missing or
function name (as a c'tor) was wrong. It choose the second one and...
Anyway, it was very interesting example.

-----Original Message-----
From: Richard Pickett [mailto:rpickett@NORTELNETWORKS.COM]
Sent: Wednesday, January 13, 1999 6:55 PM
To: MSVC@PEACH.EASE.LSOFT.COM
Subject: Re: Not a problem - just a query...


Hello Cliff,

        First let me say to all on the list, sorry about my STUPID =
reply
to
someone's request for subscription.  I thought for sure I had just
specified
them in the reply, but evidently not.  Thanks for not escalating it =
into
a
week of rants on wasted email and how long it took to download that =
HUGE
email and how your ISP is sending you a bill twice the normal size
because
of email traffic. :-).

        Here's the syntax of a function definition in C++:

[decl-specifiers] declarator [ctor-initializer] fct-body

        I have placed the optional parameters in brackets.  As you can
see
the decl-specifiers are not necessary.  The ctor-initilizer section is
strictly for constructors, it is where you would put the base class
initializations.  For some reason (and it escaping me as to why) your
compiler thinks the SetText method is a constructor or should be a
constructor, thus it is calling it a "ctor".  And it is throwing the
warning
that the ctor doesn't have the same name as the class because all
constructors (ctors) have the same name as the class.

        Now about the return type.  The default return type
(decl-specifier)
if no return type is specified is void.  Think about it  what =
parameters
does this function take:

DummyFunc( );

        It takes none (or void) because none were specified.  Same with
the
return type.  If there is no return type specified then nothing (void)
can
be returned.  The following function declaration is the same as the one
above, but it is "safer" because nothing is left to default.

void DummyFunc( void );

        A lot of lint programs will flag the first declaration of
DummyFunc
because although void is implied it is not specified.

Richard W. Pickett Jr.
Windows NT Server System Engineer
rpickett@NortelNetworks.com <mailto:rpickett@NortelNetworks.com>=20

        -----Original Message-----
        From:   Cliff Rowley [SMTP:CRowley@COMTEST.CO.UK]
        Sent:   Wednesday, January 13, 1999 11:48 AM
        To:     MSVC@PEACH.EASE.LSOFT.COM
        Subject:        Not a problem - just a query...

        This is not a problem, I'm just enquiring here...
        =A0
        Take the following example:
        =A0
        class CFoobar
        {
        public:
        =A0=A0=A0 CFoobar();
        =A0=A0=A0 ~CFoobar();
        =A0=A0=A0 SetText(LPCTSTR lpszText) { m_strText =3D lpszText; }
        =A0=A0=A0 LPCTSTR GetText() { return m_strText; }
        protected:
        =A0=A0=A0 CString m_strText;
        };
        =A0
        You'll notice that I have supplied no return value for =
SetText.=A0
By
        rights this should not compile, but should say something along
the
lines
        of "Error:=A0 SetText must return a value".=A0 But it =
doesnt.=A0 The
program
        compiles, and I get a warning like "Warning:=A0 SetText looks =
like
a
CTor
        but does not have the same name as the class".
        =A0
        Is this legal C++?=A0 I dont think it is...
        =A0
        Any comments?

=09
------------------------------------------------------------------------=

--
        The MSVC list is hosted on a Windows NT(TM) machine running
L-Soft
        international's LISTSERV(R) software.  For subscription/signoff
info
        and archives, see =
http://peach.ease.lsoft.com/archives/msvc.html

------------------------------

Date:    Thu, 14 Jan 1999 18:03:32 +0530
From:    yogesh.tk@DB.COM
Subject: Can I view an ivt file

Hi


Can some body help me?  I have all the help file of VC5 ( 200 Mb) .

Can I view these files without using MSVC++ .
 ( As the help files are compressed HTML Files can i View them through an
web browser)


Please respond to me if possible at the following address

yogesh.tk@db.com

bye
Yogesh

------------------------------

Date:    Thu, 14 Jan 1999 10:26:51 +0100
From:    Agata Wasilewska - Kopania <agata@MATRIX.PL>
Subject: Re: Query on RUNTIME_CLASS() !!

I wrote simple aplication with CAge class derived from CObject. I created
CObList object, inserted there some CAge objects and I had no problems with
IsKindOf() function ( I checked both: IMPLEMENT_SERIAL and
IMPLEMENT_DYNCREATE macros). I think you get invalid pointers from your list
( that's why you get 'Acces violation' error ). You should do this:

                CObList list;
                POSITION pos = list.GetHeadPosition();
                while( pos )
                {
                        CObject* pObj = list.GetNext( pos );
                        ASSERT(pObj->IsKindOf(RUNTIME_CLASS(CAge)));
                        cout << (( CAge* )pObj)->Get() << endl;
                }

> -----Original Message-----
> From: Kameswara Rao M.
> Sent: Wednesday, January 13, 1999 3:39 PM
> To:   MSVC@PEACH.EASE.LSOFT.COM
> Subject:      Re: Query on RUNTIME_CLASS() !!
>
> Thankyou Agata.
>
> But even then it is not working. The error is
>
>         " Access violation ". Because both DECLARE_SERIAL  &
> DECLARE_DYNCREATE can call CObject::IsKindOf() to determine RTTI and that
> is what exactly is causing an "Failure" here !.
>
> please keep suggesting .....
>
> Thanx.
>
> ---------------------------------------------
>
> On Wed, 13 Jan 1999, Agata Wasilewska - Kopania wrote:
>
> > I think you should use DECLARE_DYNCREATE and IMPLEMENT_DYNCREATE for
> your
> > CEquipment class.
> >
> ----------------------------------------------
> > > ---> I derived  "CEquipment" from "CObject" & using CObList to store
> > > it. The code
> > >
> > >         CEquipment* ptemp = (CEquipment *) pDoc->EquipmentList(pos);
> > >         ASSERT(ptemp->IsKindOf(RUNTIME_CLASS(CEquipment));
> > >
> > >         is causing a Assertion failure.
> > >
> > >         *) I used IMPLEMENT_SERIAL() for "CEquipment"
> > >         *) I declared CObList EquipmentList;
> > >         ?) should "CObList" object also should be said
> IMPLEMENT_SERIAL().
> > >
> > >
> > > please help me.
> > >
> > > Thanx to everyone who spend their time knowing my problem ..
> > >
> > > Yours friendly,
> > >
> > > Kameswara Rao M.
> > >
> > > -------------------------------------------------------
> > >
> > >
> > >
> --------------------------------------------------------------------------
> > > The MSVC list is hosted on a Windows NT(TM) machine running L-Soft
> > > international's LISTSERV(R) software.  For subscription/signoff info
> > > and archives, see http://peach.ease.lsoft.com/archives/msvc.html .
> >
> >
> --------------------------------------------------------------------------
> > The MSVC list is hosted on a Windows NT(TM) machine running L-Soft
> > international's LISTSERV(R) software.  For subscription/signoff info
> > and archives, see http://peach.ease.lsoft.com/archives/msvc.html .
> >
>
> --------------------------------------------------------------------------
> The MSVC list is hosted on a Windows NT(TM) machine running L-Soft
> international's LISTSERV(R) software.  For subscription/signoff info
> and archives, see http://peach.ease.lsoft.com/archives/msvc.html .

------------------------------

Date:    Thu, 14 Jan 1999 08:25:00 -0500
From:    Stephen Bushway <Bushways@ORLANDO.VEDA.COM>
Subject: Way off topic but I am lost

I need to know if any one has done any work in realtime with NT? Could
you please email me privatly if so.
I am creating a program that was hosted on a UNIX (SGI)  machine but now
is trying to be built on a NT (new SGI) machine. I am writing the code
in VC++. and Openvgs. I came to an understanding that NT can't do
realtime that well. Could some dispute this?

Please help............Someone!!!!

--
<><><><><><><><><><><><><><><><><><><>
Steve Bushway
Bushways@orlando.veda.com

------------------------------

Date:    Thu, 14 Jan 1999 08:36:08 -0500
From:    Timothy Dixon <tdixon@PHDINC.COM>
Subject: Re: Way off topic but I am lost

From everything I've heard, you're correct.  NT can't do real time work
very well; it was designed as a desktop office operating system (OK, server
too) and doesn't have much, if any, support for real time work.

You may be able to stick enough hardware (CPU, RAM, etc) and run your real
time process at a high enough priority to get it to work OK, but true real
time os's are probably the way to go.

Good luck, though!

Tim Dixon,  Software Engineer
PHD, Inc.  http://www.phdinc.com






Bushways@ORLANDO.VEDA.COM on 01/14/99 08:25:00 AM

Please respond to MSVC@PEACH.EASE.LSOFT.COM

To:   MSVC@PEACH.EASE.LSOFT.COM
cc:    (bcc: Tim Dixon/PHD)
Subject:  Way off topic but I am lost




I need to know if any one has done any work in realtime with NT? Could
you please email me privatly if so.
I am creating a program that was hosted on a UNIX (SGI)  machine but now
is trying to be built on a NT (new SGI) machine. I am writing the code
in VC++. and Openvgs. I came to an understanding that NT can't do
realtime that well. Could some dispute this?
Please help............Someone!!!!
--
<><><><><><><><><><><><><><><><><><><>
Steve Bushway
Bushways@orlando.veda.com
--------------------------------------------------------------------------
The MSVC list is hosted on a Windows NT(TM) machine running L-Soft
international's LISTSERV(R) software.  For subscription/signoff info
and archives, see http://peach.ease.lsoft.com/archives/msvc.html .

------------------------------

Date:    Thu, 14 Jan 1999 08:46:13 -0600
From:    Jeff_Nygren_AT_PO20@CCMTA-DCC_MAIL_HUB.DATACARD.COM
Subject: Re: CFileDialog Cutomisation

I ran into this wall a few weeks ago. Do yourself a favor and check out the
Win32 API:

    ::SHBrowseForFolder(&BrowseInfo);

I think it will save you the problem of deriving from CFileDialog.

Jeff Nygren


______________________________ Reply Separator ____________________________
_____
Subject: CFileDialog Cutomisation
Author:  "Microsoft Visual C++ programmers list"
<MSVC@PEACH.EASE.LSOFT.COM>
(Chethan DS <DS.Chethan@BLR.SPCNL.CO.IN>) at DATACARD
Date:    1/14/99 9:11 AM






     Hi

             I've customised CFileDialog by deriving a class from it and
             using
             it
     for directory selection. But I'm finding it difficult to get control
     of the
     ListBox displaying the contents of a folder. The list boxes ID is lst1
      and
     is defined in DGLS.H . My problem is to get the selected folder item
     without closing the dialog or changing to that folder. How do I do
     this?
     I've tried GetDlgItem with GetParent, also tried hittest, used GETSPEC
     macro etc, but can't get the selected item before closing the dialog
     or
     opening the selected folder.

     > REGARDS,
     > Chethan D Srikant
     > Engineer-Software Development,
     > SIEMENS PUBLIC COMMUNICATION NETWORKS LTD.
     > 4th floor, Du Parc Trinity, M G Road,
     > Bangalore-560 001, INDIA
     > Office Ph: +91- 80- 559 4067, Extn: 3155
     > Res Ph:    91-80-669 3067
     >
     > [mailto:DS.Chethan@blr.spcnl.co.in]
     >
     >

     ----------------------------------------------------------------------
     ----
     The MSVC list is hosted on a Windows NT(TM) machine running L-Soft
     international's LISTSERV(R) software.  For subscription/signoff info
     and archives, see http://peach.ease.lsoft.com/archives/msvc.html .

------------------------------

Date:    Thu, 14 Jan 1999 16:15:38 -0000
From:    John Farrow <JFarrow@COIN.CO.UK>
Subject: Re: Way off topic but I am lost

Someone makes a realtime version of NT, Check MSJ for the adverts.

-----Original Message-----
From: Stephen Bushway [mailto:Bushways@ORLANDO.VEDA.COM]
Sent: 14 January 1999 13:25
To: MSVC@PEACH.EASE.LSOFT.COM
Subject: Way off topic but I am lost


I need to know if any one has done any work in realtime with NT? Could
you please email me privatly if so.
I am creating a program that was hosted on a UNIX (SGI)  machine but now
is trying to be built on a NT (new SGI) machine. I am writing the code
in VC++. and Openvgs. I came to an understanding that NT can't do
realtime that well. Could some dispute this?

Please help............Someone!!!!

--
<><><><><><><><><><><><><><><><><><><>
Steve Bushway
Bushways@orlando.veda.com

------------------------------------------------------------------------
--
The MSVC list is hosted on a Windows NT(TM) machine running L-Soft
international's LISTSERV(R) software.  For subscription/signoff info
and archives, see http://peach.ease.lsoft.com/archives/msvc.html .

------------------------------

Date:    Thu, 14 Jan 1999 16:17:32 -0000
From:    Cliff Rowley <crowley@NOSPLASH.FORCE9.CO.UK>
Subject: Re: Can I view an ivt file

Yes and yes.  But you will need to know the names of these files.  The =
format is based on the Microsoft InfoTech Storage system (ITS) that is =
used by Infoviewer, DevStudio and HTML Help.

its:<path and filename of help file>::/<file to view inside IVT/CHM>

For example:

its:c:\winnt\help\htmlhelp.chm::/1hh.htm would open the main entry page =
to htmlhelp.chm

You can type this straight into Internet Explorer 4's address bar.

If you would like to know/view the files inside the CHM/IVT then have a =
look at keytools available from www.keyworks.net.

I am able to parse and manipulate these files via code, but I cannot =
release this information as I have no idea if I am at liberty to do so.  =
Once I know where I stand on that side of things, I will be happy to =
release some source code to you if that's what you want to do, but until =
then, my hands are tied.

> -----Original Message-----
> From: Microsoft Visual C++ programmers list
> [mailto:MSVC@PEACH.EASE.LSOFT.COM]On Behalf Of yogesh.tk@DB.COM
> Sent: Thursday, January 14, 1999 12:34 PM
> To: MSVC@PEACH.EASE.LSOFT.COM
> Subject: Can I view an ivt file
>=20
>=20
> Hi
>=20
>=20
> Can some body help me?  I have all the help file of VC5 ( 200 Mb) .
>=20
> Can I view these files without using MSVC++ .
>  ( As the help files are compressed HTML Files can i View them through =
an
> web browser)
>=20
>=20
> Please respond to me if possible at the following address
>=20
> yogesh.tk@db.com
>=20
> bye
> Yogesh
>=20
> =
-------------------------------------------------------------------------=
-
> The MSVC list is hosted on a Windows NT(TM) machine running L-Soft
> international's LISTSERV(R) software.  For subscription/signoff info
> and archives, see http://peach.ease.lsoft.com/archives/msvc.html .
>=20

------------------------------

Date:    Thu, 14 Jan 1999 14:28:45 -0600
From:    David Stroupe <dstroupe@HOME.COM>
Subject: NT Real time

I guess it depends on just how quickly you must do things.  I have been
involved with a VC++ project for the last 2 years where we have indeed
written a real time control application.  In only one case did I have to
resort to using the PerformanceCounter functions to ensure that my
measurements were resolved to the accuracy that I needed.  Using threads, I
was able to get repeatable responses.  In most cases the threads were
responding within 8mSec of the times that I expected them to.  Our
application controls an industrial piece of equipment containing motor
controls, heaters serial communication and screen animation of the process.
 Only the screen animation suffers during peak CPU usage, but even that
degradation has proven to be acceptable.

Long story short, the term "real time" must be evaluated to ensure that you
are able to accomplish what your specifications require.

David Stroupe

------------------------------

End of MSVC Digest - 13 Jan 1999 to 14 Jan 1999 (#1999-14)
**********************************************************
--
※ 转载:.BBS 荔园晨风站 bbs.szu.edu.cn.[FROM: 192.168.0.4]


[回到开始] [上一篇][下一篇]

荔园在线首页 友情链接:深圳大学 深大招生 荔园晨风BBS S-Term软件 网络书店