Thanks your reply, but I had solved the problem myself,I add the environment variable “DISPLAY=:0.0” in the debug settings page,then the display window can be created on the rpi host.
Yes,if I start my program from some ssh client tool(e.g. putty), I must set “DISPLAY” environment variable to “:0.0”,if it is not set,the window will be created on Windows mathine;