| 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_cwavi_Source
|
|---|
| 34 | #define SOM_Module_cwavi_Source
|
|---|
| 35 | #endif
|
|---|
| 36 | #define CWAVI_Class_Source
|
|---|
| 37 | #define M_CWAVI_Class_Source
|
|---|
| 38 |
|
|---|
| 39 | #define INCL_PM
|
|---|
| 40 | #include <os2.h>
|
|---|
| 41 | #include "helpid.h"
|
|---|
| 42 | #include "cwavi.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 cwavi_wpOpen(CWAVI *somSelf, HWND hwndCnr,
|
|---|
| 54 | * ULONG ulView, ULONG param)
|
|---|
| 55 | */
|
|---|
| 56 |
|
|---|
| 57 | /*
|
|---|
| 58 | * The prototype for cwavi_wpOpen was replaced by the following prototype:
|
|---|
| 59 | */
|
|---|
| 60 | SOM_Scope HWND SOMLINK cwavi_wpOpen(MMAVI *somSelf, HWND hwndCnr,
|
|---|
| 61 | ULONG ulView, ULONG param)
|
|---|
| 62 | {
|
|---|
| 63 | /* CWAVIData *somThis = CWAVIGetData(somSelf); */
|
|---|
| 64 | MMAVIMethodDebug("MMAVI","cwavi_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", "aviplayer", 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 | /* Get the Title for the window list */
|
|---|
| 89 | if(!getMessage(chrTitle, IDSTR_VIDPLAYERTITLE, sizeof(chrTitle), queryResModuleHandle(), HWND_DESKTOP))
|
|---|
| 90 | strcpy(chrTitle, "Player");
|
|---|
| 91 |
|
|---|
| 92 | if((ulRc=launchPMProg(chrTitle, chrPlayer, chrParams, somSelf, ulView))==NULLHANDLE) {
|
|---|
| 93 | break;
|
|---|
| 94 | }
|
|---|
| 95 | return NULLHANDLE;
|
|---|
| 96 | }
|
|---|
| 97 | default:
|
|---|
| 98 | break;
|
|---|
| 99 | }
|
|---|
| 100 |
|
|---|
| 101 | return (MMAVI_parent_MMVideo_wpOpen(somSelf, hwndCnr, ulView,
|
|---|
| 102 | param));
|
|---|
| 103 | }
|
|---|
| 104 |
|
|---|
| 105 |
|
|---|
| 106 |
|
|---|
| 107 | /*
|
|---|
| 108 | * SOM_Scope PSZ SOMLINK cwaviM_wpclsQueryTitle(M_CWAVI *somSelf)
|
|---|
| 109 | */
|
|---|
| 110 |
|
|---|
| 111 | /*
|
|---|
| 112 | * The prototype for cwaviM_wpclsQueryTitle was replaced by the following prototype:
|
|---|
| 113 | */
|
|---|
| 114 | SOM_Scope PSZ SOMLINK cwaviM_wpclsQueryTitle(M_MMAVI *somSelf)
|
|---|
| 115 | {
|
|---|
| 116 | static char chrTitle[20]={0};
|
|---|
| 117 | /* M_CWAVIData *somThis = M_CWAVIGetData(somSelf); */
|
|---|
| 118 | M_MMAVIMethodDebug("M_MMAVI","cwaviM_wpclsQueryTitle");
|
|---|
| 119 |
|
|---|
| 120 | if(chrTitle[0]==0)
|
|---|
| 121 | if(!getMessage(chrTitle, IDSTR_AVITITLE, sizeof(chrTitle), queryResModuleHandle(), HWND_DESKTOP))
|
|---|
| 122 | strcpy(chrTitle,"AVIVideo.AVI");
|
|---|
| 123 | return chrTitle;
|
|---|
| 124 | }
|
|---|
| 125 |
|
|---|
| 126 |
|
|---|
| 127 |
|
|---|
| 128 | /*
|
|---|
| 129 | * SOM_Scope PSZ SOMLINK cwaviM_wpclsQueryInstanceType(M_CWAVI *somSelf)
|
|---|
| 130 | */
|
|---|
| 131 |
|
|---|
| 132 | /*
|
|---|
| 133 | * The prototype for cwaviM_wpclsQueryInstanceType was replaced by the following prototype:
|
|---|
| 134 | */
|
|---|
| 135 | SOM_Scope PSZ SOMLINK cwaviM_wpclsQueryInstanceType(M_MMAVI *somSelf)
|
|---|
| 136 | {
|
|---|
| 137 | /* M_CWAVIData *somThis = M_CWAVIGetData(somSelf); */
|
|---|
| 138 | M_MMAVIMethodDebug("M_MMAVI","cwaviM_wpclsQueryInstanceType");
|
|---|
| 139 |
|
|---|
| 140 | return "AVI";
|
|---|
| 141 | }
|
|---|
| 142 |
|
|---|
| 143 |
|
|---|
| 144 | /*
|
|---|
| 145 | * SOM_Scope PSZ SOMLINK cwaviM_wpclsQueryInstanceFilter(M_CWAVI *somSelf)
|
|---|
| 146 | */
|
|---|
| 147 |
|
|---|
| 148 | /*
|
|---|
| 149 | * The prototype for cwaviM_wpclsQueryInstanceFilter was replaced by the following prototype:
|
|---|
| 150 | */
|
|---|
| 151 | SOM_Scope PSZ SOMLINK cwaviM_wpclsQueryInstanceFilter(M_MMAVI *somSelf)
|
|---|
| 152 | {
|
|---|
| 153 | /* M_CWAVIData *somThis = M_CWAVIGetData(somSelf); */
|
|---|
| 154 | M_MMAVIMethodDebug("M_MMAVI","cwaviM_wpclsQueryInstanceFilter");
|
|---|
| 155 |
|
|---|
| 156 | return "*.AVI";
|
|---|
| 157 | }
|
|---|
| 158 |
|
|---|
| 159 |
|
|---|
| 160 | /*
|
|---|
| 161 | * SOM_Scope ULONG SOMLINK cwaviM_wpclsQueryIconData(M_CWAVI *somSelf,
|
|---|
| 162 | * PICONINFO pIconInfo)
|
|---|
| 163 | */
|
|---|
| 164 |
|
|---|
| 165 | /*
|
|---|
| 166 | * The prototype for cwaviM_wpclsQueryIconData was replaced by the following prototype:
|
|---|
| 167 | */
|
|---|
| 168 | SOM_Scope ULONG SOMLINK cwaviM_wpclsQueryIconData(M_MMAVI *somSelf,
|
|---|
| 169 | PICONINFO pIconInfo)
|
|---|
| 170 | {
|
|---|
| 171 | HMODULE hmod;
|
|---|
| 172 | /* M_CWAVIData *somThis = M_CWAVIGetData(somSelf); */
|
|---|
| 173 | M_MMAVIMethodDebug("M_MMAVI","cwaviM_wpclsQueryIconData");
|
|---|
| 174 |
|
|---|
| 175 | hmod=queryModuleHandle();
|
|---|
| 176 | if(!hmod)
|
|---|
| 177 | return M_MMAVI_parent_M_MMVideo_wpclsQueryIconData(somSelf, pIconInfo);
|
|---|
| 178 |
|
|---|
| 179 | if (pIconInfo) {
|
|---|
| 180 | pIconInfo->fFormat = ICON_RESOURCE;
|
|---|
| 181 | pIconInfo->hmod = hmod;
|
|---|
| 182 | pIconInfo->resid = ID_ICONAVIFILE;
|
|---|
| 183 | } /* endif */
|
|---|
| 184 |
|
|---|
| 185 | return ( sizeof(ICONINFO) );
|
|---|
| 186 | }
|
|---|
| 187 |
|
|---|
| 188 |
|
|---|
| 189 |
|
|---|
| 190 | /*
|
|---|
| 191 | * SOM_Scope BOOL SOMLINK cwaviM_wpclsQueryDefaultHelp(M_CWAVI *somSelf,
|
|---|
| 192 | * PULONG pHelpPanelId,
|
|---|
| 193 | * PSZ pszHelpLibrary)
|
|---|
| 194 | */
|
|---|
| 195 |
|
|---|
| 196 | /*
|
|---|
| 197 | * The prototype for cwaviM_wpclsQueryDefaultHelp was replaced by the following prototype:
|
|---|
| 198 | */
|
|---|
| 199 | SOM_Scope BOOL SOMLINK cwaviM_wpclsQueryDefaultHelp(M_MMAVI *somSelf,
|
|---|
| 200 | PULONG pHelpPanelId,
|
|---|
| 201 | PSZ pszHelpLibrary)
|
|---|
| 202 | {
|
|---|
| 203 | /* M_CWAVIData *somThis = M_CWAVIGetData(somSelf); */
|
|---|
| 204 | M_MMAVIMethodDebug("M_MMAVI","cwaviM_wpclsQueryDefaultHelp");
|
|---|
| 205 |
|
|---|
| 206 | if(pHelpPanelId)
|
|---|
| 207 | *pHelpPanelId=AVIFILE_HELP_PANEL;
|
|---|
| 208 | if(pszHelpLibrary)
|
|---|
| 209 | strncpy(pszHelpLibrary, chrHelpLibrary, CCHMAXPATH);
|
|---|
| 210 | return TRUE;
|
|---|
| 211 | }
|
|---|
| 212 |
|
|---|