📄 message.h
字号:
/* Copyright (C) 2004-2005 Li Yudong*//*** This program is free software; you can redistribute it and/or modify** it under the terms of the GNU General Public License as published by** the Free Software Foundation; either version 2 of the License, or** (at your option) any later version.**** This program is distributed in the hope that it will be useful,** but WITHOUT ANY WARRANTY; without even the implied warranty of** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the** GNU General Public License for more details.**** You should have received a copy of the GNU General Public License** along with this program; if not, write to the Free Software** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA*/#ifndef _MESSAGE_H_#define _MESSAGE_H_#ifdef __cplusplusextern "C" {#endiftypedef struct _MSG { // msg HWND hWnd; UINT message; WPARAM wParam; LPARAM lParam; void* pData;} MSG;typedef MSG* PMSG;typedef struct _NtfMsgLink{ MSG msg; struct _NtfMsgLink* pNext;} NtfMsgLink;typedef NtfMsgLink* PNtfMsgLink;typedef struct _SyncMsgLink{ MSG msg; int iRetValue; sem_t sem; struct _SyncMsgLink* pNext;} SyncMsgLink;typedef SyncMsgLink* PSyncMsgLink;typedef struct _WndMailBox{ MSG msg[SIZE_WND_MAILBOX]; int iReadPos; int iWritePos;} WndMailBox;typedef WndMailBox* PWndMailBox;typedef struct _MsgQueue{ pthread_mutex_t mutex; sem_t sem; DWORD dwState; PSyncMsgLink pHeadSyncMsg; PSyncMsgLink pTailSyncMsg; PNtfMsgLink pHeadNtfMsg; PNtfMsgLink pTailNtfMsg; PNtfMsgLink pHeadPntMsg; PNtfMsgLink pTailPntMsg; WndMailBox wndMailBox; HWND TimerOwner[NUM_WIN_TIMERS]; int TimerID[NUM_WIN_TIMERS]; WORD TimerMask; } MsgQueue;typedef MsgQueue* PMsgQueue;BOOL InitMsgQueueHeap();void DestroyMsgQueueHeap();BOOL InitMsgQueue( HWND hWnd);void DestroyMsgQueue( HWND hWnd);PMsgQueue GetMsgQueue( HWND hWnd);BOOL GUIAPIGetMessage( PMSG pMsg, HWND hWnd);BOOL GUIAPIPostMessage( HWND hWnd, int iMsg, WPARAM wParam, LPARAM lParam);BOOL GUIAPIPostQuitMessage( HWND hWnd);int GUIAPISendMessage( HWND hWnd, int iMsg, WPARAM wParam, LPARAM lParam);BOOL GUIAPISendNotifyMessage( HWND hWnd, int iMsg, WPARAM wParam, LPARAM lParam);BOOLSendPaintMessage( HWND hWnd);BOOL GUIAPITranslateMessage( PMSG pMsg);intPostSyncMessage( HWND hWnd, int msg, WPARAM wParam, LPARAM lParam);int GUIAPIDispatchMessage( PMSG pMsg);BOOLPostTimerMessage( HWND hWndWin, HWND hWndOwner, int id);BOOL GUIAPINotifyParent( HWND hWnd, int iMsg);#ifdef __cplusplus}#endif #endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -