The present invention is a method for implementing instant messaging,
including: registering, in a Hook function, a function for registering an
instant messaging sub-process in a current running program used for
defining a condition for registering the instant messaging sub-process
and a process for registering the instant messaging sub-process as a
sub-process of the current running program if the condition is satisfied
and is used for displaying a instant messaging sub-window in a window of
the current running program; and if running an instant messaging program,
calling, by the Hook function, the function for registering an instant
messaging sub-process in a current running program, if the condition for
registering the instant messaging sub-process is satisfied, creating an
instant messaging sub-process, registering the sub-process as the
sub-process of the current running program, and displaying the instant
messaging sub-window in the current running program.