1 | /*
|
---|
2 | * This program is free software; you can redistribute it and/or modify
|
---|
3 | * it under the terms of the GNU General Public License as published by
|
---|
4 | * the Free Software Foundation; either version 2, or (at your option)
|
---|
5 | * any later version.
|
---|
6 | *
|
---|
7 | * This program is distributed in the hope that it will be useful,
|
---|
8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
10 | * GNU General Public License for more details.
|
---|
11 | *
|
---|
12 | * You should have received a copy of the GNU General Public License
|
---|
13 | * along with this program; see the file COPYING. If not, write to
|
---|
14 | * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
|
---|
15 | */
|
---|
16 | /*
|
---|
17 | * If you need another license for your project/product (commercial,
|
---|
18 | * noncommercial, whatever) contact me at
|
---|
19 | *
|
---|
20 | * http://www.os2world.com/cdwriting
|
---|
21 | * http://www.geocities.com/SiliconValley/Sector/5785/
|
---|
22 | *
|
---|
23 | */
|
---|
24 |
|
---|
25 |
|
---|
26 | /* Used for sending a click event from the time control to the play control */
|
---|
27 | #define NOTIFY_CLICK 1 /* For WM_APPTERMINATENOTIFY */
|
---|
28 | /* Same for context menu */
|
---|
29 | #define NOTIFY_CONTEXT 2
|
---|
30 |
|
---|
31 | /* Which display to show */
|
---|
32 | #define DISPLAY_TIMEELAPSED 0
|
---|
33 | #define DISPLAY_TIMEREMAINING 1
|
---|
34 | #define DISPLAY_TIMEID3 2
|
---|
35 |
|
---|
36 | /* Which track to start */
|
---|
37 | #define PLAY_FIRST 1L
|
---|
38 | #define PLAY_NEXT 2L
|
---|
39 | #define PLAY_PREV 3L
|
---|
40 | #define PAUSE_TRACK 4L
|
---|
41 | #define STOP_TRACK 5L
|
---|
42 | #define SEEK_TRACK 6L
|
---|
43 |
|
---|
44 | #define MAIN_BMP_IDX 0
|
---|
45 | #define CTRLIDX_PLAYBUTTON 1
|
---|
46 | #define CTRLIDX_PLAYBUTTONSEL 2
|
---|
47 | #define CTRLIDX_STOPBUTTON 3
|
---|
48 | #define CTRLIDX_STOPBUTTONSEL 4
|
---|
49 | #define CTRLIDX_PAUSEBUTTON 5
|
---|
50 | #define CTRLIDX_PAUSEBUTTONSEL 6
|
---|
51 | #define CTRLIDX_POSSLIDER 7
|
---|
52 | #define CTRLIDX_POSSLIDERARM 8
|
---|
53 | #define CTRLIDX_PLAYTIME 9
|
---|
54 | #define CTRLIDX_VOLSLIDER 10
|
---|
55 | #define CTRLIDX_VOLSLIDERARM 11
|
---|
56 | #define CTRLIDX_VOLSLIDERARMSEL 12
|
---|
57 |
|
---|
58 | #if 0
|
---|
59 | #define CTRLIDX_TOPLEFT 7
|
---|
60 | #define CTRLIDX_TOPRIGHT 8
|
---|
61 | #define CTRLIDX_BOTTOM 19
|
---|
62 | #define CTRLIDX_CHECK 20
|
---|
63 | #define CTRLIDX_UNCHECK 21
|
---|
64 | #define CTRLIDX_CHECKSEL 22
|
---|
65 | #define CTRLIDX_UNCHECKSEL 23
|
---|
66 | #define CTRLIDX_RANDOMCHECK 24
|
---|
67 | #define CTRLIDX_RANDOMUNCHECK 25
|
---|
68 | #define CTRLIDX_RANDOMCHECKSEL 26
|
---|
69 | #define CTRLIDX_RANDOMUNCHECKSEL 27
|
---|
70 | #endif
|
---|
71 |
|
---|
72 | #define NUM_CTRL_IDX 13
|
---|
73 |
|
---|
74 | /* Slider window class name */
|
---|
75 | #define SLIDER_CLASS "CWSLIDER"
|
---|
76 |
|
---|
77 | /* New slider window class */
|
---|
78 | /* Data positions in the window words */
|
---|
79 | #define SLIDERARMWIDTH 0 /* USHORT */
|
---|
80 | #define SLIDERARMHEIGHT 2 /* USHORT */
|
---|
81 | #define PTRPOSINSLARM 4 /* USHORT */
|
---|
82 | #define SLINCREMENTS 6 /* USHORT */
|
---|
83 | #define SLIDERCX 8 /* ULONG */
|
---|
84 | #define SLIDERCY 12 /* ULONG */
|
---|
85 | #define SLIDERX 16 /* ULONG */
|
---|
86 | #define SLIDERY 20 /* ULONG */
|
---|
87 | #define SLIDERARMPOS 24 /* LONG */
|
---|
88 | #define SLDRAGGING 28 /* BOOL */
|
---|
89 | #define SLADDBYTES 32 /* num additional window bytes for slider */
|
---|
90 |
|
---|
91 | typedef struct
|
---|
92 | {
|
---|
93 | INT id;
|
---|
94 | RECTL rclSource;
|
---|
95 | HBITMAP hbmSource;
|
---|
96 | RECTL rclDest;
|
---|
97 | }CONTROLINFO;
|
---|
98 |
|
---|
99 | typedef struct
|
---|
100 | {
|
---|
101 | BITMAPINFOHEADER bmpInfoHdr;
|
---|
102 | HBITMAP hbm;
|
---|
103 | }LOADEDBITMAP;
|
---|
104 |
|
---|
105 | /* The IDs for the playtime display */
|
---|
106 | #define IDTIMER_PLAY 5L
|
---|
107 | #define PLAYTIMER_DELAY 1000
|
---|
108 |
|
---|
109 | #define IDTIMER_START_PLAYING 6L
|
---|
110 | #define START_TIMEOUT 500
|
---|