Remove "Untitled" next to program title

I just finished writing the first SDI program I have written in years. I usually write dialog based programs but this time I wanted the ability to view my program results in more than one view.

The word "Untitled" appears to the left of the program title. It hasn't been there on SDI programs I have written in the past and I can't figure out how to get rid of it.

I assume it has something to do with displaying an active file, however the program does not support file loading.

I am using VC++ 6.

Can anyone point me in the right direction?
Well I finally found the answer in an old (1995?) archive on a MSDN site.

For anyone interested, you have to override the PreCreateWindow() function in the MainFrame class and add the following to it:

cs.style &= ~FWS_ADDTOTITLE;

It's sure not obvious - at least not to me.

Topic archived. No new replies allowed.