TIP: Click on subject to list as thread! ANSI
echo: semware
to: All
from: `Sammy Mitchell`
date: 2003-01-24 06:28:36
subject: [TSEPro] Re: Changing the TSEPro icon

From: "Sammy Mitchell" 
@Date: Thu, 23 Jan 2003 14:58:36 -0500
@Sender: semware-owner{at}sawasdi.apana.org.au



>Different Icons are needed for different versions of Tse.
>
>So I would very much like to change the icon for different
>versions of Tse, not only on the desktop, but the icon that
>Tse sets for the task bar.
>
>How about yet another environment variable: Set (IconFile,
>"C:\TSE\TseConsole.ico")

How about something like the following.  This macro can
interactively change the editors large and small icons.
Note: you must change icon_fn[] to suite your needs:

----------------- cut here ---------------------------------
/**********************************************************
 Change the editors large and small icons for the current
 editing session.
 ***********************************************************/
dll ""
    integer proc SendMessage(integer hwnd, integer msg, integer wparam,
integer lparam) : "SendMessageA"
    integer proc LoadImage(integer hinst, string s:cstrval, integer
type, integer cx, integer cy, integer flag) : "LoadImageA"
end

#define IMAGE_ICON 1
#define LR_LOADFROMFILE 16
#define WM_SETICON 128
#define ICON_BIG 1
#define ICON_SMALL 0
#define NULL 0

string icon_fn[] = "d:\lastcon\e\gedit.ico"

proc main()
    integer big_icon, small_icon
    integer hwnd = GetWinHandle()

    big_icon = LoadImage(NULL, icon_fn, IMAGE_ICON, 32, 32,
LR_LOADFROMFILE)
    if big_icon
        SendMessage(hwnd, WM_SETICON, ICON_BIG, big_icon)
    else
        MsgBox("Error", "Could not load large icon!")
    endif

    small_icon = LoadImage(NULL, icon_fn, IMAGE_ICON, 16, 16,
LR_LOADFROMFILE)
    if small_icon
        SendMessage(hwnd, WM_SETICON, ICON_SMALL, small_icon)
    else
        MsgBox("Error", "Could not load small icon!")
    endif
end
----------------- cut here ---------------------------------


--
TSEPro mailing list



---
[sawasdi.apana.org.au] (3:800/846.13)
* Origin: apana>>>>>fidonet
SEEN-BY: 633/267 270
@PATH: 800/846 1 640/954 774/605 123/500 106/1 379/1 633/267

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.