The tutorials are for older version of wx. And the preview is generated with C::B which uses wx2.8.12, this might cause the discrepancy between the preview and the real world.
The best you can do is inspect the code, read the manual of wx and also experiment to find where the problem is coming from.