Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How to hide the cmd window

I have a code to show the local image

#include "stdafx.h"
#include "highgui.h"

int main(int argc, char** argv)
{
    IplImage* img = cvLoadImage("a.png");
    cvNamedWindow("Example1", CV_WINDOW_AUTOSIZE);
    cvShowImage("Example1", img);
    cvWaitKey(0);
    cvReleaseImage(&img);
    cvDestroyWindow("Example1");
}

It will show the image of course,but it will show a black cmd window.Could we hide the cmd window?