Interactive Service - Display Dialog Box & Get Inp

2019-07-31 10:22发布

My service is MFC based, set to "Allow service to interact with the desktop", and will only ever run on XP & W2K.

Try as I might I cannot get a simple dialog box to display to the user from a Windows service using a class derived from CDialog. I can however get a message box to appear using MessageBox().

No error is returned and GetlastError() always returns zero after DoModal is called. I have read the documentation link text which claims this can be done but talks about creating a hidden gui called from CreateProcessAsUser().

Is there an easier way to do this? I just need to ask users to enter a maximum 8 characters.

1条回答
相关推荐>>
2楼-- · 2019-07-31 10:53

I think you can find what you need with this link: http://msdn.microsoft.com/en-us/library/ms683502

查看更多
登录 后发表回答