开发者

Unable to retrieve title of just created window

I'm trying to retrieve the title of a window when my hook procedure receive an HCBT_ACTIVATE message.

The problem is that when this message is received for the first time the window seems not to have the caption already set. I think I should maybe add some kind of delay to the call to GetWindow开发者_JAVA百科Text? (After the window is created and, for example, I receive a HCBT_MOVESIZE or HCBT_DESTROYWND message I can get the correct title)


You should set the hook with SetWindowHookEx, using WH_CALLWNDPROCRET to receive the WM_CREATE notification after the message has been processed.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜