  We have investigated the internal structure of the open- and hidden-charmed
($DD^*$/$\bar DD^*$) molecules in the unified framework. We first fit the
experimental lineshape of the $T^+_{cc}$ state and extract the $DD^*$
interaction, from which the $T^+_{cc}$ is assumed to arise solely. Then we
obtain the $D\bar{D}^*$ interaction by charge conjugation. Our results show
that the $D\bar{D}^*$ interaction is attractive but insufficient to form
$X(3872)$ as a bound state. Instead, its formation requires the crucial
involvement of the coupled channel effect between the $D\bar D^*$ and $c\bar c$
components, although the $c\bar c$ accounts for approximately $1\%$ only.
Besides $X(3872)$, we have obtained a higher-energy state around $3957.9$ MeV
with a width of $16.7$ MeV, which may be a potential candidate for the
$X(3940)$. In $J^{PC}=1^{+-}$ sector, we have found two states related to the
iso-scalar $\tilde X(3872)$ and $h_c(2P)$, respectively. Our combined study
provides valuable insights into the nature of these $DD^*$/$D\bar D^*$ exotic
states.
