Home > Software engineering >  How to make a thread in the window, always keep on one of the main frame window.
How to make a thread in the window, always keep on one of the main frame window.

Time:09-19

In the main frame, I use the _beginthread () creates a thread, and in the thread created a modal dialog box, and then use the getmessage (), translatemessage (), dispathmessage () function, establish the message queue, and then creates a dialog box in the main frame, now want to ask, how to let the thread of the dialog box has been kept on the dialog box in the main frame? I tried to use the thread used in setparent () function, but can't seem to work,

CodePudding user response:

No man or woman?

CodePudding user response:

Try to Create the specified parent window for the dialog



CodePudding user response:

SetWindowPos first parameter is the layer Settings window in

CodePudding user response:

reference Sandrer reply: 3/f
SetWindowPos first parameter, where is the setting window layer

I tried to use wndtop but this is to set it above all Windows, and I just want to set it to a specific window

CodePudding user response:

refer to the second floor zgl7903 response:
try to Create the specified parent window for the dialog

This is the same and call setparent, tried there's no way.

CodePudding user response:

reference 4 floor linxiong520 response:
Quote: reference Sandrer reply: 3/f
SetWindowPos first parameter, where is the setting window layer

I tried to use wndtop but this is to set it above all Windows, and I just want to set it to a specific window above

Wndtop you convert into a specific window not to go

CodePudding user response:

refer to 6th floor Sandrer response:
Quote: refer to 4th floor linxiong520 response:

Quote: refer to the third floor Sandrer response:
SetWindowPos first parameter, where is the setting window layer

I tried to use wndtop but this is to set it above all Windows, and I just want to set it to a specific window above

Wndtop you convert into a specific window not line

I've tried, in the same thread can be through this function will be a window in another window, but if the two Windows in a different thread seems to be no

CodePudding user response:

Timer Settings window in front of the goal, constantly top.

CodePudding user response:

refer to the eighth floor smwhotjay response:
timer Settings window in front of the goal, constantly top.

This not line, a larger project flaw is easy to leak out
  • Related