Read to OpenGL text with windows API

Hi. I need to read a text chat (OpenGL) and I’m trying to do with the windows API, but I don’t know how exactly. I want to read and safe in a .txt all chat lines. Any ideas? Thanks for your time. Regards.
(This is chat that I want to read