I have a problem (which I have posted on these forums before, but that was a long time ago). Two completely unrelated parts of my program seem to be affecting each other. Simply opening a window (i.e. calling CreateWindow), actually stops a trackbar from working, which is created later on in the program.

If anyone can help me with this, it would be GREATLY appreciated. It has been plaguing me for more than 6 months now. The actual program itself is to display fractals, but the details are not really important. The source code is available here: http://www.projects.hawknetwork.org/DrawIFS-190907.zip. If you run the compiled program under Windows, and then click the "Merge Paint" button, it runs fine and displays a pre-built fractal (the Sierpinski Triangle). Now click the "Add" button; at the bottom you will see a trackbar, and if you drag it, the number above the trackbar changes. Now go into the source code, file ifschooserwindow.cpp, and add the following line immediately before the line SetupTriangle(); in the constructor:

Code:
MessageBox(NULL, "Hello", "Hello", MB_OK);
which simply displays a message box. Now compile, and go through the procedure again. This time, the number does not change when the trackbar is dragged.

I am not entirely sure what is causing this, this is a fairly large program but even so, I can't see why creating a window at this stage would cause the behaviour detailed, later in the execution. Incidentally, this behaviour occurs no matter what window you create (you can create a more complicated window via CreateWindow and so on rather than using ShowMessage, but the behaviour still occurs). Please note that a lot of the parts of the interface do not work yet, they are pretty insignificant compared with this bug.

If anyone can provide me with even a clue as to why this kind of random behaviour could occur, I would owe a great debt to you.