📄 common.h
字号:
#ifndef _COMMON_H
#define _COMMON_H
#include "accel.h"
#include "net.h"
class video_channel;
class ip_port;
extern USHORT get_port(ULONG ip);
extern void get_addr(LPCTSTR alias, ULONG& ip, USHORT& port);
extern CString get_alias(const ip_port& ipp);
extern int get_chnls(LPCTSTR alias);
extern int get_chnls(ULONG ip, USHORT port);
extern void fill_combo(CComboBox* cbb);
extern void fill_combo_chnls(LPCTSTR alias, CComboBox* cbb);
extern void fill_combo_inputs(LPCTSTR alias, CComboBox* cbb);
extern video_channel* who_opened_it(LPCTSTR alias, int channel);
extern bool there_is_d1();
extern void set_net_opt(LPCTSTR alias, DWORD opt,
void* stuff, OPT_SET_CALLEE cb);
extern void get_net_opt(LPCTSTR alias, DWORD opt,
int channel, OPT_GET_CALLEE cb);
extern void get_net_opt_file(LPCTSTR alias, byte *m_byte, OPT_GET_CALLEE cb);
extern void get_net_opt_backup_file(LPCTSTR alias, byte *m_byte, OPT_GET_CALLEE cb);
#define SIZE_OF(x) sizeof(x)/sizeof(x[0])
#define GET_ALIAS CString alias = get_alias(); if( alias.IsEmpty() ) return;
extern void start_bk(LPCTSTR alias, void* opt, BACKUP_CALLEE cb);
extern void stop_bk(LPCTSTR alias);
extern bool start_talk();
extern bool stop_talk();
extern bool talk_status();
extern void fill_combo_week(CComboBox* cbb);
extern PRIVILEGE get_priv(ULONG ip, USHORT port);
extern PRIVILEGE get_priv(LPCTSTR alias);
extern bool check_popedom(ULONG ip, USHORT port, int channel,int position);
extern void write_log_file(CString m_string);
extern void clear_all_alarm(ULONG ip, USHORT port);
extern bool check_16_version(ULONG ip, USHORT port);
extern bool check_4004_version(ULONG ip, USHORT port);
extern bool check_4008_version(ULONG ip, USHORT port);
extern bool check_2000_version(ULONG ip, USHORT port);
extern bool check_2100_version(ULONG ip, USHORT port);
extern bool check_sel_channel(ULONG ip, USHORT port, int m_channel);
extern void get_disk_info(ULONG ip, USHORT port);
extern bool get_station_state(CString m_station, int address);
extern void save_compound_file(CString filepath);
extern void load_compound_file(CString filepath);
extern void send_alarm_output(ULONG ip, USHORT port, int output);
class IDString: public CString
{
public:
IDString(UINT id)
{
LoadString(id);
}
};
static bool
is_visible(CWnd* p)
{
if( !IsWindow(p->m_hWnd) )
return false;
return FALSE != IsWindowVisible(p->m_hWnd);
}
#endif // _COMMON_H
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -