It will not compile!

You better get the code compiling and then organize the code such that you can at-least insert break-points on individual line. Your code will work perfectly if you fix the "worker" constructor (implementation is missing, how come it will compile), and class terminating ";" (It will for sure not compile).

Also note that you have while(1) loop in ctor, you will never be able to see the window pop up. Breakpoint is the only way you can see it work.