C++ C++;最小应用程序大小的WM_大小

C++ C++;最小应用程序大小的WM_大小,c++,windows,visual-studio-2013,C++,Windows,Visual Studio 2013,我试图使用WM_SIZE事件强制应用程序具有最小大小,代码如下: case WM_SIZE: int nWidth; int nHeight; int _dWidth; int _dHeight; _dWidth = 870; _dHeight = 510; nWidth = LOWORD(lParam); nHeight = HIWORD(lParam); if (nWidth <= _dWidth){

我试图使用WM_SIZE事件强制应用程序具有最小大小,代码如下:

  case WM_SIZE:
   int nWidth;
   int nHeight;
   int _dWidth;
   int _dHeight;       
   _dWidth  = 870;
    _dHeight = 510; 
   nWidth  = LOWORD(lParam);
   nHeight = HIWORD(lParam);
   if (nWidth <= _dWidth){
    return 0;
   }
   else if (nHeight <= _dHeight) {
    return 0;
   }
case WM\u大小:
int nWidth;
内特海特;
国际宽度;
八分之一;
_dWidth=870;
_dHeight=510;
nWidth=低位(lParam);
nHeight=HIWORD(lParam);

if(nWidth正确的处理方法是为消息实现一个处理程序

收到该消息时,您可以填写结构的字段,以提供窗口的最小和最大可接受大小。与用户交互时,窗口管理器将正确处理这些限制


WM\u SIZE
是一个单向的通知,而不是您可以协商的东西。您只需使布局或窗口内容无效。

WM\u SIZE,而不是WM\u SIZE。