⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 smstalk.h

📁 建立一個傳送和接收SMS訊息的應用程式。SMSTalk是一個對話方塊導向的、多執行緒應用程式
💻 H
字号:

// Returns number of elements
#define dim(x) (sizeof(x) / sizeof(x[0])) 

//----------------------------------------------------------------------
// Generic defines and data types
//
struct decodeUINT {                            // Structure associates
    UINT Code;                                 // messages 
                                               // with a function. 
    BOOL (*Fxn)(HWND, UINT, WPARAM, LPARAM);
}; 
struct decodeCMD {                             // Structure associates
    UINT Code;                                 // menu IDs with a 
    LRESULT (*Fxn)(HWND, WORD, HWND, WORD);    // function.
};

//----------------------------------------------------------------------
// Program defines used by application
//
typedef struct {
    SMS_ADDRESS smsAddr;
    SYSTEMTIME stMsg;
    int nSize;
    WCHAR wcMessage[160];
} MYMSG_STRUCT, *PMYMSG_STRUCT;

#define MAX_MSGS  250
typedef struct {
    int nMsgCnt;
    MYMSG_STRUCT pMsgs[MAX_MSGS];
} MYMSG_DBASE, *PMYMSG_DBASE;

//----------------------------------------------------------------------
// Generic defines used by application

#define MYMSG_TELLNOTIFY     (WM_USER + 100)

#define  ID_ICON             1   

#define  ID_MENU_SP          100   
#define  ID_MENU_PPC         101   
#define  ID_DLGMENU_SP       102

#define  IDD_MSGLIST         110                // Control IDs
#define  IDD_MSGLISTUD       111
#define  IDD_MSGTEXT         112
#define  IDD_MSGTEXTUD       113
#define  IDD_MSGADDR         114

#define  IDM_EXIT            200
#define  ID_CMDSEND          201
#define  ID_CMDNEW           202
#define  ID_CMDREPLY         203
#define  ID_CMDDEL           204
#define  ID_CMDREAD          205
#define  IDM_ABOUT           206
#define  IDFILE              207
#define  IDPOP               208

#define IDS_EXIT             401
#define IDS_MENU             402
#define IDS_MSG              403
#define IDS_FILE             404
#define IDS_OK               405
#define IDS_CANCEL           406
#define IDS_SEND             407

//----------------------------------------------------------------------
// Function prototypes
//
void ErrorBox (HWND hWnd, LPCTSTR lpszFormat, ...);
BOOL OnSmartPhone(void);
int RefreshMessageList (HWND hWnd, int nSel);
int SetButtons (HWND hWnd);

// Window procedures
BOOL CALLBACK MainDlgProc (HWND, UINT, WPARAM, LPARAM);
BOOL CALLBACK WriteDlgProc(HWND, UINT, WPARAM, LPARAM);
BOOL CALLBACK AboutDlgProc(HWND, UINT, WPARAM, LPARAM);

// Message handlers
BOOL DoCreateDialogMain (HWND, UINT, WPARAM, LPARAM);
BOOL DoInitDialogMain (HWND, UINT, WPARAM, LPARAM);
BOOL DoCommandMain (HWND, UINT, WPARAM, LPARAM);
BOOL DoHotKeyMain (HWND, UINT, WPARAM, LPARAM);
BOOL DoTellNotifyMain (HWND, UINT, WPARAM, LPARAM);

// Command functions
LPARAM DoMainCommandExit (HWND, WORD, HWND, WORD);
LPARAM DoMainCommandDelMessage (HWND, WORD, HWND, WORD);
LPARAM DoMainCommandReplyMessage (HWND, WORD, HWND, WORD);
LPARAM DoMainCommandNewMessage (HWND, WORD, HWND, WORD);
LPARAM DoMainCommandMsgList (HWND, WORD, HWND, WORD);
LPARAM DoMainCommandAbout (HWND, WORD, HWND, WORD);

// Thread prototype
DWORD WINAPI MonitorThread (PVOID pArg);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -