荔园在线

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

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


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

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

Topics of the day:

  1. stripping OLE headers
  2. data Control and the recford source

--------------------------------------------------------------------------
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, 2 Jan 1999 13:01:42 +0000
From:    Melvin Legge <mlegge@FIRSTCITY.NET>
Subject: stripping OLE headers

Hi

I am trying to import a jpeg into my application.  This jpeg is
emdedded as an OLE object in an Acess 97 database.  The RFX,
CLongBinary takes care of extracting the data from the database.
However, the CLongBinary object also contains the excess OLE baggage
as well as the jpeg data.  Any ideas how to extract only the jpeg
data from the CLongBinary?

Thanks
Mel

VC++ 5.0, MFC 4.2, NT 4.0, Access 97

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

Date:    Sat, 2 Jan 1999 11:53:18 -0800
From:    shawn stubbs <sstubbs@NAVICOM.COM>
Subject: data Control and the recford source

This is a multi-part message in MIME format.

------=_NextPart_000_000E_01BE3646.7CD1FDE0
Content-Type: text/plain;
        charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Environment:
Microsoft Visual C++ 6.0 Professional.
Pentium 233, 64M RAM, WIN 95
Using the:
Microsoft DataGrid Control, Version 6.0 (OLEDB)
Microsoft ADO Data Control, Version 6.0(OLEDB)

I am new to using visual C++ most of my experience has been with visual =
basic.

I have placed a data control and a data grid on a dialog box.  I have =
set the record source property so that I am using a simple sql.
and this works.  It shows up fine when I run it. =20

Now,  What I would like to do is place a combo box on the dialog box =
that has the names of three different databases.  I have tried placing =
the following code in the CCertificationDlg::OnCloseupCombo1() section =
of my code

CString DbName;
CString Sql;
 int nChoice;
 nChoice =3D m_combo1.GetCurSel();
 m_combo1.GetLBText( nChoice, DbName);
 Sql =3D "select * from " +  DbName +  "";
 m_data.SetRecordSource( Sql );
 m_data.Refresh;

It gives me 1 warning when I compile it and dose not seem to change when =
I select the different names format the combo list.

Thanks for the help in advance. =20
Does any one know of any good books that go over data controls.  The =
ones that I have don't even mention them.
Shawn



------=_NextPart_000_000E_01BE3646.7CD1FDE0
Content-Type: text/html;
        charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

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

<META content=3Dtext/html;charset=3Diso-8859-1 =
http-equiv=3DContent-Type>
<META content=3D'"MSHTML 4.72.3110.7"' name=3DGENERATOR>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT size=3D2>
<DIV><FONT color=3D#000000 size=3D2>Environment:</FONT></DIV>
<DIV><FONT size=3D2>Microsoft Visual C++ 6.0 Professional.</FONT></DIV>
<DIV><FONT size=3D2>Pentium 233, 64M RAM, WIN 95</FONT></DIV>
<DIV><FONT size=3D2>Using the:</FONT></DIV>
<DIV><FONT size=3D2>Microsoft DataGrid Control, Version 6.0 =
(OLEDB)</FONT></DIV>
<DIV><FONT size=3D2></FONT>Microsoft ADO Data Control, Version =
6.0(OLEDB)</DIV>
<DIV>&nbsp;</DIV>
<DIV>I am new to using visual C++ most of my experience has been with =
visual=20
basic.</DIV>
<DIV>&nbsp;</DIV>
<DIV>I have placed a data control and a data grid on a dialog box.&nbsp; =
I have=20
set the record source property so that I am using a simple sql.</DIV>
<DIV>and this works.&nbsp; It shows up fine when I run it.&nbsp; </DIV>
<DIV>&nbsp;</DIV>
<DIV>Now,&nbsp; What I would like to do is place a combo box on the =
dialog box=20
that has the names of three different databases.&nbsp; I have tried =
placing the=20
following code in the CCertificationDlg::OnCloseupCombo1() section of my =

code</DIV>
<DIV>&nbsp;</DIV>
<DIV>CString DbName;<BR>CString Sql;<BR>&nbsp;int =
nChoice;<BR>&nbsp;nChoice =3D=20
m_combo1.GetCurSel();<BR>&nbsp;m_combo1.GetLBText( nChoice,=20
DbName);<BR>&nbsp;Sql =3D &quot;select * from &quot; +&nbsp; DbName =
+&nbsp;=20
&quot;&quot;;<BR>&nbsp;m_data.SetRecordSource( Sql );</DIV>
<DIV>&nbsp;m_data.Refresh;</DIV>
<DIV>&nbsp;</DIV>
<DIV>It gives me 1 warning when I compile it and dose not seem to change =
when I=20
select the different names format the combo list.</DIV>
<DIV>&nbsp;</DIV>
<DIV>Thanks for the help in advance.&nbsp; </DIV>
<DIV>Does any one know of any good books that go over data =
controls.&nbsp; The=20
ones that I have don't even mention them.</DIV>
<DIV>Shawn</DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV></FONT></DIV></BODY></HTML>

------=_NextPart_000_000E_01BE3646.7CD1FDE0--

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

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


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

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