Category : C Source Code
Archive   : ICOPIK.ZIP
Filename : ICOPIK.HPP

 
Output of file : ICOPIK.HPP contained in archive : ICOPIK.ZIP
//icopik.hpp

#ifndef ICONS_HPP
#define ICONS_HPP 1
// ------------------------------------------------------------------

#include
#include "icopik.h"

_CLASSDEF(TIconListBox)
_CLASSDEF(TIconDialog)
_CLASSDEF(TTestWindow)


// TIconListbox //////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
class TIconListBox : public TListBox
{
public:
TIconListBox(PTWindowsObject AParent, int ResourceId, PTModule AModule = NULL);

int Height() {return iIconHeight;};
int Width() {return iIconWidth;};
void Height(int iNewHeight) {iIconHeight = iNewHeight;};
void Width(int iNewWidth) {iIconWidth = iNewWidth;};

private:
WORD iIconHeight, iIconWidth;
};


// TIconDialog ///////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
class TIconDialog : public TDialog
{
public:

TIconDialog(PTWindowsObject AParent, int ResID,
LPSTR szIconsFileName, int &iCurIcon);
virtual ~TIconDialog();

virtual LPSTR GetClassName();
virtual void GetWindowClass(WNDCLASS& AWndClass);
virtual void SetupWindow();
virtual BOOL CanClose();

virtual void WMMeasureItem(RTMessage Msg) = [WM_FIRST + WM_MEASUREITEM];
virtual void WMDrawItem(RTMessage Msg) = [WM_FIRST + WM_DRAWITEM];

virtual void HelpUser(RTMessage Msg) = [ID_FIRST + IDHELP];
virtual void FindFiles(RTMessage Msg) = [ID_FIRST + ID_BTN_FIND];
virtual void HandleListBoxMsg(RTMessage Msg) = [ID_FIRST + ID_ICONLIST];

private:

// dialog box controls
PTIconListBox PTListBox_Icon;
PTEdit PTEdit_IconFileName;
PTBButton PTBButton_Find;

// refs to variables passed on ctor
// change these directly so that when dialog ends we'll know what happened
char * szIconSourceFile;
int * iSelectedIcon;

int cIconsInFile;

HDC hMemDC;
HBITMAP hFindBTNBits[3];
HBITMAP hOldBMP, hMyBMP;
DWORD HIGHLIGHTCOLOR, WINDOWCOLOR;
HBRUSH hWindowBrush, hHighlightBrush;

int IconsInFile(LPSTR szTestFile);
int FillIconList();
void ClearIconList();
int ResetIconList(LPSTR szNewFileName);

};


// TBorDlgAbout //////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
class TBorDlgAbout : public TDialog {
public:
TBorDlgAbout(PTWindowsObject AParent, int ResourceID)
: TDialog(AParent, ResourceID) {};
virtual LPSTR GetClassName();
virtual void GetWindowClass(WNDCLASS& AWndClass);
void SetupWindow();
};


// TTestWindow ///////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
class TTestWindow : public TWindow
{
public:
TTestWindow(PTWindowsObject AParent, LPSTR ATitle);
virtual void SetupWindow();
virtual void CMTest(RTMessage Msg) = [CM_FIRST + CM_CHANGEICON];
};


// TApplication //////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
class TTestApp : public TApplication
{
public:
TTestApp(LPSTR AName, HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPSTR lpCmdLine, int nCmdShow)
: TApplication(AName, hInstance, hPrevInstance, lpCmdLine, nCmdShow) {};

virtual void InitMainWindow();
};

// ------------------------------------------------------------------
#endif


  3 Responses to “Category : C Source Code
Archive   : ICOPIK.ZIP
Filename : ICOPIK.HPP

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/