Help cleaning up the code is very welcome. You will see this rule stressed over and over throughout the guidelines and when submitting patches. Indenting and white space use tabs to indent functions. Set your editor to 4 spaces per tab. Include a newline at every file end.
Identifiers Use self-describing well chosen indentifiers whenever possible.
Avoid identifier pairs such as ProcessMessage and DoProcessMessage, AddTasks and AddTasks1. Use names such as rect, message, invokeMessage, view, targetView, DrawBorder, ProcessMessage and ProcessMessageInternals or ProcessMessageDetails, etc. The advantages here are it is easier to make sure variables are properly initialized and small code snippets are easier to copy-paste around. Use descriptive names, avoid reusing a single temporary variable for different purposes. Use BeOS-defined APIs, types, etc.