Get progress dialog in PackFiles function (WCX)
Moderators: Hacker, petermad, Stefan2, white
Get progress dialog in PackFiles function (WCX)
Christian, is there any normal way to get progress dialog handle while packer plugin executes PackFiles function? I need to ask some questions so I need parent window handle (normal or background one if user sends operation to background). It looks ugly if a messagebox appears below its progress dialog.
- ghisler(Author)
- Site Admin
- Posts: 50475
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Now - just use GetActiveWindow(). This way it will also work with other programs using your plugin.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Unfortunately GetActiveWindow doesn't work when I need it - it returns NULL when TC calls PackFiles and when user clicks 'Background' button and TC replaces regular progress dialog with background progress window.
So I invented another way to detect background window handle (regular progress dialog may be found by window class name because TC can't show more than once one). I don't need any other program support, it should work in TC, so I pass to callback progress procedure string wsprintf(reported, "%s\n\n\n\n:%08d:", source, dwTID) in order to be able to find corresponding background dialog with item #100 which text ends with my thread's identifier.
So I invented another way to detect background window handle (regular progress dialog may be found by window class name because TC can't show more than once one). I don't need any other program support, it should work in TC, so I pass to callback progress procedure string wsprintf(reported, "%s\n\n\n\n:%08d:", source, dwTID) in order to be able to find corresponding background dialog with item #100 which text ends with my thread's identifier.
