Originally Posted by
novacain
What does GetLastError() return?
IMO this is bad advice. MSDN is clear that the ID of child controls should be unique on a window/dialog. This is because the child controls use this ID to communicate with the parent. I think you should not advise new coders to ignore MSDN instructions, especially without advising them EXACTLY when and why.
Your advice makes it sound like setting the control's ID to NULL will stop all msgs being generated by the control, which IME is not true.
The control will still generate msgs, but the parent will not be able to process them.
If another control on the window also has NULL or zero as the ID it may stop the control from being created.
Also a statusbar, especially with a size grip, is not just 'display only' control.
The app will want to set text, change the part sizes in response to size changes etc.