I don't know how to bypass how MFC handles messages but I need to read input character keys while being in a while loop. An example is posted below;

Code:
runmode=1;
	//get input keys from keyboard some how 

		while(runmode==1)
		{
			wait(50);
                 //get input keys
		}
		break;
While this is may be an infinite loop it shows that I need to get input keys while the while loop is operating, so CRichEditCtrl::OnChar simply won't work because the message handle doesn't process until after the code completes execution.