1
//============================================================//
5
//===========================================================//
6
#include "../header/Render2DCore.h"
14
beScreen m_MainDDScreen;
15
beSurface* m_pMainSurface;
16
beSurface* m_pMouseCursorSurface;
17
beSurface* m_pBackgroundSurface;
20
int m_iWindowWidth = 640;
21
int m_iWindowHeight = 480;
24
beScreenParams InitDisplayStruct;
28
#define MIN_W 205 // Accomodate the menu bar.
31
#define TITLE "OpenIL Direct Draw Test"
33
ILuint NumUndosAllowed = 4, UndoSize = 0;
34
ILuint Undos[11] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
35
ILuint Width, Height, Depth; // Main image
36
ILuint MainImage = 0; // Main image
37
HBITMAP hBitmap; // Main bitmap
40
ILuint FilterParamInt;
41
ILfloat FilterParamFloat;
44
BOOL APIENTRY AboutDlgProc (HWND hDlg, UINT message, UINT wParam, LONG lParam);
45
BOOL APIENTRY FilterDlgProc(HWND hDlg, UINT message, UINT wParam, LONG lParam);
46
BOOL APIENTRY ResizeDlgProc(HWND hDlg, UINT message, UINT wParam, LONG lParam);
47
void GenFilterString(char *Out, char **Strings);
49
//===========================================================//
51
//===========================================================//
52
long FAR PASCAL WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
57
static char NewTitle[2048];
58
static char OpenFileName[2048];
59
static char OpenFilter[2048];
60
static char SaveFileName[2048];
61
static char SaveFilter[2048];
62
static char *OFilter[] = {
63
"All Files (*.*)", "*.*",
64
"Half-Life Model Files (*.mdl)", "*.mdl",
65
"Homeworld Image Files (*.lif)", "*.lif",
66
"Image Files (All Supported Types)", "*.jpe;*.jpg;*.jpeg;*.lif;*.bmp;*.ico;*.pbm;*.pgm;*.pnm;*.ppm;*.png;*.bw;*.rgb;*.rgba;*.sgi;*.tga;*.tif;*.tiff;*.pcx",
67
"Jpeg Files (*.jpe, *.jpg, *.jpeg)", "*.jpe;*.jpg;*.jpeg",
68
"Microsoft Bitmap Files (*.bmp)", "*.bmp",
69
"Microsoft Icon Files (*.ico)", "*.ico",
70
"OpenIL Files (*.oil)", "*.oil",
71
"Portable AnyMap Files (*.pbm, *.pgm, *.pnm, *.ppm)", "*.pbm;*.pgm;*.pnm;*.ppm",
72
"Portable Network Graphics Files (*.png)", "*.png",
73
"Sgi Files (*.sgi)", "*.bw;*.rgb;*.rgba;*.sgi",
74
"Targa Files (*.tga)", "*.tga",
75
"Tiff Files (*.tif)", "*.tif;*.tiff",
76
"Quake Wal Files (*.wal)", "*.wal",
77
"ZSoft Pcx Files (*.pcx)", "*.pcx",
80
static char *SFilter[] = {
81
"All Files (*.*)", "*.*",
82
"C-Style Header (*.h)", "*.h",
83
"Jpeg Files (*.jpe, *.jpg, *.jpeg)", "*.jpe;*.jpg;*.jpeg",
84
"Microsoft Bitmap Files (*.bmp)", "*.bmp",
85
"OpenIL Files (*.oil)", "*.oil",
86
"Portable AnyMap Files (*.pbm, *.pgm, *.ppm)", "*.pbm;*.pgm;*.ppm",
87
"Portable Network Graphics Files (*.png)", "*.png",
88
"Sgi Files (*.sgi)", "*.bw;*.rgb;*.rgba;*.sgi",
89
"Targa Files (*.tga)", "*.tga",
90
"ZSoft Pcx Files (*.pcx)", "*.pcx",
94
static OPENFILENAME Ofn = {
108
OFN_HIDEREADONLY | OFN_FILEMUSTEXIST | OFN_PATHMUSTEXIST,
123
GenFilterString(OpenFilter, OFilter);
124
GenFilterString(SaveFilter, SFilter);
126
// Store the device context
131
// Clean up and close the app
132
m_MainDDScreen.Delete();
137
// Handle any non-accelerated key commands
142
PostMessage(hWnd, WM_CLOSE, 0, 0);
148
m_MainDDScreen.Move();
152
m_MainDDScreen.Move();
156
m_iCurrMouseX = LOWORD(lParam);
157
m_iCurrMouseY = HIWORD(lParam);
160
if (!m_pBackgroundSurface)
163
// we don't need a colorfill...cause we're using a bitmap to clear the surface
164
m_pMainSurface->GetSurface()->Blt(NULL, NULL, NULL, DDBLT_COLORFILL, &ddbltfx);
165
m_pMainSurface->BltFast(0, 0, m_pBackgroundSurface, NULL, DDBLTFAST_NOCOLORKEY);
171
rcRect.bottom = 128;*/
174
if (!m_pMouseCursorSurface->Lock(ddsd))
177
// pixel-plotting test
178
for (x = 0; x < 128; x++) {
179
for (y = 0; y < 128; y++) {
180
m_pMouseCursorSurface->PlotPixel(x, y, x*2%255, 0, y*2%255, &ddsd);
183
if (!m_pMouseCursorSurface->Unlock())
186
//m_pMainSurface->BltFast(0, 0, m_pMouseCursorSurface,
187
// &rcRect, DDBLTFAST_NOCOLORKEY);
189
m_MainDDScreen.GetBackBufferSurface()->BltFast(0,0,m_pMainSurface->GetSurface(),NULL,DDBLTFAST_NOCOLORKEY);
190
m_MainDDScreen.Flip();
192
ValidateRect(hWnd, NULL);
196
FilterType = LOWORD(wParam);
198
switch (LOWORD(wParam))
206
MAKEINTRESOURCE(IDD_DIALOG_ABOUT),
211
case ID_EFFECTS_COUNTCOLORS:
213
Colours = iluColoursUsed();
214
char ColourString[255];
215
sprintf(ColourString, "The number of colours in this image is: %d", Colours);
216
MessageBox(NULL, ColourString, "Colour Count", MB_OK);
220
ilutSetWinClipboard();
225
ilGenImages(1, &Test);
228
// Check if there's anything in the clipboard.
229
if (!ilutGetWinClipboard()) {
230
ilDeleteImages(1, &Test);
233
ilDeleteImages(1, &Test);
235
ilDeleteImages(UndoSize, Undos);
238
ilGenImages(1, &MainImage);
239
ilBindImage(MainImage);
240
Undos[0] = MainImage;
241
ilutGetWinClipboard();
243
ilConvertImage(IL_BGRA, IL_UNSIGNED_BYTE);
244
ilutRenderer(ILUT_WIN32);
246
Width = ilGetInteger(IL_IMAGE_WIDTH);
247
Height = ilGetInteger(IL_IMAGE_HEIGHT);
248
Depth = ilGetInteger(IL_IMAGE_DEPTH);
250
hBitmap = ilutConvertToHBitmap(hDC);
251
m_pBackgroundSurface->LoadImage(hBitmap, false);
252
DeleteObject(hBitmap);
255
GetWindowRect(hWnd, &Rect);
256
SetWindowPos(hWnd, HWND_TOP, Rect.left, Rect.top,
257
Width < MIN_W ? MIN_W + BORDER_W : Width + BORDER_W,
258
Height + MENU_H, SWP_SHOWWINDOW);
262
sprintf(OpenFileName, "*.*");
263
Ofn.lpstrFilter = OpenFilter;
264
Ofn.lpstrFile = OpenFileName;
265
Ofn.lpstrTitle = "Open File";
266
Ofn.Flags = OFN_HIDEREADONLY | OFN_FILEMUSTEXIST | OFN_PATHMUSTEXIST;
268
if (!GetOpenFileName(&Ofn))
271
ilDeleteImages(UndoSize, Undos);
274
ilGenImages(1, &MainImage);
275
ilBindImage(MainImage);
276
Undos[0] = MainImage;
277
if (!ilLoadImage(OpenFileName))
279
ilConvertImage(IL_BGRA, IL_UNSIGNED_BYTE);
280
ilutRenderer(ILUT_WIN32);
282
Width = ilGetInteger(IL_IMAGE_WIDTH);
283
Height = ilGetInteger(IL_IMAGE_HEIGHT);
284
Depth = ilGetInteger(IL_IMAGE_DEPTH);
286
hBitmap = ilutConvertToHBitmap(hDC);
287
m_pBackgroundSurface->LoadImage(hBitmap, false);
288
DeleteObject(hBitmap);
290
GetWindowRect(hWnd, &Rect);
291
SetWindowPos(hWnd, HWND_TOP, Rect.left, Rect.top,
292
Width < MIN_W ? MIN_W + BORDER_W : Width + BORDER_W,
293
Height + MENU_H, SWP_SHOWWINDOW);
295
sprintf(NewTitle, "%s - %s", TITLE, OpenFileName);
296
SetWindowText(hWnd, NewTitle);
301
sprintf(SaveFileName, "monkey.tga");
302
Ofn.lpstrFilter = SaveFilter;
303
Ofn.lpstrFile = SaveFileName;
304
Ofn.lpstrTitle = "Save File";
305
Ofn.Flags = OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT;
307
if (!GetSaveFileName(&Ofn))
310
ilEnable(IL_FILE_OVERWRITE);
311
ilSaveImage(SaveFileName);
313
sprintf(NewTitle, "%s - %s", TITLE, SaveFileName);
314
SetWindowText(hWnd, NewTitle);
318
case ID_EDIT_UNDOLEVEL:
319
if (DialogBox(hInst, MAKEINTRESOURCE(IDD_DIALOG_FILTER),
320
hWnd, FilterDlgProc) == TRUE) {
321
NumUndosAllowed = FilterParamInt <= 10 ? FilterParamInt : 10;
326
if (UndoSize && NumUndosAllowed) {
327
ilDeleteImages(1, &Undos[UndoSize]);
328
ilBindImage(Undos[--UndoSize]);
329
hBitmap = ilutConvertToHBitmap(hDC);
330
m_pBackgroundSurface->LoadImage(hBitmap, false);
331
DeleteObject(hBitmap);
333
Width = ilGetInteger(IL_IMAGE_WIDTH);
334
Height = ilGetInteger(IL_IMAGE_HEIGHT);
335
Depth = ilGetInteger(IL_IMAGE_DEPTH);
337
GetWindowRect(hWnd, &Rect);
338
SetWindowPos(hWnd, HWND_TOP, Rect.left, Rect.top,
339
Width < MIN_W ? MIN_W + BORDER_W : Width + BORDER_W,
340
Height + MENU_H, SWP_SHOWWINDOW);
343
InvalidateRect(hWnd, NULL, FALSE);
349
if (++UndoSize > NumUndosAllowed) {
350
if (NumUndosAllowed > 0) {
351
UndoSize = NumUndosAllowed;
352
ilDeleteImages(1, &Undos[0]);
353
memcpy(Undos, Undos+1, NumUndosAllowed * sizeof(ILuint));
354
ilBindImage(Undos[UndoSize]);
358
if (NumUndosAllowed > 0) {
359
ilGenImages(1, &Undos[UndoSize]);
360
ilBindImage(Undos[UndoSize]);
361
ilCopyImage(Undos[UndoSize-1]);
362
MainImage = Undos[UndoSize]; // ???
367
switch (LOWORD(wParam))
370
ilConvertImage(IL_RGB, IL_UNSIGNED_BYTE);
373
case ID_CONVERT_RGBA:
374
ilConvertImage(IL_RGBA, IL_UNSIGNED_BYTE);
378
ilConvertImage(IL_BGR, IL_UNSIGNED_BYTE);
381
case ID_CONVERT_BGRA:
382
ilConvertImage(IL_BGRA, IL_UNSIGNED_BYTE);
385
case ID_CONVERT_LUMINANCE:
386
ilConvertImage(IL_LUMINANCE, IL_UNSIGNED_BYTE);
389
case ID_EFFECTS_FLIP:
393
case ID_EFFECTS_MIRROR:
397
case ID_FILTER_EMBOSS:
401
case ID_FILTER_ALIENIFY:
405
case ID_FILTER_NEGATIVE:
409
case ID_EFFECTS_FILTERS_EDGEDETECT_EMBOSS:
413
case ID_EFFECTS_FILTERS_EDGEDETECT_SOBEL:
417
case ID_EFFECTS_FILTERS_EDGEDETECT_PREWITT:
421
case ID_FILTER_NOISE:
422
if (DialogBox(hInst, MAKEINTRESOURCE(IDD_DIALOG_FILTER),
423
hWnd, FilterDlgProc) == TRUE) {
424
iluNoisify(FilterParamFloat);
428
case ID_FILTER_PIXELIZE:
429
if (DialogBox(hInst, MAKEINTRESOURCE(IDD_DIALOG_FILTER),
430
hWnd, FilterDlgProc) == TRUE) {
431
iluPixelize(FilterParamInt);
435
case ID_FILTERS_BLUR_AVERAGE:
436
if (DialogBox(hInst, MAKEINTRESOURCE(IDD_DIALOG_FILTER),
437
hWnd, FilterDlgProc) == TRUE) {
438
iluBlurAvg(FilterParamInt);
442
case ID_FILTERS_BLUR_GAUSSIAN:
443
if (DialogBox(hInst, MAKEINTRESOURCE(IDD_DIALOG_FILTER),
444
hWnd, FilterDlgProc) == TRUE) {
445
iluBlurGaussian(FilterParamInt);
449
case ID_FILTER_GAMMACORRECT:
450
if (DialogBox(hInst, MAKEINTRESOURCE(IDD_DIALOG_FILTER),
451
hWnd, FilterDlgProc) == TRUE) {
452
iluGammaCorrect(FilterParamFloat);
456
case ID_FILTER_SHARPEN:
457
if (DialogBox(hInst, MAKEINTRESOURCE(IDD_DIALOG_FILTER),
458
hWnd, FilterDlgProc) == TRUE) {
459
iluSharpen(FilterParamFloat, 1);
463
case ID_EFFECTS_FILTERS_ROTATE:
464
if (DialogBox(hInst, MAKEINTRESOURCE(IDD_DIALOG_FILTER),
465
hWnd, FilterDlgProc) == TRUE) {
466
iluRotate(FilterParamFloat);
468
Width = ilGetInteger(IL_IMAGE_WIDTH);
469
Height = ilGetInteger(IL_IMAGE_HEIGHT);
471
GetWindowRect(hWnd, &Rect);
472
SetWindowPos(hWnd, HWND_TOP, Rect.left, Rect.top,
473
Width < MIN_W ? MIN_W + BORDER_W : Width + BORDER_W,
474
Height + MENU_H, SWP_SHOWWINDOW);
478
case ID_EFFECTS_FILTERS_SCALE:
479
iluImageParameter(ILU_FILTER, ILU_BILINEAR);
480
DialogBox(hInst, MAKEINTRESOURCE(IDD_DIALOG_RESIZE), hWnd, ResizeDlgProc);
484
ilConvertImage(IL_BGRA, IL_UNSIGNED_BYTE);
485
hBitmap = ilutConvertToHBitmap(hDC);
486
m_pBackgroundSurface->LoadImage(hBitmap, false);
487
DeleteObject(hBitmap);
488
InvalidateRect(hWnd, NULL, FALSE);
492
return DefWindowProc(hWnd, message, wParam, lParam);
501
//===========================================================//
503
//===========================================================//
504
static HRESULT InitApp(HINSTANCE hInstance, int nCmdShow)
509
wcex.cbSize = sizeof(WNDCLASSEX);
510
wcex.style = CS_HREDRAW | CS_VREDRAW;
511
wcex.lpfnWndProc = (WNDPROC)WndProc;
514
wcex.hInstance = hInstance;
515
wcex.hIcon = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_ICON1));
516
wcex.hCursor = LoadCursor(NULL, IDC_ARROW);
517
wcex.hbrBackground = (HBRUSH)(COLOR_WINDOW+1);
518
wcex.lpszMenuName = (LPCSTR)IDR_MENU1;
519
wcex.lpszClassName = TITLE;
520
wcex.hIconSm = LoadIcon(wcex.hInstance, (LPCTSTR)IDI_ICON10);
522
RegisterClassEx(&wcex);
526
hWnd = CreateWindow(TITLE, TITLE, WS_OVERLAPPEDWINDOW, 50, 50, 400, 300,
527
NULL, NULL, hInstance, NULL);
530
ShowWindow(hWnd, nCmdShow);
536
InitDisplayStruct.m_Flags = 0;
537
InitDisplayStruct.m_Flags |= BE_SCREENFLAGS_WINDOWED;
538
InitDisplayStruct.m_OwnerWnd = hWnd;
540
InitDisplayStruct.m_iScreenWidth = m_iWindowWidth;
541
InitDisplayStruct.m_iScreenHeight = m_iWindowHeight;
542
InitDisplayStruct.m_iScreenBitCount = 16;
544
if (!m_MainDDScreen.Initialize(InitDisplayStruct))
545
MessageBox(NULL,"ah!","ahhhh",MB_OK);
547
m_pMouseCursorSurface = new beSurface(&m_MainDDScreen);
548
m_pBackgroundSurface = new beSurface(&m_MainDDScreen);
549
m_pMainSurface = new beSurface(&m_MainDDScreen);
550
m_pMainSurface->CreateSurface(InitDisplayStruct.m_iScreenWidth,InitDisplayStruct.m_iScreenHeight,false);
552
ilEnable(IL_FORMAT_SET);
553
ilEnable(IL_ORIGIN_SET);
554
ilEnable(IL_TYPE_SET);
556
ilFormatFunc(IL_BGRA);
557
ilOriginFunc(IL_ORIGIN_LOWER_LEFT);
558
ilTypeFunc(IL_UNSIGNED_BYTE);
560
hBitmap = ilutConvertToHBitmap(GetDC(hWnd));
561
m_pBackgroundSurface->LoadImage(hBitmap, false);
563
m_pMouseCursorSurface->CreateSurface(128, 128, true);
565
InvalidateRect(hWnd, NULL, FALSE);
570
//===========================================================//
572
//===========================================================//
573
int PASCAL WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
580
InitApp(hInstance, nCmdShow);
581
ZeroMemory(&ddbltfx, sizeof(ddbltfx));
582
ddbltfx.dwSize = sizeof(ddbltfx);
583
ddbltfx.dwFillColor = RGB(128, 128, 128);
585
hAccelTable = LoadAccelerators(hInstance, (LPCTSTR)IDR_MENU1);
586
while (GetMessage(&msg, NULL, 0, 0)) {
587
if (!TranslateAccelerator(msg.hwnd, hAccelTable, &msg)) {
588
TranslateMessage(&msg);
589
DispatchMessage(&msg);
593
delete m_pMainSurface;
594
delete m_pMouseCursorSurface;
595
delete m_pBackgroundSurface;
601
BOOL APIENTRY AboutDlgProc(HWND hDlg, UINT message, UINT wParam, LONG lParam)
605
// Initialize the dialog box
610
char VersionNum[256];
612
sprintf(VersionNum, "Num: %d", ilGetInteger(IL_VERSION_NUM));
615
SetDlgItemText(hDlg, IDC_ABOUT_VENDOR, ilGetString(IL_VENDOR));
616
SetDlgItemText(hDlg, IDC_ABOUT_VER_STRING, ilGetString(IL_VERSION));
617
SetDlgItemText(hDlg, IDC_ABOUT_VER_NUM, VersionNum);
619
// Display any recent error messages
620
for (i = 0; i < 6; i++) {
621
ilError = ilGetError();
622
if (ilError == IL_NO_ERROR)
624
SetDlgItemText(hDlg, IDC_ERROR1+i, iluErrorString(ilError));
631
// Process command messages
634
// Validate and Make the changes
635
if (LOWORD(wParam) == IDOK)
636
EndDialog(hDlg, TRUE);
637
if (LOWORD(wParam) == IDCANCEL)
638
EndDialog(hDlg, FALSE);
642
// Closed from sysbox
644
EndDialog(hDlg,TRUE);
653
BOOL APIENTRY FilterDlgProc(HWND hDlg, UINT message, UINT wParam, LONG lParam)
655
char EditString[255];
659
// Initialize the dialog box
664
case ID_FILTER_PIXELIZE:
665
SetDlgItemText(hDlg, IDC_FILTER_DESC_TEXT, "Width of pixelized block:");
666
SetDlgItemText(hDlg, IDC_FILTER_EDIT, "1");
668
case ID_FILTER_NOISE:
669
SetDlgItemText(hDlg, IDC_FILTER_DESC_TEXT, "Amount of noise threshold:");
670
SetDlgItemText(hDlg, IDC_FILTER_EDIT, "1");
672
case ID_FILTERS_BLUR_AVERAGE:
673
SetDlgItemText(hDlg, IDC_FILTER_DESC_TEXT, "Number of iterations:");
674
SetDlgItemText(hDlg, IDC_FILTER_EDIT, "1");
676
case ID_FILTERS_BLUR_GAUSSIAN:
677
SetDlgItemText(hDlg, IDC_FILTER_DESC_TEXT, "Number of iterations:");
678
SetDlgItemText(hDlg, IDC_FILTER_EDIT, "1");
680
case ID_FILTER_GAMMACORRECT:
681
SetDlgItemText(hDlg, IDC_FILTER_DESC_TEXT, "Amount of gamma correction:");
682
SetDlgItemText(hDlg, IDC_FILTER_EDIT, "1.0");
684
case ID_FILTER_SHARPEN:
685
SetDlgItemText(hDlg, IDC_FILTER_DESC_TEXT, "Sharpening factor:");
686
SetDlgItemText(hDlg, IDC_FILTER_EDIT, "1.0");
688
case ID_EFFECTS_FILTERS_ROTATE:
689
SetDlgItemText(hDlg, IDC_FILTER_DESC_TEXT, "Number of degress to rotate:");
690
SetDlgItemText(hDlg, IDC_FILTER_EDIT, "0.0");
693
case ID_EDIT_UNDOLEVEL:
694
SetDlgItemText(hDlg, IDC_FILTER_DESC_TEXT, "Set level of undo:");
695
SetDlgItemText(hDlg, IDC_FILTER_EDIT, "4");
704
// Process command messages
707
// Validate and Make the changes
708
if (LOWORD(wParam) == IDOK) {
709
GetDlgItemText(hDlg, IDC_FILTER_EDIT, EditString, 255);
710
FilterParamInt = atoi(EditString);
711
FilterParamFloat = (float)atof(EditString);
712
EndDialog(hDlg, TRUE);
714
if (LOWORD(wParam) == IDCANCEL) {
715
EndDialog(hDlg, FALSE);
720
// Closed from sysbox
722
EndDialog(hDlg,TRUE);
731
BOOL APIENTRY ResizeDlgProc(HWND hDlg, UINT message, UINT wParam, LONG lParam)
733
static char x[255], y[255], z[255];
734
static ILuint xsize, ysize, zsize;
739
// Initialize the dialog box
742
sprintf(x, "%d", Width);
743
sprintf(y, "%d", Height);
744
sprintf(z, "%d", Depth);
745
SetDlgItemText(hDlg, IDC_EDIT_RESIZE_X, x);
746
SetDlgItemText(hDlg, IDC_EDIT_RESIZE_Y, y);
747
SetDlgItemText(hDlg, IDC_EDIT_RESIZE_Z, z);
752
// Process command messages
755
// Validate and Make the changes
756
if (LOWORD(wParam) == IDOK) {
757
GetDlgItemText(hDlg, IDC_EDIT_RESIZE_X, x, 255);
758
GetDlgItemText(hDlg, IDC_EDIT_RESIZE_Y, y, 255);
759
GetDlgItemText(hDlg, IDC_EDIT_RESIZE_Z, z, 255);
763
if (xsize && ysize && zsize) {
764
iluScale(xsize, ysize, zsize);
766
Width = ilGetInteger(IL_IMAGE_WIDTH);
767
Height = ilGetInteger(IL_IMAGE_HEIGHT);
768
Depth = ilGetInteger(IL_IMAGE_DEPTH);
770
GetWindowRect(m_MainHWND, &Rect);
771
SetWindowPos(m_MainHWND, HWND_TOP, Rect.left, Rect.top,
772
Width < MIN_W ? MIN_W + BORDER_W : Width + BORDER_W,
773
Height + MENU_H, SWP_SHOWWINDOW);
776
InvalidateRect(m_MainHWND, NULL, FALSE);
778
EndDialog(hDlg, TRUE);
780
if (LOWORD(wParam) == IDCANCEL) {
781
EndDialog(hDlg, FALSE);
786
// Closed from sysbox
788
EndDialog(hDlg,TRUE);
796
void GenFilterString(char *Out, char **Strings)
798
int OutPos = 0, StringPos = 0;
800
while (Strings[StringPos][0] != 0) {
801
sprintf(Out + OutPos, Strings[StringPos]);
802
OutPos += strlen(Strings[StringPos++]) + 1;