PDA

View Full Version : WM_COMMAND messages and QMainWindow



LynneV
8th November 2010, 18:54
I have QMainWindow working fine hosted within my very old mfc Windows application. My QMainWindow processes any accelerator keyboard messages (such as [Ctl][A] for select all in QTextEdit) that are not setup in the message map for the original application. But it does not receive messages such as [Ctl][C] or [CTL][V] for copy and paste. I can use context menus inside the QMainWindow, but not the keyboard. I think it is because the WM_COMMAND is being consumed by the old application's CMainFrame and not passed along to the QMainWindow. Does anyone know how to do this? I followed the MFC to Qt Migration document exactly, but there's no additional info on message maps. I'm not a Windows programmer and I was not involved in the original design, so please excuse my vague description and very newbie question.