Official eMule-Board: Possible Bug In Traydialog.cpp - Official eMule-Board

Jump to content


Page 1 of 1

Possible Bug In Traydialog.cpp TraySetIcon() functions...

#1 User is offline   Avi-3k 

  • hebMule [retired] dev
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 1127
  • Joined: 25-June 03

Posted 17 October 2005 - 02:56 PM

in TrayDialog.cpp the last 2 versions of TraySetIcon()
are missing the sending of the second argument bDelete,
old code:

Quote

...
void CTrayDialog::TraySetIcon(UINT nResourceID, bool bDelete)
{
  TraySetIcon(AfxGetApp()->LoadIcon(nResourceID));
}

void CTrayDialog::TraySetIcon(LPCTSTR lpszResourceName, bool bDelete)
{
  TraySetIcon(AfxGetApp()->LoadIcon(lpszResourceName));
}
...


new code:

Quote

...
void CTrayDialog::TraySetIcon(UINT nResourceID, bool bDelete)
{
  TraySetIcon(AfxGetApp()->LoadIcon(nResourceID), bDelete /* Avi3k: fix arg */);
}

void CTrayDialog::TraySetIcon(LPCTSTR lpszResourceName, bool bDelete)
{
  TraySetIcon(AfxGetApp()->LoadIcon(lpszResourceName), bDelete /* Avi3k: fix arg */);
}
...


since the default value is false, it might cause the icon
not to be destroyed but i haven't checked the calls to
these functions so i'm not sure if that's intentional or a bug :P

Avi3k
retired developer of hebMule and eMule Skinner...
hebMule site and topic.
hebMule2 unique features: AntiLeech, AntiVirus, Fake Check, ServerFilter, WebSearches, Export Searches, Relative Priority, ModID and much much more...

eMule Skinner is an application to create/edit skins for eMule,
it's multilingual, supports mods, easy-to-use design, integrates to hebMule & Windows and lots more...

code fixes/improvements: #1, #2, #3, #4, #5, #6, #7, #8, #9, #10, #11 (to check/verify: #12, #13).
0

#2 User is offline   tHeWiZaRdOfDoS 

  • Man, what a bunch of jokers...
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 5630
  • Joined: 28-December 02

Posted 18 October 2005 - 08:49 PM

Those functions are never called and could/should(?) be removed *g*
Good eye, however :flowers:
0

#3 User is offline   Avi-3k 

  • hebMule [retired] dev
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 1127
  • Joined: 25-June 03

Posted 18 October 2005 - 09:38 PM

tHeWiZaRdOfDoS said:

Good eye, however :flowers:

and i didn't even use my glasses :lol:

Avi3k
retired developer of hebMule and eMule Skinner...
hebMule site and topic.
hebMule2 unique features: AntiLeech, AntiVirus, Fake Check, ServerFilter, WebSearches, Export Searches, Relative Priority, ModID and much much more...

eMule Skinner is an application to create/edit skins for eMule,
it's multilingual, supports mods, easy-to-use design, integrates to hebMule & Windows and lots more...

code fixes/improvements: #1, #2, #3, #4, #5, #6, #7, #8, #9, #10, #11 (to check/verify: #12, #13).
0

#4 User is offline   Tuxman 

  • lizzie and prog-rock fanatic
  • PipPipPipPipPipPipPip
  • Group: Validating
  • Posts: 2707
  • Joined: 26-July 04

Posted 19 October 2005 - 06:17 AM

Of course it is called...

eMuleDlg.cpp:
	if (m_icoSysTrayCurrent)
  TraySetIcon(m_icoSysTrayCurrent, true);

[ eMule beba ] :: v2.72 released, v3.00 in the works ...
- feel the lightweight! - featuring Snarl support, the Client Analyzer and tits!
Coded by a Golden eMule Award winner and most people's favorite modder!
..........................................
Music, not muzak:
Progressive Rock :: my last.fm profile
..........................................
eMule user since 0.28 ...
-[ ... and thanks for all the fish! ]-
0

#5 User is offline   Avi-3k 

  • hebMule [retired] dev
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 1127
  • Joined: 25-June 03

Posted 19 October 2005 - 08:03 AM

@Tuxman
the versions we were talking about are with
the LPCTSTR & UINT first argument, which call
the version u r talking about, with the HICON...

Avi3k
retired developer of hebMule and eMule Skinner...
hebMule site and topic.
hebMule2 unique features: AntiLeech, AntiVirus, Fake Check, ServerFilter, WebSearches, Export Searches, Relative Priority, ModID and much much more...

eMule Skinner is an application to create/edit skins for eMule,
it's multilingual, supports mods, easy-to-use design, integrates to hebMule & Windows and lots more...

code fixes/improvements: #1, #2, #3, #4, #5, #6, #7, #8, #9, #10, #11 (to check/verify: #12, #13).
0

#6 User is offline   Tuxman 

  • lizzie and prog-rock fanatic
  • PipPipPipPipPipPipPip
  • Group: Validating
  • Posts: 2707
  • Joined: 26-July 04

Posted 19 October 2005 - 09:07 AM

:huh: oh... okay. :flowers:

Human error. :D
[ eMule beba ] :: v2.72 released, v3.00 in the works ...
- feel the lightweight! - featuring Snarl support, the Client Analyzer and tits!
Coded by a Golden eMule Award winner and most people's favorite modder!
..........................................
Music, not muzak:
Progressive Rock :: my last.fm profile
..........................................
eMule user since 0.28 ...
-[ ... and thanks for all the fish! ]-
0

  • Member Options

Page 1 of 1

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users