荔园在线

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

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


发信人: tang (独孤九剑), 信区: Program
标  题: MSVC Digest - 19 May 1998 to 20
发信站: BBS 荔园晨风站 (Thu May 21 23:55:39 1998), 转信

There are 13 messages totalling 430 lines in this issue.

Topics of the day:

  1. Change the background color (5)
  2. Creating Word documents (4)
  3. CFileDialog
  4. Random Numbers (2)
  5. How to draw a char in the left margin area of the CEdit control?

--------------------------------------------------------------------------
The MSVC list is hosted on a Windows NT(TM) machine running L-Soft
international's LISTSERV(R) software.  For subscription info and archives,
see http://peach.ease.lsoft.com/archives/msvc.html .  For LISTSERV sales
information, see http://www.lsoft.com or write to SALES@LSOFT.COM.

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

Date:    Wed, 20 May 1998 14:24:14 +0800
From:    zeping <zping@INAME.COM>
Subject: Change the background color

Hi,all

        While using SetReadOnly() to the CEdit control, the background color is
become gray. Does anyone know how to prevent this. I want the background
color is white.

Thanks in advance.
zeping

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

Date:    Wed, 20 May 1998 12:05:00 +0000
From:    "Vishwanathan R (SEG2)" <vishwa@NIITDEL1.NIIT.CO.IN>
Subject: Creating Word documents

Environment : Win - 95 , ADO 1.5, VC ++ 5.0

Hi,
 I need to create word documents based on the user input through a GUI. I
don't know were to start. Could some body help me out with this. The GUI
and the coding is to be done in VC 5.00 using MFC.


Thanks and regards
Vishy

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

Date:    Wed, 20 May 1998 11:49:36 +0300
From:    Serge Darii <serged@PETROLBANK.COM>
Subject: Re: Change the background color

Hi,
In order to solve this problem I have done :

1.Derived class from CEdit (CEnhsEdit).
2.Overrided the WM_CTLCOLOR message handler like this:
HBRUSH CEnhsEdit::CtlColor(CDC* pDC, UINT nCtlColor)=20
{
        if(((GetStyle() & ES_READONLY) =3D=3D ES_READONLY ))
                return CBrush(RGB(0,0,0));
        return NULL;
}

After this changes I don't had problems.

Regards,

Serge

----------
> From: zeping <zping@INAME.COM>
> To: MSVC@PEACH.EASE.LSOFT.COM
> Subject: Change the background color
> Date: 20 =EC=E0=FF 1998 =E3. 9:24
>=20
> Hi,all
>=20
>         While using SetReadOnly() to the CEdit control, the background
color is
> become gray. Does anyone know how to prevent this. I want the backgroun=
d
> color is white.
>=20
> Thanks in advance.
> zeping
>=20
>
-------------------------------------------------------------------------=
-
> The MSVC list is hosted on a Windows NT(TM) machine running L-Soft
> international's LISTSERV(R) software.  For subscription info and
archives,
> see http://peach.ease.lsoft.com/archives/msvc.html .  For LISTSERV sale=
s
> information, see http://www.lsoft.com or write to SALES@LSOFT.COM.

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

Date:    Wed, 20 May 1998 12:36:25 +0300
From:    Serge Darii <serged@PETROLBANK.COM>
Subject: Re: Change the background color

Hi,

----------
> Hi,all
>
>         While using SetReadOnly() to the CEdit control, the background
color is
> become gray. Does anyone know how to prevent this. I want the background
> color is white.

In order to solve this problem I have done :

1.Derived class from CEdit (CEnhsEdit).
2.Overrided the WM_CTLCOLOR message handler like this:
HBRUSH CEnhsEdit::CtlColor(CDC* pDC, UINT nCtlColor)
{
        if(((GetStyle() & ES_READONLY) == ES_READONLY ))
                return CBrush(RGB(0,0,0));
        return NULL;
}

After this changes I have no problems.

Best regards,

Serge

>
> Thanks in advance.
> zeping
>
>

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

Date:    Wed, 20 May 1998 08:51:37 -0300
From:    "Darryl G. Wright" <darrylwright@BIGFOOT.COM>
Subject: Re: Creating Word documents

You may wish to head on over to http://www.wotsit.demon.co.uk/index.htm and
find the .DOC file format spec. Try and wrap your head around that - it's a
good place to start.

-=< Darryl >=-

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

Date:    Wed, 20 May 1998 14:26:06 +0100
From:    =?ISO-8859-1?Q?Mats M錸hav ?= <mats.manhav@SWIPNET.SE>
Subject: Re: Creating Word documents

Wednesday, 20 May 98, Vishwanathan wrote:

VRS> Environment : Win - 95 , ADO 1.5, VC ++ 5.0

VRS> Hi,
VRS>  I need to create word documents based on the user input through a GUI.
I
VRS> don't know were to start. Could some body help me out with this. The GUI

VRS> and the coding is to be done in VC 5.00 using MFC.


VRS> Thanks and regards
VRS> Vishy

All programs in the Office family are also automation servers, meaning
that you can use COM functions to create a new document. I am not sure
where to find documentation for this though. Maybe you can search the
http://www.microsoft.com to find some more info.

Best regards,
Mats
mailto:mats.manhav@swipnet.se

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

Date:    Wed, 20 May 1998 09:43:47 -0300
From:    "Darryl G. Wright" <darrylwright@BIGFOOT.COM>
Subject: Re: Creating Word documents

Using COM works great if the user has those office apps installed but if
not - your program can't function. You may want to go to
http://www.wotsit.demon.co.uk/index.htm and get the spec for the DOC file
type. That would be a good place to start. Write some code that will
read/write/manipulate a .DOC file in the absence of MS assistance.

-=< Darryl >=-

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

Date:    Wed, 20 May 1998 11:24:16 -0400
From:    Souad Berrami <souad@PLUTON.LANCI.UQAM.CA>
Subject: CFileDialog

Hi All,

I want to  use a CfileDialog and add to edit area to it. Does antone kow how to
do this.

Thanks a lot

Souad

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

Date:    Thu, 21 May 1998 08:10:08 +0800
From:    zeping <zping@INAME.COM>
Subject: Re: Change the background color

Thanks Serge Darii. When i select the text ,the background color changes
to white, but when i SetWindowText(), it still gray.


Serge Darii wrote:
>
> Hi,
> In order to solve this problem I have done :
>
> 1.Derived class from CEdit (CEnhsEdit).
> 2.Overrided the WM_CTLCOLOR message handler like this:
> HBRUSH CEnhsEdit::CtlColor(CDC* pDC, UINT nCtlColor)
> {
>         if(((GetStyle() & ES_READONLY) == ES_READONLY ))
>                 return CBrush(RGB(0,0,0));
>         return NULL;
> }
>
> After this changes I don't had problems.
>
> Regards,
>
> Serge
>

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

Date:    Wed, 20 May 1998 15:23:43 +0300
From:    hany <hany@FREESTAMP.COM>
Subject: Random Numbers

This is a multi-part message in MIME format.

------=_NextPart_000_0075_01BD8403.4690B960
Content-Type: text/plain;
        charset="iso-8859-6"
Content-Transfer-Encoding: quoted-printable

Hi ,=20

How do I make random numbers each time my program starts.


Thanks.


------=_NextPart_000_0075_01BD8403.4690B960
Content-Type: text/html;
        charset="iso-8859-6"
Content-Transfer-Encoding: quoted-printable

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

<META content=3D"text/html; charset=3Dwindows-1256" =
http-equiv=3DContent-Type>
<META content=3D'"MSHTML 4.72.2201.0"' name=3DGENERATOR>
</HEAD>
<BODY bgColor=3D#c0c0c0>
<DIV><FONT size=3D4>
<P align=3Dleft><FONT size=3D2>Hi , </FONT></P>
<P align=3Dleft><FONT size=3D2></FONT><FONT size=3D2>How
 do I make =
random numbers each=20
time my program starts.</FONT></P>
<P align=3Dleft><FONT size=3D2></FONT></P>
<P align=3Dleft><FONT =
size=3D2>Thanks.</FONT></FONT></P></DIV></BODY>
</HTML>

------=_NextPart_000_0075_01BD8403.4690B960--

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

Date:    Thu, 21 May 1998 10:22:23 +0900
From:    =?EUC-KR?B?wPy8usij?= <shjun@LGIS.LG.CO.KR>
Subject: Re: Change the background color

This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------ =_NextPart_000_01BD84A2.5D1F6970
Content-Type: text/plain; charset="ISO-2022-KR"
Content-Transfer-Encoding: 7bit

 $)C

        use SetBkMode( TRANSPARENT ) .

        example )
                CDC *pdc = GetDC() ;

                pdc->SetBkMode( TRANSPARENT ) ;
                pdc->SetWindowText( ... ) ;



                ?):8<<?d .  3*@G C5;g .  >n6;0T 3; 86@=@; HICF3*?d .
                1&Bz>F?d .  3*@G C5;g .  0!A.0# 1W 86@= 0m@L 0#AwGX A`?d .

            -------------------------------------------------
                                     "Always  9Y6w59@L " ?4=@4O4Y .
                                   E-mail : shjun@lgis.lg.co.kr
                                                  Tel      : 0551-69-
4759
                                                  PCS    : 019-598-6245
            -------------------------------------------------

>----------
>From:  zeping[SMTP:zping@INAME.COM]
>Sent:  Thursday, May 21, 1998 9:10 AM
>To:    MSVC@PEACH.EASE.LSOFT.COM
>Subject:       Re: Change the background color
>
>Thanks Serge Darii. When i select the text ,the background color changes
>to white, but when i SetWindowText(), it still gray.
>
>
>Serge Darii wrote:
>>
>> Hi,
>> In order to solve this problem I have done :
>>
>> 1.Derived class from CEdit (CEnhsEdit).
>> 2.Overrided the WM_CTLCOLOR message handler like this:
>> HBRUSH CEnhsEdit::CtlColor(CDC* pDC, UINT nCtlColor)
>> {
>>         if(((GetStyle() & ES_READONLY) == ES_READONLY ))
>>                 return CBrush(RGB(0,0,0));
>>         return NULL;
>> }
>>
>> After this changes I don't had problems.
>>
>> Regards,
>>
>> Serge
>>
>
>--------------------------------------------------------------------------
>The MSVC list is hosted on a Windows NT(TM) machine running L-Soft
>international's LISTSERV(R) software.  For subscription info and archives,
>see http://peach.ease.lsoft.com/archives/msvc.html .  For LISTSERV sales
>information, see http://www.lsoft.com or write to SALES@LSOFT.COM.
>

------ =_NextPart_000_01BD84A2.5D1F6970--

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

Date:    Thu, 21 May 1998 10:02:37 +0800
From:    zeping <zping@INAME.COM>
Subject: How to draw a char in the left margin area of the CEdit control?

Thanks for the help of my background color question first. Now it's OK.

But there is another question needs your help. That is how to draw a
char in the left margin area of the CEdit control? In VC edit window, it
can mark all the lines which contains the finding string? How to do
this?

Thanks for your help in advance.
zeping
zping@iname.com

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

Date:    Thu, 21 May 1998 09:22:19 +0500
From:    "L.Balaji" <balajil@TULBLR.UNISYS.COM>
Subject: Re: Random Numbers

Try to make use of system time



>**--->Hi ,
>**--->
>**--->How do I make random numbers each time my program starts.
>**--->
>**--->
>**--->Thanks.
>**--->
>**--->

****************************************************************************
GOOD PROGRAMMING AND GOOD DESIGN ARE RESULTS OF TASTE, INSIGHT AND
EXPERIENCE

        -Stoustrup

L.Balaji                                        balajil@tulblr.unisys.com
Software Engineer
Tata Infotech Ltd.
Bangalore.

****************************************************************************

  ,d88b.d88b,     ,d88b.d88b,     ,d88b.d88b,     ,d88b.d88b,     ,d88b.d88b,
  88888888888     88888888888     88888888888     88888888888     88888888888
  `Y8888888Y'     `Y8888888Y'     `Y8888888Y'     `Y8888888Y'     `Y8888888Y'
    `Y888Y'         `Y888Y'         `Y888Y'         `Y888Y'         `Y888Y'
      `Y'             `Y'             `Y'             `Y'             `Y'

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

End of MSVC Digest - 19 May 1998 to 20 May 1998 (#1998-135)
***********************************************************
--
        There are these few times I feel lonely for you.
        But I know this shade of blue will soon pass through!
        I must be strong without you by my side!
        I can see forever you are my light.

※ 来源:.BBS 荔园晨风站 bbs.szu.edu.cn.[FROM: 192.168.0.4]


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

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