예제 #1
0
int MGLSample1Proc(WND wnd, int msg, int wparam, int lparam)
{
	int handled=FALSE;

	switch (msg)
	{
	case AWM_CREATE:
	case AWM_LOAD:
		MsgCreate(wnd, msg, wparam, lparam);
		handled = TRUE;
		break;

	case AWM_KEYDOWN:
		MsgKeyDown( wnd, wparam, lparam );
		handled = TRUE;
		break;

	case AWM_DESTROY:
	case AWM_SAVE:
		MsgDestroy(wnd, msg, wparam, lparam);
		handled = TRUE;
		break;

	case AWM_TIMER:
		MsgTimer(wnd, msg, wparam, lparam);
		handled = TRUE;
		break;
	}

	return handled;
}
예제 #2
0
INT_PTR NoiseGateSettings::ProcMessage(UINT message, WPARAM wParam, LPARAM lParam)
{
    switch(message)
    {
    case WM_INITDIALOG:
        MsgInitDialog();
        return TRUE;
    case WM_DESTROY:
        MsgDestroy();
        return TRUE;
    case WM_COMMAND:
        return MsgClicked(LOWORD(wParam), HIWORD(wParam), (HWND)lParam);
    case WM_VSCROLL:
    case WM_HSCROLL:
        return MsgScroll(message == WM_VSCROLL, wParam, lParam);
    case WM_TIMER:
        return MsgTimer((int)wParam);
    }
    return FALSE;
}
예제 #3
0
파일: widget.cpp 프로젝트: bambams/ma5king
int MAS::Widget::SendMessage(int msg, intptr_t c) {
   int ret = D_O_K;

   // convert the Allegro message constant to a MASkinG message handler
   switch (msg) {
      case (MSG_START):   MsgStart();   Animate();   break;
      case (MSG_END):      MsgEnd();      break;
      case (MSG_DRAW):   MsgDraw();      break;
      case (MSG_CLICK):   MsgClick();      break;
      case (MSG_DCLICK):   MsgDClick();   break;
      case (MSG_KEY):      MsgKey();      break;
      case (MSG_CHAR):   if (MsgChar(c))      ret |= D_USED_CHAR;      break;
      case (MSG_UCHAR):   if (MsgUChar(c))   ret |= D_USED_CHAR;      break;
      case (MSG_XCHAR):   if (MsgXChar(c))   ret |= D_USED_CHAR;      break;
      case (MSG_WANTFOCUS):   if (MsgWantfocus())   ret |= D_WANTFOCUS;   break;
      case (MSG_GOTFOCUS):   MsgGotfocus();      break;
      case (MSG_LOSTFOCUS):   MsgLostfocus();      break;
      case (MSG_GOTMOUSE):   MsgGotmouse();      break;
      case (MSG_LOSTMOUSE):   MsgLostmouse();      break;
      case (MSG_RADIO):      MsgRadio(c);      break;
      case (MSG_WHEEL):      MsgWheel(c);      break;
      case (MSG_LPRESS):      MsgLPress();      break;
      case (MSG_MPRESS):      MsgMPress();      break;
      case (MSG_RPRESS):      MsgRPress();      break;
      case (MSG_LRELEASE):   MsgLRelease();      break;
      case (MSG_MRELEASE):   MsgMRelease();      break;
      case (MSG_RRELEASE):   MsgRRelease();      break;
      case (MSG_MOVE):      MsgMove();         break;
      case (MSG_RESIZE):      MsgResize();      break;
      case (MSG_SHAPE):      MsgShape();         break;
      case (MSG_TIMER):      MsgTimer((ALLEGRO_TIMER_EVENT *)c); break;
      case (MSG_TICK):      MsgTick();         break;
      case (MSG_INITSKIN):   MsgInitSkin();      break;
      case (MSG_CLOSE):      if (MsgClose()) ret |= D_CLOSE;      break;
      case (MSG_WANTMOUSE):   if (MsgWantmouse())   ret |= D_WANTFOCUS;   break;
      case (MSG_WANTTAB):      if (MsgWantTab())   ret |= D_WANTFOCUS;   break;
   };

   return ret;
}