cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
General C++ Programming
Program without window
Program without window
Dec 5, 2010 at 10:00pm UTC
marianoc
(3)
Hi... I'm trying to make a program that works with no open window or terminal in Ubuntu, using C++...
What I'd like the program to do is register a keypress event and act in consequence, but without the user noticing it...
I tried making a dameon, using the ncurses library, but daemons don't allow user interaction...
Any suggestions??
Dec 5, 2010 at 10:06pm UTC
PiMaster
(359)
Include windows.h, and use the FreeConsole() function before you do anything else.
Dec 6, 2010 at 12:33am UTC
Duthomhas
(13196)
Linux doesn't use the <windows.h> API.
What you are trying to do is not very kosher. You will have to look through your window manager's documentation to figure out how to do that. Lower level xlib handling is more obnoxious, but possible:
http://tronche.com/gui/x/xlib/
Good luck.
Topic archived. No new replies allowed.