荔园在线

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

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


发信人: tang (独孤九剑〖玄铁重剑〗), 信区: Program
标  题: [转载]  MSVC Digest - 13 Dec 1998 to 14 Dec 1998 (#1998-341)
发信站: BBS 荔园晨风站 (Tue Dec 15 13:25:22 1998), 站内信件

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

Topics of the day:

  1. A class for storing graphs
  2. Warning Control.
  3. How do I write a "blank" to a ODBC field
  4. how to get HWND_OBJECT
  5. SQLConnect AND UNICODE?
  6. unsubscribe
  7. excel clipboard/automation

--------------------------------------------------------------------------
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:    Mon, 14 Dec 1998 12:40:14 +0530
From:    Anuj Seth <anuj@SASI.COM>
Subject: A class for storing graphs

Env: VC++ 6.0, MFC, Win98

Hi,

Could someone tell me the most efficient way of storing a graph using C++/MFC.
The class should be derived from CObject and should be seriazable. The class
should be able to store information about each node and the edges which connect
to other nodes.

Thanks.

With Regards,

Anuj
Email: aseth@usa.net

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

Date:    Mon, 14 Dec 1998 08:14:18 +0100
From:    Jose Luis Flores <jlflores@IDEKO.ES>
Subject: Warning Control.

In VC++ 6, I don't Know but in VC++ you have to go to:

        Project
        -> Settings
                ->C/C++
                        ->Warning Level:
                                None
                                Level 1*
                                Level 2
                                Level 3 <- With this warning level it's
enough for not seeing that warning
                                Level 4

But I think ( personal opinion ) that it isn't good idea to reduce
warning levels, I have up and ALWAYS the maximum level, for finding
potential "running errors".

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

Date:    Mon, 14 Dec 1998 09:16:38 -0500
From:    Robert Twitty <rtwitty@USHMM.ORG>
Subject: Re: How do I write a "blank" to a ODBC field

Use SQLBindParameter instead, and if there is no date then set the
binded Length/Indicator variable to SQL_NULL_DATA prior to running
SQLExecute()

-- bob

On Sun, 13 Dec 1998, Mark Usher wrote:

> Hi all
>
> I have a fixed ODBC "Insert Into" statement. Sometimes a date is entered and
> sometimes it isn't. The date is not a required field in the database.
>
> I get the date by using the following
>
> DATE_STRUCT actstart;
> short int ordyear = 0;
> short int ordmth = 0;
> short int ordday = 0;
>
> sscanf(tempdate, "%d.%d.%d", &ordday, &ordmth, &ordyear);
> actstart.year = ordyear;
> actstart.month = ordmth;
> actstart.day = ordday;
>
> ...
> // check to see if a date was entered
> if (actstart.year ==0 || actstart.month ==0 || actstart.day ==0)
>    retcode = SQLSetParam(hstmt_OrderSpec, 12, SQL_C_DATE, SQL_DATE, 0, 0,
> NULL, NULL);
> else
>    retcode = SQLSetParam(hstmt_OrderSpec, 12, SQL_C_DATE, SQL_DATE, 0, 0,
> &actstart, NULL);
>
>
> Unfortunately this doesn't quite work. Can anyone put me on the right track
> ?
>
> Mark Usher
> marku@magnet.at
>
> --------------------------------------------------------------------------
> 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:    Mon, 14 Dec 1998 19:44:44 -0000
From:    Rajesh R <rajr@FUTURE.FUTSOFT.COM>
Subject: how to get HWND_OBJECT

Hi
How to get the Object window handle in WindowsNT 4 VC5.0?
Like I can set the parent of a window as DesktopWindow, I want to set the paren
of the window as Object Window. Is it possible.


Thanks in advance
R.Rajesh

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

Date:    Mon, 14 Dec 1998 16:16:23 +0100
From:    =?iso-8859-1?Q?Anders_W=E5hlin?= <wahlin@ERV.ERICSSON.SE>
Subject: SQLConnect AND UNICODE?

Hello.

I'm writing a NT-service that should connect to a SQL server using ODBC. The
service is using UNICODE. When I call SQLConnect like this:

        error = SQLConnectW(hConnection, _T("TESTDS"), SQL_NTSL, _T(""),
SQL_NTSL, _T(""), SQL_NTSL);

I recieve an error saying that the data source name couldn't be found. This
is not true since I know that the data source name "TESTDS" exist. I'm not
very good at UNICODE so can anyone tell me what I'm missing?

Thanks.

--
Anders Wahlin
System Manager
IT Operations
Ericsson Mobile Data Design AB

Phone: +46 31 7036394
Fax: +46 31 7036033
E-mail: Anders.Wahlin@erv.ericsson.se

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

Date:    Mon, 14 Dec 1998 10:50:17 -0600
From:    Qiang Wu <wuqiang@CS.SIU.EDU>
Subject: unsubscribe


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

Date:    Tue, 15 Dec 1998 09:47:40 +1100
From:    David Roe <dud@SYDNEY.NET>
Subject: excel clipboard/automation

This is a multi-part message in MIME format.

------=_NextPart_000_0031_01BE280F.F49860C0
Content-Type: text/plain;
        charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

I have a programming issue that is now long-standing but one that I =
believe I may have found an answer to. I'd like to check the theory here =
first before implementing.
=20
My application displays it's data in a grid (Formula One from Tidestone, =
formerly Visual Components). Although the grid OCX has the ability to =
write it's data in Excel format, copying to the clipboard is a different =
matter. Text is copied across with no formatting whatsoever. My aim is =
to be able to represent my application's data in Excel exactly as it is =
displayed in my application - this includes font formatting, text =
alignment, borders around cells, and fill colour.
=20
OLE automation seems the way to go but I don't want to perform this task =
every time the user copies to the clipboard. What if Excel isn't =
running? Wouldn't this fire up an instance of Excel for the task? =
Undesirable if the intended destination for the data is not Excel.
=20
So I've come up with the idea of using delayed rendering for the =
clipboard. The data is placed on the clipboard in numerous formats, but =
the "excel" format is not provided until it is requested. Once this =
particular format is pasted, I expect to receive a notification that it =
is required. At this point, I can attach to the (already running) =
instance of Excel that has requested the data and, using OLE automation, =
create the data (perhaps in a hidden sheet whose data is then placed on =
the clipboard for pasting).
=20
Would anyone like to offer an opinion on this approach? Possible =
pitfalls or improvements?
=20
Rgds,
/David
-----------------------
David Roe
Focus Consulting
david@focus-consulting.co.uk
dud@sydney.net
=20

------=_NextPart_000_0031_01BE280F.F49860C0
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 5.00.0910.1309"' name=3DGENERATOR></HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>
<DIV><FONT color=3D#000000 face=3DArial size=3D2>I have a programming =
issue that is=20
now long-standing but one that I believe I may have found an answer to. =
I'd like=20
to check the theory here first before implementing.</FONT></DIV>
<DIV><FONT color=3D#000000 face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#000000 face=3DArial size=3D2>My application displays =
it's data in=20
a grid (Formula One from Tidestone, formerly Visual Components). =
Although the=20
grid OCX has the ability to write it's data in Excel format, copying to =
the=20
clipboard is a different matter. Text is copied across with no =
formatting=20
whatsoever. My aim is to be able to represent my application's data in =
Excel=20
exactly as it is displayed in my application - this includes font =
formatting,=20
text alignment, borders around cells, and fill colour.</FONT></DIV>
<DIV><FONT color=3D#000000 face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#000000 face=3DArial size=3D2>OLE automation seems =
the way to go=20
but I don't want to perform this task every time the user copies to the=20
clipboard. What if Excel isn't running? Wouldn't this fire up an =
instance of=20
Excel for the task? Undesirable if the intended destination for the data =
is not=20
Excel.</FONT></DIV>
<DIV><FONT color=3D#000000 face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#000000 face=3DArial size=3D2>So I've come up with =
the idea of=20
using delayed rendering for the clipboard. The data is placed on the =
clipboard=20
in numerous formats, but the &quot;excel&quot; format is not provided =
until it=20
is requested. Once this particular format is pasted, I expect to receive =
a=20
notification that it is required. At this point, I can attach to the =
(already=20
running) instance of Excel that has requested the data and, using OLE=20
automation, create the data (perhaps in a hidden sheet whose data is =
then placed=20
on the clipboard for pasting).</FONT></DIV>
<DIV><FONT color=3D#000000 face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#000000 face=3DArial size=3D2>Would anyone like to =
offer an opinion=20
on this approach? Possible pitfalls or improvements?</FONT></DIV>
<DIV><FONT color=3D#000000 face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#000000 face=3DArial size=3D2>Rgds,</FONT></DIV>
<DIV><FONT color=3D#000000 face=3DArial size=3D2>/David</FONT></DIV>
<DIV><FONT color=3D#000000 face=3DArial =
size=3D2>-----------------------</FONT></DIV>
<DIV><FONT color=3D#000000 face=3DArial size=3D2>David Roe</FONT></DIV>
<DIV><FONT color=3D#000000 face=3DArial size=3D2>Focus =
Consulting</FONT></DIV>
<DIV><FONT color=3D#000000 face=3DArial size=3D2><A=20
href=3D"mailto:david@focus-consulting.co.uk">david@focus-consulting.co.uk=
</A></FONT></DIV>
<DIV><FONT color=3D#000000 face=3DArial size=3D2><A=20
href=3D"mailto:dud@sydney.net">dud@sydney.net</A></FONT></DIV>
<DIV><FONT color=3D#000000 face=3DArial=20
size=3D2></FONT>&nbsp;</DIV></FONT></DIV></BODY></HTML>

------=_NextPart_000_0031_01BE280F.F49860C0--

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

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


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

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