?? globals.h
字號:
/**
* Globals.h Copyright _ 2001 Li Zhaoming. All rights reserved.
* Contains declarations for all globally scoped names in the program
*/
#define IDM_PLAY 201
#define IDM_TIMER 32900
#define TIMER_TIMEOUT 100
#define MAX_LOADSTRING 100
/**
* Functions for handling main window messages. The message-dispatching
* mechanism expects all message-handling functions to have the following
* prototype:
*
* LRESULT FunctionName(HWND, UINT, WPARAM, LPARAM);
*
* TO DO: Add message-handling function prototypes here. Be sure to
* add the function names to the main window message table in
* DataBrowser.cpp.
*/
LRESULT msgCommand (HWND, UINT, WPARAM, LPARAM);
LRESULT msgCreate (HWND, UINT, WPARAM, LPARAM);
LRESULT msgDestroy (HWND, UINT, WPARAM, LPARAM);
LRESULT msgSize (HWND, UINT, WPARAM, LPARAM);
LRESULT msgKeyDown (HWND, UINT, WPARAM, LPARAM);
LRESULT msgTimer (HWND, UINT, WPARAM, LPARAM);
LRESULT msgPaint (HWND, UINT, WPARAM, LPARAM);
LRESULT msgGetMinMaxInfo(HWND, UINT, WPARAM, LPARAM);
LRESULT msgSysCommand (HWND, UINT, WPARAM, LPARAM);
LRESULT msgNotify (HWND, UINT, WPARAM, LPARAM);
/**
* Functions for handling main window commands--ie. functions for
* processing WM_COMMAND messages based on the wParam value.
* The message-dispatching mechanism expects all command-handling
* functions to have the following prototype:
*
* LRESULT FunctionName(HWND, WORD, WORD, HWND);
*
* TO DO: Add message-handling function prototypes here. Be sure to
* add the function names to the main window command table in
* DataBrowser.cpp.
*/
LRESULT cmdExit(HWND, WORD, WORD, HWND);
LRESULT cmdAbout(HWND, WORD, WORD, HWND);
LRESULT cmdOpenFile(HWND, WORD, WORD, HWND);
LRESULT cmdPlay(HWND, WORD, WORD, HWND);
LRESULT cmdPause(HWND, WORD, WORD, HWND);
LRESULT cmdStop(HWND, WORD, WORD, HWND);
LRESULT cmdRewind(HWND, WORD, WORD, HWND);
LRESULT cmdForward(HWND, WORD, WORD, HWND);
LRESULT cmdRepeat(HWND, WORD, WORD, HWND);
LRESULT cmdToolbar(HWND, WORD, WORD, HWND);
LRESULT cmdTopMost(HWND, WORD, WORD, HWND);
LRESULT cmdFullScreen(HWND, WORD, WORD, HWND);
/**
* Global function prototypes.
* TO DO: Add global function prototypes here.
*/
BOOL createToolbar(HWND);
void updateStatusBar(LPCTSTR, double);
void openVideoFile(HWND, LPSTR);
BOOL centerWindow(HWND, HWND);
BOOL initApplication(HINSTANCE, int);
// Callback functions. These are called by Windows.
// TO DO: Add new callback function prototypes here.
LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);
UINT CALLBACK ofnHookProc(HWND, UINT, WPARAM, LPARAM);
// -----------------------------------------------------------------------
// Global Variable declarations
//
extern HINSTANCE g_hinstance; // The current instance
extern char szAppName[];
extern char szTitle[];
extern char szOpenPath[];
extern HWND hwndRebar;
extern HWND hwndToolbar;
extern HWND hwndTrack;
extern BOOL g_bFullScreen;
// TO DO: For NON-MDI applications, uncomment line 1 below and comment
// line 2. For MDI applications, uncomment line 2 below, comment
// line 1, and then define hwndMDIClient as a global variable in
// WimMain.cpp
#define hwndMDIClient NULL /* (1) Stub for NON-MDI applications. */
// extern HWND hwndMDIClient; /* (2) For MDI applications. */
//-------------------------------------------------------------------------
// Message and command dispatch infrastructure. The following type
// definitions and functions are used by the message and command dispatching
// mechanism and do not need to be changed.
// Function pointer prototype for message handling functions.
typedef LRESULT (*PFNMSG)(HWND,UINT,WPARAM,LPARAM);
// Function pointer prototype for command handling functions.
typedef LRESULT (*PFNCMD)(HWND,WORD,WORD,HWND);
// Enumerated type used to determine which default window procedure
// should be called by the message- and command-dispatching mechanism
// if a message or command is not handled explicitly.
typedef enum
{
edwpNone, // Do not call any default procedure.
edwpWindow, // Call DefWindowProc.
edwpDialog, // Call DefDlgProc (This should be used only for
// custom dialogs - standard dialog use edwpNone).
edwpMDIChild, // Call DefMDIChildProc.
edwpMDIFrame // Call DefFrameProc.
} EDWP; // Enumeration for Default Window Procedures
// This structure maps messages to message handling functions.
typedef struct _MSD
{
UINT uMessage;
PFNMSG pfnmsg;
} MSD; // MeSsage Dispatch structure
// This structure contains all of the information that a window
// procedure passes to dispatchMessage in order to define the message
// dispatching behavior for the window.
typedef struct _MSDI
{
int cmsd; // Number of message dispatch structs in rgmsd
MSD *rgmsd; // Table of message dispatch structures
EDWP edwp; // Type of default window handler needed.
} MSDI, FAR *LPMSDI; // MeSsage Dipatch Information
// This structure maps command IDs to command handling functions.
typedef struct _CMD
{
WORD wCommand;
PFNCMD pfncmd;
} CMD; // CoMmand Dispatch structure
// This structure contains all of the information that a command
// message procedure passes to dispatchCommand in order to define the
// command dispatching behavior for the window.
typedef struct _CMDI
{
int ccmd; // Number of command dispatch structs in rgcmd
CMD *rgcmd; // Table of command dispatch structures
EDWP edwp; // Type of default window handler needed.
} CMDI, FAR *LPCMDI; // CoMmand Dispatch Information
// Message and command dispatching functions. They look up messages
// and commands in the dispatch tables and call the appropriate handler
// function.
LRESULT dispatchMessage(LPMSDI, HWND, UINT, WPARAM, LPARAM);
LRESULT dispatchCommand(LPCMDI, HWND, WPARAM, LPARAM);
// Message dispatch information for the main window
extern MSDI msdiMain;
// Command dispatch information for the main window
extern CMDI cmdiMain;
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -