2013-02-23 43 views
0

我在项目中包含<windows.h>。但我似乎无论如何都无法拨打showWindowgetConsoleWindow'showWindow':未找到标识符<windows.h>包含

#ifdef _WIN32 
    #include <windows.h> 
    bool consoleButtonCallback(void* but); 
#endif 
/*tons of code here*/ 
    /* ... */ 
#ifdef _WIN32 
    bool consoleButtonCallback(void* but) 
    { 
     Opencv_Button* button = (Opencv_Button*)but; 
     bool visible = false; 
     if(button->click%2!=0) 
     { 
      button->val("Hide console"); 
      showWindow(getConsoleWindow(), 1); //'showWindow': identifier not found 

     } 
     else 
     { 
      button->val("Show console"); 
      showWindow(getConsoleWindow(), 0); //'showWindow': identifier not found 
     } 
     return true; 
    } 
#endif 

还有什么我应该包括在我的文件?

回答

相关问题