荔园在线

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

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


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

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

Topics of the day:

  1. Tray Icon Vanishing
  2. Ugly Bitmap in Resource Editor
  3. Ugly Bitmap in Resource Editor - Nevermind!
  4. using a scrollbar as a slider control

--------------------------------------------------------------------------
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 12:56:40 -0000
From:    "-=< Duckie >=-" <duckie@MYMAIL.COM>
Subject: Tray Icon Vanishing

WinNT4, MSVC6, MFC

I am using Shell_NotifyIcon( NIM_ADD, &nid ) to drop an icon for my app into
the task tray. The values for 'nid' are as follows:

 m_nid.cbSize = sizeof( NOTIFYICONDATA );
 m_nid.hWnd = m_hWnd;
 m_nid.uID = 0;
 m_nid.uFlags = NIF_ICON | NIF_TIP | NIF_MESSAGE;
 m_nid.uCallbackMessage = WM_TRAY_NOTIFICATION;
 m_nid.hIcon = m_hIcon;

 strcpy( m_nid.szTip, "Title" );

WM_TRAY_NOTIFICATION is defined as WM_USER+25.

I trap this messages using ON_MESSAGE( ..., OnTrayNotification )

Anyway - this all becomes irrelevant because when I minimize my application,
I add a tray icon in OnSize() and then ShowWindow( SW_HIDE ).

The Problem: As soon as I move my mouse over the tray icon, it vanishes and
my window is still hidden. I want to trap the click event of the tray icon
and make my window re-appear. I put a message box in OnTrayNotification to
see if maybe mouse moves were coming in but I don't get a single
notification.

Does anyone know what might be going on here? I have done this before but
this is the first time I've done it in WinNT, with MSVC 6

Thanks

-=< Darryl >=-

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

Date:    Sat, 16 Jan 1999 12:59:08 -0000
From:    "Darryl G. Wright" <darrylwright@MYMAIL.COM>
Subject: Ugly Bitmap in Resource Editor

I have a 256 colour bitmap with my company's logo on it that I want to drop
onto the About dialog. I insert it into a new Bitmap in the resources and it
looks great. I drop a static onto the about box and change it's properties
to 'Bitmap' and set the ID to the same as my Bitmap...but it shows up
butt-ugly with what looks like 16 colours or something - yech! Anyone know
how to fix this?

Thanks

-=< Darryl >=-

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

Date:    Sat, 16 Jan 1999 13:12:16 -0000
From:    "Darryl G. Wright" <darrylwright@MYMAIL.COM>
Subject: Re: Ugly Bitmap in Resource Editor - Nevermind!

I found the problem - it seems that 'Pasting' the bitmap into the MSVC
resource editor just doesn't cut it. When I save from my paint program as a
256 colour bitmap into a file and then import the bitmap, it works fine.

Perhaps someone else might be able to shed some light on 'why' this is so.

Thanks

-=< Darryl >=-

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

Date:    Sun, 17 Jan 1999 14:58:22 +1300
From:    Rimu Atkinson <rimu1@XTRA.CO.NZ>
Subject: using a scrollbar as a slider control

This is a multi-part message in MIME format.

------=_NextPart_000_000E_01BE4229.D4352E60
Content-Type: text/plain;
        charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

vc++ 97, mfc

I want to use a scrollbar in the place of a spin control (to change the
value of an edit box) because of the extra functionality it could offer for
adjustment over large ranges of values. However, I can't use the
SpinCtrl::SetBuddy member function with a scroll bar, as scroll bars don't
have any SetBuddy member function.

has anyone dealt with this situation before, or can anyone see the way
through here.

cheers,

Rimu Atkinson
http://www.fortunecity.com/campus/economics/700/index.html
ICQ # 26458113

------=_NextPart_000_000E_01BE4229.D4352E60
Content-Type: text/x-vcard;
        name="Rimu Atkinson.vcf"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
        filename="Rimu Atkinson.vcf"

BEGIN:VCARD
VERSION:2.1
N:Atkinson;Rimu
FN:Rimu Atkinson
TEL;HOME;VOICE:64 06 8783507
TEL;HOME;FAX:64 06 8783507
ADR;HOME:;;708 Fitzroy Ave;Hastings;;;New Zealand
LABEL;HOME;ENCODING=3DQUOTED-PRINTABLE:708 Fitzroy =
Ave=3D0D=3D0AHastings=3D0D=3D0ANew Zealand
URL:http://www.fortunecity.com/campus/economics/700/index.html
EMAIL;PREF;INTERNET:rimu@thenet.co.nz
REV:19990117T015808Z
END:VCARD

------=_NextPart_000_000E_01BE4229.D4352E60--

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

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


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

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