本文整理汇总了C++中HANDLE_MSG函数的典型用法代码示例。如果您正苦于以下问题:C++ HANDLE_MSG函数的具体用法?C++ HANDLE_MSG怎么用?C++ HANDLE_MSG使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了HANDLE_MSG函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: CharFaceDialogProc
BOOL CALLBACK CharFaceDialogProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
switch (message)
{
case WM_INITDIALOG:
CharFaceInitDialog(hDlg);
break;
case WM_NOTIFY:
switch (((LPNMHDR) lParam)->code)
{
case PSN_SETACTIVE:
break;
}
return TRUE;
case WM_DRAWITEM:
CharDrawFace();
return TRUE;
HANDLE_MSG(hDlg, WM_COMMAND, CharFaceCommand);
HANDLE_MSG(hDlg, WM_HSCROLL, CharFaceHScroll);
}
return FALSE;
}
开发者ID:AlleyCat1976,项目名称:Meridian59_103,代码行数:25,代码来源:charface.c
示例2: WndProc
//
// FUNCTION: WndProc(HWND, unsigned, WORD, LONG)
//
// PURPOSE: Processes messages for the main window.
//
// WM_COMMAND - process the application menu
// WM_PAINT - Paint the main window
// WM_DESTROY - post a quit message and return
//
//
LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
HDC hdc;
PAINTSTRUCT ps;
TCHAR szHello[MAX_LOADSTRING];
switch (message)
{
HANDLE_MSG(hWnd, WM_DESTROY, OnDestroy);
HANDLE_MSG(hWnd, WM_CREATE, OnCreate);
HANDLE_MSG(hWnd, WM_SETFOCUS, OnSetFocus);
HANDLE_MSG(hWnd, WM_SIZE, OnSize);
HANDLE_MSG(hWnd, WM_COMMAND, OnCommand);
case WM_PAINT:
RECT rt;
hdc = BeginPaint(hWnd, &ps);
GetClientRect(hWnd, &rt);
LoadString(hInst, IDS_HELLO, szHello, MAX_LOADSTRING);
DrawText(hdc, szHello, _tcslen(szHello), &rt,
DT_SINGLELINE | DT_VCENTER | DT_CENTER);
EndPaint(hWnd, &ps);
break;
case WM_SETTINGCHANGE:
SHHandleWMSettingChange(hWnd, wParam, lParam, &s_sai);
break;
default:
return DefWindowProc(hWnd, message, wParam, lParam);
}
return 0;
}
开发者ID:venkatarajasekhar,项目名称:repo,代码行数:40,代码来源:EDITOR.CPP
示例3: while
INT_PTR IDialog::lpStaticDlgProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) {
auto it = dlgList.begin();
// It will be replaced with a message filter
if (uMsg == WM_INITDIALOG || uMsg == WM_COMMAND || uMsg == WM_CLOSE) {
while (it != dlgList.end()) {
if (it->first && !it->second) {
it->first->hWndThis_ = hWnd;
it->second = hWnd;
break;
}
++it;
}
it = dlgList.begin();
if (it->second != hWnd) {
it = dlgList.begin();
while (it->second != hWnd) ++it;
}
}
switch (uMsg) {
HANDLE_MSG(hWnd, WM_INITDIALOG, it->first->OnInitDialog);
HANDLE_MSG(hWnd, WM_COMMAND, it->first->OnCommand);
HANDLE_MSG(hWnd, WM_CLOSE, it->first->OnClose);
}
return FALSE;
}
开发者ID:Art-Stea1th,项目名称:IP-Calc,代码行数:29,代码来源:Dialog.cpp
示例4: MapHDDWinM_OnCommand
//------------------------------------------------------------------------------
#pragma argsused
static void MapHDDWinM_OnCommand(HWND hwnd, int id, HWND hwndCtl, UINT CodeNotify)
{
switch(id)
{
#if defined TEST_FAT1_VOST //Проверка и восстановление FAT1 на потерянные кластеры
case IDC_VOST: Vost_FAT1(); //Чистка FAT1 от потерянных кластеров
break;
#endif
case IDOK: DestroyWindow(hwnd);
break;
}
}
//------------------------------------------------------------------------------
#pragma argsused
static LRESULT CALLBACK WndProc_MapHDD_W1(HWND hwnd, UINT Msg, WPARAM wParam, LPARAM lParam)
{
switch(Msg)
{
HANDLE_MSG(hwnd, WM_PAINT, MapHDDWin1_OnPaint);
default: return DefWindowProc(hwnd, Msg, wParam, lParam);
}
}
//------------------------------------------------------------------------------
#pragma argsused
static void MapHDDWinM_OnDestroy(HWND hwnd)
{
开发者ID:mpapierski,项目名称:from-hdd-lg-to-pc,代码行数:33,代码来源:hdd_lg_map_hdd.cpp
示例5: view_xmlexDialogProc
LRESULT CALLBACK view_xmlexDialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam,LPARAM lParam)
{
/* first, ask the dialog skinning system if it wants to do anything with the message
the function pointer gets set during WM_INITDIALOG so might be NULL for the first few messages
in theory we could grab it right here if we don't have it, but it's not necessary
and I wanted to put all the function pointer gathering code in the same place for this example */
if (ml_hook_dialog_msg)
{
INT_PTR a = ml_hook_dialog_msg(hwndDlg, uMsg, wParam, lParam);
if (a)
return a;
}
switch(uMsg) {
HANDLE_MSG(hwndDlg, WM_INITDIALOG, xmlex_OnInitDialog);
HANDLE_MSG(hwndDlg, WM_TIMER, xmlex_OnTimer);
HANDLE_MSG(hwndDlg, WM_COMMAND, xmlex_OnCommand);
HANDLE_MSG(hwndDlg, WM_SIZE, xmlex_OnSize);
case WM_PAINT:
{
int tab[] = { IDC_LIST|DCW_SUNKENBORDER};
ml_draw(hwndDlg, tab, sizeof(tab) / sizeof(tab[0]));
}
return 0;
HANDLE_MSG(hwndDlg, WM_DESTROY, xmlex_OnDestroy);
}
return FALSE;
}
开发者ID:ZeroTheSavior,项目名称:remotecontrol-for-winamp,代码行数:29,代码来源:xmlview.cpp
示例6: GetWindowRect
LRESULT CALLBACK se_task::Cruler::_wndProc( HWND hWnd, unsigned int Msg, WPARAM wParam, LPARAM lParam )
{
if (Msg == UWM_MOUSEMOVE)
{
RECT rc;
GetWindowRect(hWnd, &rc);
POINT pt;
GetCursorPos(&pt);
Cruler::_crulerOnMouseMove(hWnd, pt.x - rc.left, pt.y - rc.top, wParam);
return 0;
}
if (Msg == UWM_LBUTTONUP)
{
Cruler::_crulerOnLButtonUp(hWnd, 0, 0, 0);
return 0;
}
switch (Msg)
{
HANDLE_MSG(hWnd, WM_LBUTTONDOWN, Cruler::_crulerOnLButtonDown);
HANDLE_MSG(hWnd, WM_LBUTTONUP, Cruler::_crulerOnLButtonUp);
HANDLE_MSG(hWnd, WM_MOUSEMOVE, Cruler::_crulerOnMouseMove);
HANDLE_MSG(hWnd, WM_PAINT, Cruler::_crulerOnPaint);
HANDLE_MSG(hWnd, WM_SIZE, Cruler::_crulerOnSize);
}
return DefWindowProc(hWnd, Msg, wParam, lParam);
}
开发者ID:smi13,项目名称:semester06,代码行数:32,代码来源:cruler_wndproc.cpp
示例7: PetscWndProc
LRESULT CALLBACK PetscWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
int wmId, wmEvent;
PetscFunctionBegin;
switch (message) {
HANDLE_MSG(hWnd,WM_PAINT,OnPaint_Win32);
HANDLE_MSG(hWnd,WM_DESTROY,OnDestroy_Win32);
case WM_COMMAND:
wmId = LOWORD(wParam);
wmEvent = HIWORD(wParam);
/* Parse the menu selections:*/
switch (wmId) {
case IDM_EXIT:
DestroyWindow(hWnd);
break;
default:
return DefWindowProc(hWnd, message, wParam, lParam);
}
break;
case WM_LBUTTONUP:
MouseRecord_Win32(hWnd,PETSC_BUTTON_LEFT);
break;
case WM_RBUTTONUP:
MouseRecord_Win32(hWnd,PETSC_BUTTON_RIGHT);
break;
case WM_MBUTTONUP:
MouseRecord_Win32(hWnd,PETSC_BUTTON_CENTER);
break;
default:
PetscFunctionReturn(DefWindowProc(hWnd, message, wParam, lParam));
}
PetscFunctionReturn(0);
}
开发者ID:pombredanne,项目名称:petsc,代码行数:34,代码来源:win32draw.c
示例8: WndProc
LRESULT CALLBACK
WndProc(HWND hwnd, UINT uiMsg, WPARAM wParam, LPARAM lParam)
{
switch (uiMsg) {
HANDLE_MSG(hwnd, WM_CREATE, OnCreate);
HANDLE_MSG(hwnd, WM_SIZE, OnSize);
HANDLE_MSG(hwnd, WM_DESTROY, OnDestroy);
HANDLE_MSG(hwnd, WM_PAINT, OnPaint);
case WM_PRINTCLIENT: OnPrintClient(hwnd, (HDC)wParam); return 0;
case WM_CONTEXTMENU:
if (lParam != -1 &&
SendMessage(hwnd, WM_NCHITTEST,
0, lParam) == HTSYSMENU) {
HMENU hmenu = CreatePopupMenu();
if (hmenu) {
AppendMenu(hmenu, MF_STRING, 1,
TEXT("Custom menu"));
TrackPopupMenu(hmenu, TPM_LEFTALIGN |
TPM_TOPALIGN |
TPM_RIGHTBUTTON,
GET_X_LPARAM(lParam),
GET_Y_LPARAM(lParam), 0, hwnd,
NULL);
DestroyMenu(hmenu);
}
return 0;
}
break;
}
return DefWindowProc(hwnd, uiMsg, wParam, lParam);
}
开发者ID:AnarNFT,项目名称:books-code,代码行数:33,代码来源:085_captionmenu.cpp
示例9: EventDlgProc
LRESULT CALLBACK EventDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
HWND hctlListbox;
switch (uMsg)
{
case WM_PLEASE_DISPLAY:
hctlListbox = GetDlgItem(hDlg, IDC_RESULTS);
ListBox_SetTopIndex(hctlListbox, ListBox_AddString(hctlListbox, lParam));
break;
case WM_CLOSE:
DestroyWindow(hDlg);
hDlgMain = NULL;
break;
case WM_DESTROY:
return TRUE;
break;
HANDLE_MSG(hDlg, WM_INITDIALOG, EventDlg_OnInitDialog);
HANDLE_MSG(hDlg, WM_COMMAND, EventDlg_OnCommand);
default:
return (FALSE);
}
return 0;
}
开发者ID:jiangguang5201314,项目名称:ZNginx,代码行数:29,代码来源:EVENTTST.C
示例10: WndProc
// Window Procedure
LRESULT CALLBACK WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
switch (msg) {
HANDLE_MSG (hWnd, WM_CREATE, OnCreate );
HANDLE_MSG (hWnd, WM_DESTROY, OnDestroy );
HANDLE_MSG (hWnd, WM_PAINT, OnPaint );
case WM_COPYDATA:
return OnCopyData( hWnd, (HWND)wParam, (PCOPYDATASTRUCT)lParam );
default:
if( msg == WM_SKYPECONTROL_ATTACH){
if(lParam == 0){
hSkypeWnd = (HWND)wParam;
}
jclass clazz = envWndProc->GetObjectClass(*objWndProc);
if( clazz == NULL ){
printf("cannot find class\n");
}
jmethodID methodid = envWndProc->GetMethodID( clazz,
"jni_onAttach", "(I)V");
if( methodid == NULL ){
printf("cannot find methodid\n");
}
envWndProc->CallIntMethod(*objWndProc, methodid, (int)lParam );
}
break;
}
return DefWindowProc(hWnd, msg, wParam, lParam);
}
开发者ID:WhiteMexicanIsland,项目名称:vosyana,代码行数:34,代码来源:Win32Connector.cpp
示例11: WndProc
//
// FUNCTION: WndProc(HWND, unsigned, WORD, LONG)
//
// PURPOSE: Processes messages for the main window.
//
// WM_COMMAND - process the application menu
// WM_PAINT - Paint the main window
// WM_DESTROY - post a quit message and return
//
//
LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
int wmId, wmEvent;
switch (message)
{
HANDLE_MSG(hWnd, WM_CHAR, OnChar);
HANDLE_MSG(hWnd, WM_CREATE, OnCreate);
HANDLE_MSG(hWnd, WM_PAINT, OnPaint);
case WM_COMMAND:
wmId = LOWORD(wParam);
wmEvent = HIWORD(wParam);
// Parse the menu selections:
switch (wmId)
{
case IDM_HELP_ABOUT:
DialogBox(hInst, (LPCTSTR)IDD_ABOUTBOX, hWnd, (DLGPROC)About);
break;
case IDM_FILE_EXIT:
DestroyWindow(hWnd);
break;
default:
return DefWindowProc(hWnd, message, wParam, lParam);
}
break;
case WM_DESTROY:
CommandBar_Destroy(hwndCB);
PostQuitMessage(0);
break;
default:
return DefWindowProc(hWnd, message, wParam, lParam);
}
return 0;
}
开发者ID:venkatarajasekhar,项目名称:repo,代码行数:44,代码来源:KEYINPUT.cpp
示例12: textWndProc
static LRESULT CALLBACK textWndProc(
HWND hwnd,
UINT message,
WPARAM wParam,
LPARAM lParam)
{
switch(message)
{
HANDLE_MSG(hwnd,WM_CLOSE, text_OnClose);
HANDLE_MSG(hwnd,WM_COMMAND, text_OnCommand);
HANDLE_MSG(hwnd,WM_CONTEXTMENU, text_OnContextMenu);
HANDLE_MSG(hwnd,WM_CTLCOLOREDIT, text_OnCtlColorEdit);
HANDLE_MSG(hwnd,WM_DESTROY, text_OnDestroy);
HANDLE_MSG(hwnd,WM_INITMENUPOPUP,text_OnInitMenuPopup);
HANDLE_MSG(hwnd,WM_MDIACTIVATE,text_OnMDIActivate);
HANDLE_MSG(hwnd,WM_QUERYENDSESSION, text_OnQueryEndSession);
HANDLE_MSG(hwnd,WM_SETFOCUS, text_OnSetFocus);
HANDLE_MSG(hwnd,WM_SIZE, text_OnSize);
case UWM_UPDATE_MENU:
text_OnUpdateMenu(hwnd,GetMenu(hMainFrame));
text_OnUpdateMenu(hwnd,TextContextMenu);
return 0;
case UWM_CONTEXTMENU:
return HANDLE_WM_CONTEXTMENU(hwnd,wParam,lParam,
text_OnContextMenu);
}
return DefMDIChildProc(hwnd, message, wParam, lParam);
}
开发者ID:atrniv,项目名称:CLIPS,代码行数:31,代码来源:Text.c
示例13: WndProc
//
// FUNCTION: WndProc(HWND, unsigned, WORD, LONG)
//
// PURPOSE: Processes messages for the main window.
//
// WM_COMMAND - process the application menu
// WM_PAINT - Paint the main window
// WM_DESTROY - post a quit message and return
//
//
LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
HDC hdc;
PAINTSTRUCT ps;
TCHAR szHello[MAX_LOADSTRING];
switch (message)
{
HANDLE_MSG(hWnd, WM_CREATE, OnCreate);
HANDLE_MSG(hWnd, WM_COMMAND, OnCommand);
case WM_PAINT:
RECT rt;
hdc = BeginPaint(hWnd, &ps);
GetClientRect(hWnd, &rt);
LoadString(hInst, IDS_HELLO, szHello, MAX_LOADSTRING);
DrawText(hdc, szHello, _tcslen(szHello), &rt,
DT_SINGLELINE | DT_VCENTER | DT_CENTER);
EndPaint(hWnd, &ps);
break;
case WM_DESTROY:
CommandBar_Destroy(hwndCB);
PostQuitMessage(0);
break;
default:
return DefWindowProc(hWnd, message, wParam, lParam);
}
return 0;
}
开发者ID:venkatarajasekhar,项目名称:repo,代码行数:38,代码来源:List.cpp
示例14: PrintDlgProc
LRESULT CALLBACK PrintDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
switch (uMsg)
{
case WM_CLOSE:
DestroyWindow(hDlg);
hDlgMain = NULL;
break;
case WM_DESTROY:
return TRUE;
break;
case WM_SHOWBITMAP:
if (gbmpDisplay)
DeleteObject(gbmpDisplay);
gDisplayRect = *(RECT*)wParam;
gbmpDisplay = (HBITMAP) lParam;
InvalidateRect(hDlgMain, NULL, TRUE);
break;
HANDLE_MSG(hDlg, WM_INITDIALOG, PrintDlg_OnInitDialog);
HANDLE_MSG(hDlg, WM_COMMAND, PrintDlg_OnCommand);
HANDLE_MSG(hDlg, WM_PAINT, PrintDlg_OnPaint);
default:
return (FALSE);
}
return 0;
}
开发者ID:jiangguang5201314,项目名称:ZNginx,代码行数:32,代码来源:BACKPRNT.C
示例15: guiWndProc
long PASCAL guiWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
gui.wParam = wParam;
gui.lParam = lParam;
switch (message)
{
HANDLE_MSG(hwnd, WM_CREATE, guiOnCreate);
HANDLE_MSG(hwnd, WM_COMMAND, guiOnCommand);
HANDLE_MSG(hwnd, WM_MENUSELECT, guiOnMenuSelect);
HANDLE_MSG(hwnd, WM_SIZE, guiOnSize);
HANDLE_MSG(hwnd, WM_CLOSE, guiOnClose);
HANDLE_MSG(hwnd, WM_PAINT, guiOnPaint);
HANDLE_MSG(hwnd, WM_SETCURSOR, guiOnSetCursor);
HANDLE_MSG(hwnd, WM_LBUTTONDOWN, guiOnLButtonDown);
HANDLE_MSG(hwnd, WM_LBUTTONUP, guiOnLButtonUp);
HANDLE_MSG(hwnd, WM_MOUSEMOVE, guiOnMouseMove);
case WM_CAPTURECHANGED:
guiOnCaptureChanged((HWND)lParam);
return 0;
case WM_SHELLNOTIFY:
return guiOnShellNotify(wParam, lParam);
}
return DefWindowProc(hwnd, message, wParam, lParam);
}
开发者ID:GrindamN,项目名称:pvpgn,代码行数:27,代码来源:winmain.cpp
示例16: DlgProc
BOOL CALLBACK DlgProc(HWND hWnd, UINT mes, WPARAM wParam, LPARAM lParam){
switch(mes){
HANDLE_MSG(hWnd, WM_CLOSE, OnClose);
HANDLE_MSG(hWnd, WM_INITDIALOG, OnInitDlg);
HANDLE_MSG(hWnd, WM_HSCROLL, OnHScroll);
}
return false;
}
开发者ID:dizinor,项目名称:IT-Step,代码行数:8,代码来源:main.cpp
示例17: m_DlgProc
BOOL CALLBACK m_DlgProc(HWND setupDlg, UINT message, WPARAM wParam
, LPARAM lParam)
{
switch (message) {
HANDLE_MSG(setupDlg, WM_INITDIALOG, m_OnInitDialog);
HANDLE_MSG(setupDlg, WM_COMMAND, m_OnCommand);
}
return FALSE;
}
开发者ID:fourks,项目名称:tx81z-programmer,代码行数:9,代码来源:midi.c
示例18: switch
BOOL CALLBACK GetLogicalDrivers::DlgProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
switch (message)
{
HANDLE_MSG(hwnd, WM_CLOSE, ptr->Cls_OnClose);
HANDLE_MSG(hwnd, WM_INITDIALOG, ptr->Cls_OnInitDialog);
}
return FALSE;
}
开发者ID:NikitaVas,项目名称:WinAPI,代码行数:9,代码来源:GetLogicalDrivers.cpp
示例19: About_DlgProc
INT_PTR CALLBACK About_DlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) {
switch(msg) {
HANDLE_MSG(hwnd, WM_CLOSE, About_OnClose);
HANDLE_MSG(hwnd, WM_COMMAND, About_OnCommand);
HANDLE_MSG(hwnd, WM_DESTROY, About_OnDestroy);
HANDLE_MSG(hwnd, WM_INITDIALOG, About_OnInitDialog);
default: return FALSE;
}
}
开发者ID:340211173,项目名称:P2PCenter,代码行数:9,代码来源:aboutproc.cpp
示例20: DialogProc
INT_PTR CALLBACK DialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
switch (uMsg) {
HANDLE_MSG(hwndDlg, WM_INITDIALOG, DlgOnInit);
HANDLE_MSG(hwndDlg, WM_COMMAND, DlgOnCommand);
default:
return FALSE;
}
}
开发者ID:nezhelskoy,项目名称:VPNConnectionSetup,代码行数:9,代码来源:main.cpp
注:本文中的HANDLE_MSG函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论