pppc/pppc.h

37 lines
863 B
C++

#ifndef PPPC_H
#define PPPC_H
#include "Config.h"
#define APP_NAME "Parallel Port Power Controller"
#define WM_ICON_NOTIFY (WM_APP + 42)
class PPPC
{
public:
PPPC(HINSTANCE hInstance, const char * config_file = NULL);
~PPPC();
BOOL mainLoop();
protected:
void event_start();
void event_exit();
void event_lock();
void event_unlock();
void update_pins();
Config m_config;
HWND m_hWnd;
NOTIFYICONDATA m_nid;
unsigned char m_pins;
unsigned char m_previous_pins;
HMENU m_popupMenu;
};
/* non class-member functions */
void addMenuItem(HMENU hMenu, const CHAR * itemstr, WORD id);
HMENU addMenuSubMenu(HMENU hMenu, const CHAR * itemstr, WORD id);
#endif