If you have to ask about various operating system limits, you're probably doing something wrong.
If you're nesting windows more than 50 levels deep or nesting menus more than 25 levels deep or creating a dialog box with more than 65535 controls, or nesting tree-view items more than 255 levels deep, then your user interface design is in serious need of rethought, because you just created a usability nightmare.
If you have to ask about the maximum number of threads a process can create or the maximum length of a command line or the maximum size of an environment block or the maximum amount of data you can store in the registry, then you probably have some rather serious design flaws in your program.
I'm not saying that knowing the limits isn't useful, but in many cases, if you have to ask, you can't afford it.
Notice that I said "probably". In my experience, probably 90% of the people who ask what the limit is have either bumped into it or are considering a design that will. The fact that you folks can come up with suggestions for the other 10% doesn't invalidate my point.