Winmain 无法在自动启动中显示消息
我有一个win32程序,当手动运行时,它在WinMain中显示一条消息,但是当我将相同的程序放在注册表下(运行)以便当PC重新启动时,它将自动运行,该消息永远不会出现(但该程序正常运行)。
任何人都知道为什么手动启动程序(通过单击 exe 文件)和自动启动程序(通过 Windows 注册表)之间存在差异?
谢谢
克莱门特
I have a win32 program, when run manually, it display a message in WinMain, but when I put the same program under registry (Run) so that when the PC reboots, it will run automatically, the message will never appear (but the program run normally).
Anyone knows why there is a difference between starting the program manually (by clicking the exe file) and automatically (via Windows Registry)?
Thanks
Clement
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
现在在 WinMain 顶部显示消息可能还为时过早,因为您还没有窗口。您可以等到收到第一条
WM_CREATE
消息吗?It's probably too soon to display a message at the top of WinMain because you don't have a window yet. Can you wait until you receive your first
WM_CREATE
message?