source: branches/v2.9/mediafolder/c/m3ufolder/m3ufolderoverriddenwpclsmethods.cpp

Last change on this file was 2, checked in by stevenhl, 8 years ago

Import sources from cwmm-full.zip dated 2005-03-21

File size: 2.5 KB
Line 
1/*
2 * This file is (C) Chris Wohlgemuth 2002
3 *
4 * It's part of the media folder distribution
5 */
6
7#include "m3ufolder.hh"
8
9extern char chrInstallDir[CCHMAXPATH];
10
11ULONG launchRexx( PSZ pszTitle, PSZ rexxFile, PSZ parameters);
12HMODULE queryModuleHandle(PSZ pszClassName);
13HMODULE queryResModuleHandle(void);
14BOOL _queryHelpLibrary(char * chrBuffer, int iSize);
15BOOL getMessage(char* text,ULONG ulID, LONG lSizeText, HMODULE hResource,HWND hwnd);
16HMODULE queryModuleHandle(PSZ pszClassName);
17
18/* Overriden function which returns our class name */
19PSZ M_CWM3UFolder::wpclsQueryTitle()
20{
21 static char chrTitle[40];
22 if(getMessage(chrTitle, IDSTR_TITLEM3UFOLDER,sizeof(chrTitle), queryResModuleHandle(), HWND_DESKTOP))
23 return chrTitle;
24 /* Fall back in case of error */
25 return "M3U editor";
26}
27
28ULONG M_CWM3UFolder::wpclsQueryStyle()
29{
30 return (M_CWMediaFolder::wpclsQueryStyle()|CLSSTYLE_NEVERTEMPLATE|CLSSTYLE_DONTTEMPLATE);
31}
32
33BOOL M_CWM3UFolder::wpclsCreateDefaultTemplates(WPObject * wpObject)
34{
35 return TRUE;
36}
37
38void M_CWM3UFolder::wpclsInitData()
39{
40 static BOOL bObjectsCreated=FALSE;
41
42 /* Call parent */
43 M_CWMediaFolder::wpclsInitData();
44
45 /* Be sure we have our install dir */
46 queryModuleHandle("M_CWM3UFolder");
47}
48
49BOOL M_CWM3UFolder::wpclsQueryDefaultHelp(PULONG HelpPanelId,PSZ HelpLibrary)
50{
51 if(HelpLibrary)
52 _queryHelpLibrary(HelpLibrary, CCHMAXPATH);
53
54 if(HelpPanelId)
55 *HelpPanelId= IDHLP_M3UFOLDERMAIN;
56
57 return TRUE;
58}
59
60/* Overriden function which returns the custom icon */
61ULONG M_CWM3UFolder::wpclsQueryIconData(PICONINFO pIconInfo)
62{
63 // HMODULE hResource=queryResModuleHandle();
64 HMODULE hResource=queryModuleHandle("M_CWM3UFolder");
65
66 if(!hResource)
67 return M_CWProgFolder::wpclsQueryIconData(pIconInfo);
68
69 if (pIconInfo) {
70 pIconInfo->fFormat = ICON_RESOURCE;
71 pIconInfo->hmod = hResource;
72 pIconInfo->resid = IDICON_M3UFILE;
73 } /* endif */
74
75 return ( sizeof(ICONINFO) );
76}
77
78ULONG M_CWM3UFolder::wpclsQueryIconDataN(PICONINFO pIconInfo, ULONG ulIconIndex)
79{
80 //HMODULE hResource=queryResModuleHandle();
81 HMODULE hResource=queryModuleHandle("M_CWM3UFolder");
82
83 if(!hResource)
84 return M_CWProgFolder::wpclsQueryIconDataN(pIconInfo, ulIconIndex);
85
86 if (pIconInfo) {
87 pIconInfo->fFormat = ICON_RESOURCE;
88 pIconInfo->hmod = hResource;
89 pIconInfo->resid = IDICON_M3UFILE;
90 } /* endif */
91 return ( sizeof(ICONINFO) );
92}
93
Note: See TracBrowser for help on using the repository browser.