#include <stdio.h>
#include <cv.h>
#include <highgui.h>
#define CV_LOAD_IMAGE_UNCHANGED -1
void * WindowHandle1;
char FileName[]="rain.jpg";
IplImage *Image1;


int main()
{
    Image1 = cvLoadImage(FileName,CV_LOAD_IMAGE_GRAYSCALE);

    cvNamedWindow("Show Image",0);
    cvMoveWindow("Show Image",0,0);
    cvResizeWindow("Show Image",300,400);

    WindowHandle1=cvGetWindowHandle("Show Image");
    printf("The Window Handle is : %d\n",WindowHandle1);
    printf("The Window Name is : %s\n",cvGetWindowName(WindowHandle1));
    cvShowImage("Show Image",Image1);

    cvWaitKey(0);

    cvDestroyWindow("Show Image");
    cvReleaseImage(&Image1);
}