This is a very common problem, and the way to display this is to use 3 states as follow:
- checked (regular "tick" sign)
- unchecked (empty box)
- partially checked (a tick with some different approach, usually a grayed out box or a different opacity or a color difference)
You can see a live action example at Checkboxes
The rationale is really simple:
- if ALL sub-items of the dropdown are selected , then the dropdown checkbox uses the checked status
- if NONE of the sub-items of the dropdown are selected , then the dropdown checkbox uses the unchecked status
- if SOME sub-items of the dropdown are selected , then the dropdown checkbox uses the partially checked status
Some visual samples:

EDIT:
**When the user clicks on the indeterminate checkbox, what should happen? Should the checkbox be checked, or should it be cleared? **
Since this is a 3 state case, it should check/uncheck all, at demonstrated in the live example and graphical samples provided
More importantly, why?
Because of the partial statuses mentioned above, it goes both ways: a sub item affects the main tree branch (partial or total states), thus checking the main branch will affect ALL of the branches