使一个win32控制台应用程序显示一个窗口 [英] Make a win32 console app display a window

查看:503
本文介绍了使一个win32控制台应用程序显示一个窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在开发一个win32控制台应用程序,现在我想让它能够选择性地显示非模态状态/通知窗口。有什么办法,我可以做一个控制台应用程序,或者我需要重写它作为一个Windows应用程序?

I've been developing a win32 console app and now I'd like it to be able to optionally show a non modal status / notification window. Is there any way I can do this from a console app or will I need to rewrite it as a windows app?

这是一个kiosk系统,所以我需要调用SetWindowPos()与窗口句柄上的顶端标志。

This is for a kiosk system so I'll need to call SetWindowPos() with the topmost flag on the window handle.

推荐答案

据我所知,主要区别是你需要一个消息泵。此问题描述了一个基本的消息泵:为什么是TranslateMessage和DispatchMessage

As far as I remember the main difference is that you'll need a message pump. This question describes a basic message pump: Why are "TranslateMessage" and "DispatchMessage" separate calls?

本教程可能也有所帮助:了解邮件循环

This tutorial might also be helpful: Understanding the Message Loop

这篇关于使一个win32控制台应用程序显示一个窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆