How do you add and ICON to the Status Bar - Win 1.5 
Author Message
 How do you add and ICON to the Status Bar - Win 1.5

Need to know how I place an ICON in the status bar next to my title of the
window.  I use the following line of code for my title.
I developed an ICON names RES.ICO and need to know how to place that icon next
to my title.

StrCopy(WindowTitle, ' Main Menu');
  InitWinCrt;

Thanks



Wed, 18 Jun 1902 08:00:00 GMT  
 How do you add and ICON to the Status Bar - Win 1.5
Hi
Take a look on this example :

{$R iconmin.res}    (* Add the Res-file to the program *)

uses WinTypes, WinProcs, OWindows;
const
  id_Icon = 'APPICON';   { Icon resource ID name. (The name of the Icon in
the Res-file)  }
type
  MinApplication = object(TApplication)
    procedure InitMainWindow; virtual;
  end;

  PMinWindow = ^MinWindow;
  MinWindow = object(TWindow)
    procedure GetWindowClass(var AWndClass: TWndClass); virtual;
  end;

procedure MinApplication.InitMainWindow;
begin
  MainWindow := New(PMinWindow, Init(nil, 'IconMin'))
end;

{- Modify window class to use custom icon }
procedure MinWindow.GetWindowClass(var AWndClass: TWndClass);
begin
  TWindow.GetWindowClass(AWndClass);
  AWndClass.HIcon := LoadIcon(HInstance, id_Icon)
end;

var
  MinApp: MinApplication;
begin
  MinApp.Init('MinApp');
  MinApp.Run;
  MinApp.Done
end.

Quote:

>Need to know how I place an ICON in the status bar next to my title of the
>window.  I use the following line of code for my title.
>I developed an ICON names RES.ICO and need to know how to place that icon
next
>to my title.

>StrCopy(WindowTitle, ' Main Menu');
>  InitWinCrt;

>Thanks




Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Adding an ICON to the Status Bar in TPW 1.5

2. Adding an Icon to my Window Bar - Win 1.5

3. WIN 1.5, Icon question (place icon in title window

4. TPW 1.5 - Adding an ICON to the TITLE WINDOW

5. WIN 1.5 - ICON in Window

6. Adding an icon to the WIN95 Tray from TPW 1.5

7. Add new title bar icon - how?

8. How do I use a Progress Bar / Status Bar

9. Status bar and TQuery

10. reading the start-status-bar

11. status bar

12. showing a 'status bar'

 

 
Powered by phpBB® Forum Software