  Direct CP violation in charmless three-body hadronic decays of $B$ mesons is
studied within the framework of a simple model based on the factorization
approach. Three-body decays of heavy mesons receive both resonant and
nonresonant contributions. Dominant nonresonant contributions to tree-dominated
and penguin-dominated three-body decays arise from the $b\to u$ tree transition
and $b\to s$ penguin transition, respectively. The former can be evaluated in
the framework of heavy meson chiral perturbation theory with some modification,
while the latter is governed by the matrix element of the scalar density
$\langle M_1M_2|\bar q_1 q_2|0\rangle$. Strong phases in this work reside in
effective Wilson coefficients, propagators of resonances and the matrix element
of scalar density. In order to accommodate the branching fraction and CP
asymmetries observed in $B^-\to K^-\pi^+\pi^-$, the matrix element $\langle
K\pi|\bar sq|0\rangle$ should have an additional strong phase, which might
arise from some sort of power corrections such as final-state interactions. We
calculate inclusive and regional CP asymmetries and find that nonresonant CP
violation is usually much larger than the resonant one and that the
interference effect is generally quite significant. If nonresonant
contributions are turned off in the $K^+K^-K^-$ mode, the predicted CP
asymmetries due to resonances will be wrong in sign when confronted with
experiment. In our study of $B^-\to \pi^-\pi^+\pi^-$, we find that ${\cal
A}_{C\!P}(\rho^0\pi^-)$ should be positive in order to account for CP
asymmetries observed in this decay. However, all theories predict a large and
negative CP violation in $B^-\to \rho^0\pi^-$. Measurements of CP-asymmetry
Dalitz distributions put very stringent constraints on the theoretical models.
We check the magnitude and the sign of violation in some (large) invariant mass
regions to test our model.
