I admit that I know very little about the subject matter, but isn't it possible that mIRC simply keeps a log of all of the draw routines that have been used on it and basically reproduces those to create a bitmap file?
Again, I know very little about the subject matter so this might've been the first thing you guys thought of *shrugs*