荔园在线

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

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


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

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

Topics of the day:

  1. Delphi (5)
  2. Hook in DLL. Simple problem?
  3. ListCtrl (2)
  4. Help On CObList !
  5. How to verify rich edit 2.0 (2)
  6. MDIChild derived from another class? (2)
  7. Text Window

--------------------------------------------------------------------------
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:    Fri, 15 Jan 1999 16:55:28 +0800
From:    "Lu, Ru-Chuan" <lurc@INAME.COM>
Subject: Delphi

Hello all,

This is a out topic message, I am sorry for that.
Can anybody out there tell me where I can get a Dephi mailing list?

TIA.

Best regards,
Ru-Chuan

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

Date:    Fri, 15 Jan 1999 05:18:06 -0500
From:    Going Broke <goingbroke@USA.NET>
Subject: Re: Delphi

I'm sure you can find at least one list at this address.
http://www.lsoft.com/lists/listref.html
It's a list of mailing lists.


-----Original Message-----
From: Lu, Ru-Chuan <lurc@INAME.COM>
To: MSVC@PEACH.EASE.LSOFT.COM <MSVC@PEACH.EASE.LSOFT.COM>
Date: Friday, January 15, 1999 3:59 AM
Subject: Delphi


>Hello all,
>
>This is a out topic message, I am sorry for that.
>Can anybody out there tell me where I can get a Dephi mailing list?
>
>TIA.
>
>Best regards,
>Ru-Chuan
>
>--------------------------------------------------------------------------
>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:    Fri, 15 Jan 1999 11:32:18 +0100
From:    =?iso-8859-1?Q?Anders_W=E5hlin?= <wahlin@ERV.ERICSSON.SE>
Subject: Hook in DLL. Simple problem?

Hello.

Env: Windows NT 4.0 SP3, Visual C++ 6.0

I'm new to this hook thing.

I have created a DLL which contains a simple hook that captures all key
presses and store them in a file. The DLL was created using AppWizard. I
have export two functions from the DLL: InstallFilter and
KeyboardProc.

From a application I call the InstallFilter function. When debugging the DLL
I can see that the InstallFilter is called but SetWindowsHookEx(...) returns
NULL. When calling GetLastError() it returns 0. The
Filter function never gets called.

Here are some of the DLL code:

/* Filter definition */
LRESULT CALLBACK KeyboardProc(int code, WPARAM wParam, LPARAM lParam);

/* Globals */
HHOOK hKeybHook;
HOOKPROC hKeybProc;

/* DLL contructor */
CHookDLLApp::CHookDLLApp()
{
 hKeybProc = (HOOKPROC)KeyboardProc;
}

/* Installer */
int CHookDLLApp::InstallFilter(BOOL fInstall) {
 if (fInstall) {
  hKeybHook = SetWindowsHookEx(WH_KEYBOARD, hKeybProc, m_hInstance, 0);
  if (hKeybHook == NULL) {
   char szStr[15];
   int error = GetLastError();
   AfxMessageBox(itoa(error, szStr, 10));
  }
 }
 else {
  UnhookWindowsHookEx(hKeybHook);
 }
 return (0);
}

/* Filter function */
LRESULT CALLBACK KeyboardProc(int code, WPARAM wParam, LPARAM lParam) {
 char szOutputStr[255], szKeyCode[10];

 szKeyCode[0] = (char)wParam;
 szKeyCode[1] = 0;

 strcpy(szOutputStr, "The user pressed: ");
 strcat(szOutputStr, szKeyCode);
 strcat(szOutputStr, "\r\n");

 WriteDataToFile(szOutputStr);

 return( CallNextHookEx(hKeybHook, code, wParam, lParam));
}

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

Date:    Fri, 15 Jan 1999 13:38:01 +0100
From:    Benjamin Levstek <benjamin.levstek@ADACTA.SI>
Subject: ListCtrl

This is a multi-part message in MIME format.

------=_NextPart_000_001E_01BE408C.456B1F80
Content-Type: text/plain;
        charset="iso-8859-2"
Content-Transfer-Encoding: quoted-printable

I have a dialog based app. and there is listcontrol and some buttons.=20
Let's say that i want to put a lot of data into listcontrol and i would =
also
like that i can click on buttons while listcontrol is working.=20
I tried with AfxBeginThread, but after the list control is filled i get =
an error.
Any idea!

------=_NextPart_000_001E_01BE408C.456B1F80
Content-Type: text/html;
        charset="iso-8859-2"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 HTML//EN">
<HTML>
<HEAD>

<META content=3Dtext/html;charset=3Diso-8859-2 =
http-equiv=3DContent-Type>
<META content=3D'"MSHTML 4.72.3110.7"' name=3DGENERATOR>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT color=3D#000000 size=3D2>I have a dialog based app. and there =
is=20
listcontrol and some buttons. </FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2>Let's say that i want to put a lot =
of data into=20
listcontrol and i would also</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2>like that i can click on buttons =
while=20
listcontrol is working. </FONT></DIV>
<DIV><FONT size=3D2>I tried with AfxBeginThread, but after the list =
control is=20
filled i get an error.</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2>Any idea!</FONT></DIV></BODY></HTML>

------=_NextPart_000_001E_01BE408C.456B1F80--

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

Date:    Fri, 15 Jan 1999 07:52:49 -0500
From:    Timothy Dixon <tdixon@PHDINC.COM>
Subject: Re: Delphi

Yes.  Delphi-L....um....I don't remember how to sign up, but I think I
found it from Inprise's web page (www.inprise.com/delphi)

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






lurc@INAME.COM on 01/15/99 03:55:28 AM

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

To:   MSVC@PEACH.EASE.LSOFT.COM
cc:    (bcc: Tim Dixon/PHD)
Subject:  Delphi




Hello all,
This is a out topic message, I am sorry for that.
Can anybody out there tell me where I can get a Dephi mailing list?
TIA.
Best regards,
Ru-Chuan
--------------------------------------------------------------------------
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:    Fri, 15 Jan 1999 18:29:19 +0530
From:    "Kameswara Rao M." <fd95522@BITS-PILANI.AC.IN>
Subject: Help On CObList !

  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.
  Send mail to mime@docserver.cac.washington.edu for more info.

---559023410-16838-916405111=:39
Content-Type: TEXT/PLAIN; CHARSET=US-ASCII
Content-ID: <Pine.SCO.3.96.990115182904.457B@ipc.bits-pilani.ac.in>


Hai friends ,

Please go thru the code & help me out.
Thanq.



---559023410-16838-916405111=:39
Content-Type: TEXT/PLAIN; CHARSET=US-ASCII; NAME="mail.txt"
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.SCO.3.96.990115182831.39B@ipc.bits-pilani.ac.in>
Content-Description:

DQoNCg0KKioqKioqKioqKioqIHBsZWFzZSBoZWxwICoqKioqKioqKioqKioq
KioqKioqDQoNCi8vLy8vLy8vLy8vLy8vLy8vLyBFcXVpcC5oIA0KDQpjbGFz
cyBDRXF1aXBtZW50IDogcHVibGljIENPYmplY3QNCnsNCnB1YmxpYyA6DQoJ
Q0VxdWlwbWVudCgpOw0KCURFQ0xBUkVfU0VSSUFMKENFcXVpcG1lbnQpOw0K
CX5DRXF1aXBtZW50KCk7DQogCXZpcnR1YWwgdm9pZCBTZXJpYWxpemUoQ0Fy
Y2hpdmUmIGFyKTsNCglpbnQgbV9lcXVpcF9sZW47DQp9Ow0KDQoNCi8vLy8v
Ly8vLy8vLy8vLyBFcXVpcC5jcHANCg0KSU1QTEVNRU5UX1NFUklBTChDRXF1
aXBtZW50LENPYmplY3QsMSkNCg0KCS8vIGZ1bmN0aW9ucyBpbXBsLg0KDQoJ
Ly8gZGVjbGFyZWQNCkNPYkxpc3QgRXF1aXBtZW50TGlzdDsNCg0KDQoNCi8v
Ly8vLy8vLy8vLy8vLy8vLy8vLy8vLyBUZXN0RG9jLmNwcA0Kdm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LkdldE5leHQocG9zKTsNCgkvLyBsYXRlciBpIHR5cGVjYXRl
ZCBidXQgcnVudGltZSBmYWlsdXJlLg0KCQ0KCUFTU0VSVChwdHItPklzS2lu
ZE9mKFJVTlRJTUVfQ0xBU1MoQ0VxdWlwbWVudCkpKTsNCgkvLyB0aGlzIGFz
c2VydGlvbiBhbHdheXMgZmFpbGVkIA0KCS8vIHRoZSBkZWJ1ZyBvdXRwdXQg
Li4uLg0KLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t
LS0tLQ0KDQpjb250ZXh0LT4gQ09iamVjdDo6SXNLaW5kT2YoLi4uKQ0KCSAg
YXQgdGhpcy0+X192ZnB0ciB0aGUgYWNjZXNzIHZpb2xhdGlvbiBvY2N1cmVk
Lg0KLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t
LS0NCg0KcGxlYXNlIGdvIHRocnUgdGhpcyBjb2RlICYgaGVscCBtZSBvdXQN
Cg0K
---559023410-16838-916405111=:39--

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

Date:    Fri, 15 Jan 1999 16:10:51 +0300
From:    Sumtsov Dmitry <sumtsov@SOFTLAB.RU>
Subject: Re: ListCtrl

Use CWnd::SetTimer( ... ).
In timer callback function you can add a new portion of data into the
listctrl.


> -----Original Message-----
> From: Benjamin Levstek [SMTP:benjamin.levstek@ADACTA.SI]
> Sent: 15 January 1999 ?. 3:38
> To:   MSVC@PEACH.EASE.LSOFT.COM
> Subject:      ListCtrl
>
> I have a dialog based app. and there is listcontrol and some buttons.
> Let's say that i want to put a lot of data into listcontrol and i would
> also
> like that i can click on buttons while listcontrol is working.
> I tried with AfxBeginThread, but after the list control is filled i get an
> error.
> Any idea!

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

Date:    Fri, 15 Jan 1999 08:44:43 -0600
From:    David Cotton <David.Cotton@MARCGROUP.COM>
Subject: How to verify rich edit 2.0

Environment: NT 4  VC 5

When using the CRichEditView and associated document how can I determine which
version of the rich edit class was instantiated?

Can I force the usage to version 2.0? Is this the default?

Thanks,
Dave

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

Date:    Fri, 15 Jan 1999 10:18:47 -0500
From:    Robert Twitty <rtwitty@USHMM.ORG>
Subject: Re: How to verify rich edit 2.0

According to the MFC source code it uses version 1.0.  And based on the
code you cannot force it to use version 2.0 unless you modify it and then
recompile it.

-- bob

On Fri, 15 Jan 1999, David Cotton wrote:

> Environment: NT 4  VC 5
>
> When using the CRichEditView and associated document how can I determine which
> version of the rich edit class was instantiated?
>
> Can I force the usage to version 2.0? Is this the default?
>
> Thanks,
> Dave
>
> --------------------------------------------------------------------------
> 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:    Fri, 15 Jan 1999 16:19:36 -0000
From:    Cliff Rowley <crowley@NOSPLASH.FORCE9.CO.UK>
Subject: MDIChild derived from another class?

OS:        NT4/SP4
DEV:      MSVC++6/SP1

Hi.  I have an MDI application, with a base MDI child window called =
CBaseFrame.  I have another class derived from CBaseFrame called =
CServerFrame.  The reason I want a base class between MDI children is =
that there are a quite a few similarities between them (functions as =
well as data), but there are fundamental differences that prevent me =
from creating MDI children dynamically from the same class.

The trouble is that I cannot instantiate a child window of the derived =
class.  I get an assertion.

Here's the code and the details:

void CIRCApp::OnFileNew()=20
{
 CMainFrame* pFrame =3D STATIC_DOWNCAST(CMainFrame, m_pMainWnd);

 // create a new MDI child window
 pFrame->CreateNewChild(
  RUNTIME_CLASS(CServerFrame), IDR_IRCTYPE, m_hMDIMenu, m_hMDIAccel);
}

ASSERT =3D=20

BOOL CObject::IsKindOf(const CRuntimeClass* pClass) const
{
 ASSERT(this !=3D NULL);        <---------  HERE
 // it better be in valid memory, at least for CObject size
 ASSERT(AfxIsValidAddress(this, sizeof(CObject)));

 // simple SI case
 CRuntimeClass* pClassThis =3D GetRuntimeClass();
 return pClassThis->IsDerivedFrom(pClass);
}

Any ideas?

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

Date:    Fri, 15 Jan 1999 20:38:25 -0000
From:    Alberto Monteiro <albmont@CENTROIN.COM.BR>
Subject: Text Window

What is best way to create a purely text View window?

Alberto Monteiro

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

Date:    Sat, 16 Jan 1999 01:49:30 -0000
From:    Cliff Rowley <crowley@NOSPLASH.FORCE9.CO.UK>
Subject: Re: MDIChild derived from another class?

My own fault - I had forgotten DECLARE_DYNCREATE()  Apologies (DOH!)

> -----Original Message-----
> From: Microsoft Visual C++ programmers list
> [mailto:MSVC@PEACH.EASE.LSOFT.COM]On Behalf Of Cliff Rowley
> Sent: Friday, January 15, 1999 4:20 PM
> To: MSVC@PEACH.EASE.LSOFT.COM
> Subject: MDIChild derived from another class?
>=20
>=20
> OS:        NT4/SP4
> DEV:      MSVC++6/SP1
>=20
> Hi.  I have an MDI application, with a base MDI child window=20
> called CBaseFrame.  I have another class derived from CBaseFrame=20
> called CServerFrame.  The reason I want a base class between MDI=20
> children is that there are a quite a few similarities between=20
> them (functions as well as data), but there are fundamental=20
> differences that prevent me from creating MDI children=20
> dynamically from the same class.
>=20
> The trouble is that I cannot instantiate a child window of the=20
> derived class.  I get an assertion.
>=20
> Here's the code and the details:
>=20
> void CIRCApp::OnFileNew()=20
> {
>  CMainFrame* pFrame =3D STATIC_DOWNCAST(CMainFrame, m_pMainWnd);
>=20
>  // create a new MDI child window
>  pFrame->CreateNewChild(
>   RUNTIME_CLASS(CServerFrame), IDR_IRCTYPE, m_hMDIMenu, m_hMDIAccel);
> }
>=20
> ASSERT =3D=20
>=20
> BOOL CObject::IsKindOf(const CRuntimeClass* pClass) const
> {
>  ASSERT(this !=3D NULL);        <---------  HERE
>  // it better be in valid memory, at least for CObject size
>  ASSERT(AfxIsValidAddress(this, sizeof(CObject)));
>=20
>  // simple SI case
>  CRuntimeClass* pClassThis =3D GetRuntimeClass();
>  return pClassThis->IsDerivedFrom(pClass);
> }
>=20
> Any ideas?
>=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:    Sat, 16 Jan 1999 10:00:52 +0800
From:    "Lu, Ru-Chuan" <lurc@INAME.COM>
Subject: Re: Delphi

I got it, thanks.
-----Original Message-----
From: Going Broke <goingbroke@USA.NET>
To: MSVC@PEACH.EASE.LSOFT.COM <MSVC@PEACH.EASE.LSOFT.COM>
Date: Friday, January 15, 1999 6:19 PM
Subject: Re: Delphi


>I'm sure you can find at least one list at this address.
>http://www.lsoft.com/lists/listref.html
>It's a list of mailing lists.
>
>
>-----Original Message-----
>From: Lu, Ru-Chuan <lurc@INAME.COM>
>To: MSVC@PEACH.EASE.LSOFT.COM <MSVC@PEACH.EASE.LSOFT.COM>
>Date: Friday, January 15, 1999 3:59 AM
>Subject: Delphi
>
>
>>Hello all,
>>
>>This is a out topic message, I am sorry for that.
>>Can anybody out there tell me where I can get a Dephi mailing list?
>>
>>TIA.
>>
>>Best regards,
>>Ru-Chuan
>>
>>--------------------------------------------------------------------------
>>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:    Sat, 16 Jan 1999 10:53:40 +0800
From:    "Lu, Ru-Chuan" <lurc@INAME.COM>
Subject: Re: Delphi

I got it, thank you.
-----Original Message-----
From: Timothy Dixon <tdixon@PHDINC.COM>
To: MSVC@PEACH.EASE.LSOFT.COM <MSVC@PEACH.EASE.LSOFT.COM>
Date: Friday, January 15, 1999 9:01 PM
Subject: Re: Delphi


>Yes.  Delphi-L....um....I don't remember how to sign up, but I think I
>found it from Inprise's web page (www.inprise.com/delphi)
>
>Tim Dixon, Software Engineer
>PHD, Inc.  http://www.phdinc.com
>
>
>
>
>
>
>lurc@INAME.COM on 01/15/99 03:55:28 AM
>
>Please respond to MSVC@PEACH.EASE.LSOFT.COM
>
>To:   MSVC@PEACH.EASE.LSOFT.COM
>cc:    (bcc: Tim Dixon/PHD)
>Subject:  Delphi
>
>
>
>
>Hello all,
>This is a out topic message, I am sorry for that.
>Can anybody out there tell me where I can get a Dephi mailing list?
>TIA.
>Best regards,
>Ru-Chuan
>--------------------------------------------------------------------------
>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 .
>

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

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


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

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