3

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?

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

Simon Elliott
  • 2,087
  • 4
  • 30
  • 39

2 Answers2

2

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

Community
  • 1
  • 1
Hans Olsson
  • 54,199
  • 15
  • 94
  • 116
  • I saw the code project article while googling for a solution to this requirement. While it's a perfectly viable method, it does require a thread and a message pump. I was hoping for something more along the lines of a non modal MessageBox() lookalike. – Simon Elliott Jul 07 '10 at 09:38
  • 1
    @Simon Elliott: You don't need another thread, but how would you expect your window to work without a message pump? – jamesdlin Jul 08 '10 at 01:57
  • @jamesdlin: I was hoping that the message pump could be encapsulated or at least a little bit less visible. – Simon Elliott Jul 09 '10 at 13:22
0

see a CreateWindow / CreateWindowEx functions

zed_0xff
  • 32,417
  • 7
  • 53
  • 72