Einzelnen Beitrag anzeigen

EWeiss
(Gast)

n/a Beiträge
 
#1

WM_DESTROY wird nicht ausgelößt

  Alt 17. Feb 2009, 20:07
Warum wird bei IDM_EXIT oder beim klick auf den X-Button kein WM_DESTROY ausgelößt?

Code:
LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
   int wmId, wmEvent;
   PAINTSTRUCT ps;
   HDC hdc;
    BASSVIS_KIND_T pluginKind = lastVisParam.Kind;

   switch (message)
   {
   case WM_COMMAND:
      wmId   = LOWORD(wParam);
      wmEvent = HIWORD(wParam);
      // Parse the menu selections:
      switch (wmId)
      {
      case IDM_ABOUT:
         DialogBox(hInst, MAKEINTRESOURCE(IDD_ABOUTBOX), hWnd, About);
         break;
      case IDM_EXIT:
         DestroyWindow(hWnd);
         break;
      default:
         return DefWindowProc(hWnd, message, wParam, lParam);
      }
      break;
   case WM_PAINT:
      hdc = BeginPaint(hWnd, &ps);
      // TODO: Add any drawing code here...
      EndPaint(hWnd, &ps);
      break;
    case WM_SIZE:

      switch ((pluginKind))
      {
      case BASSVISKIND_WINAMP:
        myVisParamVisHandle.VisHandle = (HVIS)hWnd;
        myVisParamVisHandle.Kind = BASSVISKIND_WINAMP;
        if (lastVisParam.VisHandle != 0)
          BASSVIS_Resize(&myVisParamVisHandle, 0, 0, LOWORD(lParam), HIWORD(lParam));
        break;

      case BASSVISKIND_WMP:
     case BASSVISKIND_SONIQUE:
        if (lastVisParam.VisHandle != 0)
          BASSVIS_Resize(&lastVisParam, 0, 0, LOWORD(lParam), HIWORD(lParam));
        break;
      }

        break;
   case WM_DESTROY:
      BASSVIS_Quit(&lastVisParam);
        BASS_Free();

        PostQuitMessage(0);
       break;
   default:
      return DefWindowProc(hWnd, message, wParam, lParam);
   }
   return 0;
}
EDIT:
Hat sich erledigt.

gruss Emil
  Mit Zitat antworten Zitat