私は<windows.h>
自分のプロジェクトに含めました。showWindow
しかし、getConsoleWindow
とにかく電話できないようです。
#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
ファイルに含める必要があるものは他にありますか?