1 | /*
|
---|
2 | * (C) Chris Wohlgemuth 2002-2004
|
---|
3 | *
|
---|
4 | */
|
---|
5 | /*
|
---|
6 | * This program is free software; you can redistribute it and/or modify
|
---|
7 | * it under the terms of the GNU General Public License as published by
|
---|
8 | * the Free Software Foundation; either version 2, or (at your option)
|
---|
9 | * any later version.
|
---|
10 | *
|
---|
11 | * This program is distributed in the hope that it will be useful,
|
---|
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
14 | * GNU General Public License for more details.
|
---|
15 | *
|
---|
16 | * You should have received a copy of the GNU General Public License
|
---|
17 | * along with this program; see the file COPYING. If not, write to
|
---|
18 | * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
|
---|
19 | */
|
---|
20 | /*
|
---|
21 | * If you need another license for your project/product contact me at
|
---|
22 | *
|
---|
23 | * http://www.os2world.com/cdwriting
|
---|
24 | * http://www.geocities.com/SiliconValley/Sector/5785/
|
---|
25 | */
|
---|
26 |
|
---|
27 | /*
|
---|
28 | * This file was generated by the SOM Compiler and Emitter Framework.
|
---|
29 | * Generated using:
|
---|
30 | * SOM Emitter emitctm: 2.42
|
---|
31 | */
|
---|
32 |
|
---|
33 | #ifndef SOM_Module_cwmpg_Source
|
---|
34 | #define SOM_Module_cwmpg_Source
|
---|
35 | #endif
|
---|
36 | #define CWMPG_Class_Source
|
---|
37 | #define M_CWMPG_Class_Source
|
---|
38 |
|
---|
39 | #define INCL_PM
|
---|
40 | #include <os2.h>
|
---|
41 | #include "helpid.h"
|
---|
42 | #include "cwmpg.ih"
|
---|
43 |
|
---|
44 | extern char chrHelpLibrary[CCHMAXPATH];
|
---|
45 |
|
---|
46 | HMODULE queryResModuleHandle(void);
|
---|
47 | HMODULE queryModuleHandle(void);
|
---|
48 | BOOL getMessage(char* text,ULONG ulID, LONG lSizeText, HMODULE hResource,HWND hwnd);
|
---|
49 | ULONG launchPMProg(PSZ pszTitle, PSZ wrapperExe, PSZ parameters, CWMMDataFile *thisPtr, ULONG ulView);
|
---|
50 |
|
---|
51 |
|
---|
52 | /*
|
---|
53 | * SOM_Scope HWND SOMLINK cwmpg_wpOpen(CWMPG *somSelf, HWND hwndCnr,
|
---|
54 | * ULONG ulView, ULONG param)
|
---|
55 | */
|
---|
56 |
|
---|
57 | /*
|
---|
58 | * The prototype for cwmpg_wpOpen was replaced by the following prototype:
|
---|
59 | */
|
---|
60 | SOM_Scope HWND SOMLINK cwmpg_wpOpen(MMMPG *somSelf, HWND hwndCnr,
|
---|
61 | ULONG ulView, ULONG param)
|
---|
62 | {
|
---|
63 | /* CWMPGData *somThis = CWMPGGetData(somSelf); */
|
---|
64 | MMMPGMethodDebug("MMMPG","cwmpg_wpOpen");
|
---|
65 |
|
---|
66 | switch(ulView)
|
---|
67 | {
|
---|
68 | case ID_MENU_START:
|
---|
69 | case ID_MENU_PLAYER:
|
---|
70 | /*case 0xbbe5: Player */
|
---|
71 | {
|
---|
72 | char chrPlayer[CCHMAXPATH]={0};
|
---|
73 | char chrParams[CCHMAXPATH+2]="\"";
|
---|
74 | char chrTitle[50];
|
---|
75 | char *chrPtr=chrParams;
|
---|
76 | ULONG ulSize;
|
---|
77 | ULONG ulRc;
|
---|
78 |
|
---|
79 | if(!PrfQueryProfileString(HINI_USERPROFILE, "CWMM", "mpgplayer", NULLHANDLE, chrPlayer,
|
---|
80 | sizeof(chrPlayer)))
|
---|
81 | PrfQueryProfileString(HINI_USERPROFILE, "CWMM", "vb", "vb.exe", chrPlayer,
|
---|
82 | sizeof(chrPlayer));
|
---|
83 |
|
---|
84 | chrPtr++;
|
---|
85 | ulSize=sizeof(chrParams)-2;
|
---|
86 | _wpQueryRealName(somSelf, chrPtr, &ulSize, TRUE);
|
---|
87 | strcat(chrPtr,"\"");
|
---|
88 |
|
---|
89 | /* Get the Title for the window list */
|
---|
90 | if(!getMessage(chrTitle, IDSTR_VIDPLAYERTITLE, sizeof(chrTitle), queryResModuleHandle(), HWND_DESKTOP))
|
---|
91 | strcpy(chrTitle, "Player");
|
---|
92 |
|
---|
93 | if((ulRc=launchPMProg(chrTitle, chrPlayer, chrParams, somSelf, ulView))==NULLHANDLE) {
|
---|
94 | break;
|
---|
95 | }
|
---|
96 | return NULLHANDLE;
|
---|
97 | }
|
---|
98 | default:
|
---|
99 | break;
|
---|
100 | }
|
---|
101 |
|
---|
102 | return (MMMPG_parent_MMVideo_wpOpen(somSelf, hwndCnr, ulView,
|
---|
103 | param));
|
---|
104 | }
|
---|
105 |
|
---|
106 |
|
---|
107 |
|
---|
108 | /*
|
---|
109 | * SOM_Scope PSZ SOMLINK cwmpgM_wpclsQueryTitle(M_CWMPG *somSelf)
|
---|
110 | */
|
---|
111 |
|
---|
112 | /*
|
---|
113 | * The prototype for cwmpgM_wpclsQueryTitle was replaced by the following prototype:
|
---|
114 | */
|
---|
115 | SOM_Scope PSZ SOMLINK cwmpgM_wpclsQueryTitle(M_MMMPG *somSelf)
|
---|
116 | {
|
---|
117 | static char chrTitle[20]={0};
|
---|
118 | /* M_CWMPGData *somThis = M_CWMPGGetData(somSelf); */
|
---|
119 | M_MMMPGMethodDebug("M_MMMPG","cwmpgM_wpclsQueryTitle");
|
---|
120 |
|
---|
121 | if(chrTitle[0]==0)
|
---|
122 | if(!getMessage(chrTitle, IDSTR_MPGTITLE, sizeof(chrTitle), queryResModuleHandle(), HWND_DESKTOP))
|
---|
123 | strcpy(chrTitle,"MPGVideo.MPG");
|
---|
124 |
|
---|
125 | return chrTitle;
|
---|
126 | }
|
---|
127 |
|
---|
128 |
|
---|
129 | /*
|
---|
130 | * SOM_Scope PSZ SOMLINK cwmpgM_wpclsQueryInstanceType(M_CWMPG *somSelf)
|
---|
131 | */
|
---|
132 |
|
---|
133 | /*
|
---|
134 | * The prototype for cwmpgM_wpclsQueryInstanceType was replaced by the following prototype:
|
---|
135 | */
|
---|
136 | SOM_Scope PSZ SOMLINK cwmpgM_wpclsQueryInstanceType(M_MMMPG *somSelf)
|
---|
137 | {
|
---|
138 | /* M_CWMPGData *somThis = M_CWMPGGetData(somSelf); */
|
---|
139 | M_MMMPGMethodDebug("M_MMMPG","cwmpgM_wpclsQueryInstanceType");
|
---|
140 |
|
---|
141 | return "MPEG";
|
---|
142 | }
|
---|
143 |
|
---|
144 |
|
---|
145 | /*
|
---|
146 | * SOM_Scope PSZ SOMLINK cwmpgM_wpclsQueryInstanceFilter(M_CWMPG *somSelf)
|
---|
147 | */
|
---|
148 |
|
---|
149 | /*
|
---|
150 | * The prototype for cwmpgM_wpclsQueryInstanceFilter was replaced by the following prototype:
|
---|
151 | */
|
---|
152 | SOM_Scope PSZ SOMLINK cwmpgM_wpclsQueryInstanceFilter(M_MMMPG *somSelf)
|
---|
153 | {
|
---|
154 | /* M_CWMPGData *somThis = M_CWMPGGetData(somSelf); */
|
---|
155 | M_MMMPGMethodDebug("M_MMMPG","cwmpgM_wpclsQueryInstanceFilter");
|
---|
156 |
|
---|
157 | return "*.MPG,*.VBS";
|
---|
158 | }
|
---|
159 |
|
---|
160 |
|
---|
161 | /*
|
---|
162 | * SOM_Scope ULONG SOMLINK cwmpgM_wpclsQueryIconData(M_CWMPG *somSelf,
|
---|
163 | * PICONINFO pIconInfo)
|
---|
164 | */
|
---|
165 |
|
---|
166 | /*
|
---|
167 | * The prototype for cwmpgM_wpclsQueryIconData was replaced by the following prototype:
|
---|
168 | */
|
---|
169 | SOM_Scope ULONG SOMLINK cwmpgM_wpclsQueryIconData(M_MMMPG *somSelf,
|
---|
170 | PICONINFO pIconInfo)
|
---|
171 | {
|
---|
172 | HMODULE hmod;
|
---|
173 | /* M_CWMPGData *somThis = M_CWMPGGetData(somSelf); */
|
---|
174 | M_MMMPGMethodDebug("M_MMMPG","cwmpgM_wpclsQueryIconData");
|
---|
175 |
|
---|
176 | hmod=queryModuleHandle();
|
---|
177 | if(!hmod)
|
---|
178 | return M_MMMPG_parent_M_MMVideo_wpclsQueryIconData(somSelf, pIconInfo);
|
---|
179 |
|
---|
180 | if (pIconInfo) {
|
---|
181 | pIconInfo->fFormat = ICON_RESOURCE;
|
---|
182 | pIconInfo->hmod = hmod;
|
---|
183 | pIconInfo->resid = ID_ICONMPGFILE;
|
---|
184 | } /* endif */
|
---|
185 |
|
---|
186 | return ( sizeof(ICONINFO) );
|
---|
187 | }
|
---|
188 |
|
---|
189 |
|
---|
190 |
|
---|
191 | /*
|
---|
192 | * SOM_Scope BOOL SOMLINK cwmpgM_wpclsQueryDefaultHelp(M_CWMPG *somSelf,
|
---|
193 | * PULONG pHelpPanelId,
|
---|
194 | * PSZ pszHelpLibrary)
|
---|
195 | */
|
---|
196 |
|
---|
197 | /*
|
---|
198 | * The prototype for cwmpgM_wpclsQueryDefaultHelp was replaced by the following prototype:
|
---|
199 | */
|
---|
200 | SOM_Scope BOOL SOMLINK cwmpgM_wpclsQueryDefaultHelp(M_MMMPG *somSelf,
|
---|
201 | PULONG pHelpPanelId,
|
---|
202 | PSZ pszHelpLibrary)
|
---|
203 | {
|
---|
204 | /* M_CWMPGData *somThis = M_CWMPGGetData(somSelf); */
|
---|
205 | M_MMMPGMethodDebug("M_MMMPG","cwmpgM_wpclsQueryDefaultHelp");
|
---|
206 |
|
---|
207 | if(pHelpPanelId)
|
---|
208 | *pHelpPanelId=MPGFILE_HELP_PANEL;
|
---|
209 | if(pszHelpLibrary)
|
---|
210 | strncpy(pszHelpLibrary, chrHelpLibrary, CCHMAXPATH);
|
---|
211 | return TRUE;
|
---|
212 | }
|
---|
213 |
|
---|
214 |
|
---|
215 |
|
---|
216 |
|
---|
217 |
|
---|
218 |
|
---|
219 |
|
---|