source: trunk/mediafolder/c/cddb/message.c@ 2

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

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

File size: 1.7 KB
Line 
1#define INCL_WIN
2
3#include <os2.h>
4#include <stdio.h>
5
6void errorResource()
7{
8
9 WinMessageBox(HWND_DESKTOP,0,
10 "The resource DLL which contains all the dialogs, graphics and messages cannot be loaded. \
11Please check your installation. There must be a file CDFLDxxx.DLL in the installation directory of the \
12CD-Creator package. xxx is the country code of your system e.g. 049 for Germany. If there is no \
13support for your language there must be at least the file CDFLD001.DLL. The CD creation features \
14are not avaiable!",
15"Problem with Audio/Data-CD-Creator installation",12345,
16 MB_OK|MB_MOVEABLE|MB_ERROR);
17
18}
19
20ULONG messageBox( char* text, ULONG ulTextID , LONG lSizeText,
21 char* title, ULONG ulTitleID, LONG lSizeTitle,
22 HMODULE hResource, HWND hwnd, ULONG ulFlags)
23{
24
25 if(!WinLoadString(WinQueryAnchorBlock(hwnd),hResource,ulTextID,lSizeText,text)) {
26 errorResource();
27 return MBID_ERROR;
28 }
29 if(!WinLoadString(WinQueryAnchorBlock(hwnd),hResource,ulTitleID,lSizeTitle,title)) {
30 errorResource();
31 return MBID_ERROR;
32 }
33 return WinMessageBox( hwnd, hwnd, text, title, 0UL, ulFlags );
34}
35
36void getMessage(char* text,ULONG ulID, LONG lSizeText, HMODULE hResource,HWND hwnd)
37{
38 if(!WinLoadString(WinQueryAnchorBlock(hwnd),hResource,ulID,lSizeText,text)) {
39 sprintf(text,"");
40 }
41}
42
43void pmUsage()
44{
45 WinMessageBox(HWND_DESKTOP,0,
46 "This helper shouldn't be started by hand. It is called by the CD-Creator classes. \
47If you didn't launch the helper by hand you may have found a bug. Please contact the author.",
48 "Problem with Audio/Data-CD-Creator",12345,
49 MB_OK|MB_MOVEABLE|MB_ERROR);
50
51}
52
Note: See TracBrowser for help on using the repository browser.