Home > Software engineering >  MFC dialog box front
MFC dialog box front

Time:10-05

Background: clientApp hook the client program, hook procedures for a dialog
Objectives: at the only eidt clientApp control input transaction code, the hook procedure pop-up help information of the transaction (hidden and embedded browser dialog box controls, Navigate to display help information)
Include: dialog startup hidden in the tray, realized in defWindowProc

Now: the writing of the hook is a keyboard hook DLL, dialog program is tuned up and clientApp is a full-screen
Hook caught clientApp input transaction code, after calling Navigate, through SendMessage WM_PAINT message, the OnPaint calls ShowWindow () and UpdateWindow ();

Question:
When the program execution, if the first input transaction code, can the pop-up dialog box, display help information,
But again after the transaction code, no pop-up dialog box, and indeed the points in the task bar display dialog according to the transaction code to obtain the help information, but didn't come to the front play

Have to do:
WM_NCPAINT backwardness is to capture transaction code at the beginning, and then in the defWindowProc ShowWindow (), try the SetActiveWindow (), SetForegroundWindow (), only in the task bar lights, but
Is not displayed on the clientApp interface (the first was a success, is the second unsuccessful display), display, right click on the task bar and then check the information, said WM_NCPAINT is redrawing the client area, and then I change the WM_PAINT and OnPaint ()
, is still the same, can play for the first time, the second no!!!!!!!!!!
Please master (PS: using MFC to do this for the first time, the dialog box bottom calling process is not very understanding)

SetWindowPos (not Top, the user action, when the transaction codes help information dialog box should be covered, lose the transaction code when enter popup)

CodePudding user response:

This kind of question it is best to use the show to hide
  • Related