| 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 (commercial,
|
|---|
| 22 | * noncommercial, whatever) contact me at
|
|---|
| 23 | *
|
|---|
| 24 | * http://www.os2world.com/cdwriting
|
|---|
| 25 | * http://www.geocities.com/SiliconValley/Sector/5785/
|
|---|
| 26 | *
|
|---|
| 27 | */
|
|---|
| 28 | /*
|
|---|
| 29 | * This file was generated by the SOM Compiler and Emitter Framework.
|
|---|
| 30 | * Generated using:
|
|---|
| 31 | * SOM Emitter emitctm: 2.42
|
|---|
| 32 | */
|
|---|
| 33 |
|
|---|
| 34 | #ifndef SOM_Module_cwpng_Source
|
|---|
| 35 | #define SOM_Module_cwpng_Source
|
|---|
| 36 | #endif
|
|---|
| 37 | #define MMPNG_Class_Source
|
|---|
| 38 | #define M_MMPNG_Class_Source
|
|---|
| 39 |
|
|---|
| 40 | #include <os2.h>
|
|---|
| 41 | #include "helpid.h"
|
|---|
| 42 | #include "cwpng.ih"
|
|---|
| 43 |
|
|---|
| 44 | HMODULE queryResModuleHandle(void);
|
|---|
| 45 | HMODULE queryModuleHandle(void);
|
|---|
| 46 | BOOL getMessage(char* text,ULONG ulID, LONG lSizeText, HMODULE hResource,HWND hwnd);
|
|---|
| 47 |
|
|---|
| 48 | SOM_Scope PSZ SOMLINK cwpngM_wpclsQueryInstanceType(M_MMPNG *somSelf)
|
|---|
| 49 | {
|
|---|
| 50 | /* M_MMPNGData *somThis = M_MMPNGGetData(somSelf); */
|
|---|
| 51 | M_MMPNGMethodDebug("M_MMPNG","cwpngM_wpclsQueryInstanceType");
|
|---|
| 52 |
|
|---|
| 53 | return "PNG Image";
|
|---|
| 54 | }
|
|---|
| 55 |
|
|---|
| 56 | SOM_Scope PSZ SOMLINK cwpngM_wpclsQueryInstanceFilter(M_MMPNG *somSelf)
|
|---|
| 57 | {
|
|---|
| 58 | /* M_MMPNGData *somThis = M_MMPNGGetData(somSelf); */
|
|---|
| 59 | M_MMPNGMethodDebug("M_MMPNG","cwpngM_wpclsQueryInstanceFilter");
|
|---|
| 60 |
|
|---|
| 61 | return "*.PNG";
|
|---|
| 62 | }
|
|---|
| 63 |
|
|---|
| 64 | SOM_Scope BOOL SOMLINK cwpngM_wpclsQueryDefaultHelp(M_MMPNG *somSelf,
|
|---|
| 65 | PULONG pHelpPanelId,
|
|---|
| 66 | PSZ pszHelpLibrary)
|
|---|
| 67 | {
|
|---|
| 68 | /* M_MMPNGData *somThis = M_MMPNGGetData(somSelf); */
|
|---|
| 69 | M_MMPNGMethodDebug("M_MMPNG","cwpngM_wpclsQueryDefaultHelp");
|
|---|
| 70 |
|
|---|
| 71 | return (M_MMPNG_parent_M_MMImage_wpclsQueryDefaultHelp(somSelf,
|
|---|
| 72 | pHelpPanelId,
|
|---|
| 73 | pszHelpLibrary));
|
|---|
| 74 | }
|
|---|
| 75 |
|
|---|
| 76 | SOM_Scope PSZ SOMLINK cwpngM_wpclsQueryTitle(M_MMPNG *somSelf)
|
|---|
| 77 | {
|
|---|
| 78 | static char chrTitle[20]={0};
|
|---|
| 79 | /* M_MMPNGData *somThis = M_MMPNGGetData(somSelf); */
|
|---|
| 80 | M_MMPNGMethodDebug("M_MMPNG","cwpngM_wpclsQueryTitle");
|
|---|
| 81 |
|
|---|
| 82 | if(chrTitle[0]==0)
|
|---|
| 83 | if(!getMessage(chrTitle, IDSTR_PNGTITLE, sizeof(chrTitle), queryResModuleHandle(), HWND_DESKTOP))
|
|---|
| 84 | strcpy(chrTitle,"PNGImage.PNG");
|
|---|
| 85 |
|
|---|
| 86 | return chrTitle;
|
|---|
| 87 | }
|
|---|
| 88 |
|
|---|
| 89 | SOM_Scope ULONG SOMLINK cwpngM_wpclsQueryIconData(M_MMPNG *somSelf,
|
|---|
| 90 | PICONINFO pIconInfo)
|
|---|
| 91 | {
|
|---|
| 92 | HMODULE hmod;
|
|---|
| 93 | /* M_MMPNGData *somThis = M_MMPNGGetData(somSelf); */
|
|---|
| 94 | M_MMPNGMethodDebug("M_MMPNG","cwpngM_wpclsQueryIconData");
|
|---|
| 95 |
|
|---|
| 96 | hmod=queryModuleHandle();
|
|---|
| 97 | if(!hmod)
|
|---|
| 98 | return M_MMPNG_parent_M_MMImage_wpclsQueryIconData(somSelf, pIconInfo);
|
|---|
| 99 |
|
|---|
| 100 | if (pIconInfo) {
|
|---|
| 101 | pIconInfo->fFormat = ICON_RESOURCE;
|
|---|
| 102 | pIconInfo->hmod = hmod;
|
|---|
| 103 | pIconInfo->resid = ID_ICONPNGFILE;
|
|---|
| 104 | } /* endif */
|
|---|
| 105 |
|
|---|
| 106 | return ( sizeof(ICONINFO) );
|
|---|
| 107 | }
|
|---|
| 108 |
|
|---|