Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Community » Newbie corner » GUI and printf
GUI and printf [message #36626] Thu, 21 June 2012 18:01 Go to next message
shmoky is currently offline  shmoky
Messages: 3
Registered: June 2012
Junior Member
Hello,

I have made a GUI application under U++ and wants to be able to output printf statements in a console window. How can it be done ?

I am on Win7.

Thanks by advance,
Didier
Re: GUI and printf [message #36629 is a reply to message #36626] Thu, 21 June 2012 20:08 Go to previous messageGo to next message
Sender Ghost is currently offline  Sender Ghost
Messages: 301
Registered: November 2008
Senior Member
Hello, Didier.
shmoky wrote on Thu, 21 June 2012 18:01

I have made a GUI application under U++ and wants to be able to output printf statements in a console window. How can it be done ?

I am on Win7.


You need to use AllocConsole and FreeConsole functions. Then get console handle and manage it (e.g. to associate with stdout and stderr streams, etc.).

Some example:
Toggle Spoiler

Some references:
- "Adding a console window C++ (WinAPI)?".
- "Console in GUI".

[Updated on: Thu, 21 June 2012 21:20]

Report message to a moderator

Re: GUI and printf [message #36638 is a reply to message #36629] Fri, 22 June 2012 18:01 Go to previous message
shmoky is currently offline  shmoky
Messages: 3
Registered: June 2012
Junior Member
It works great !

Many thanks !

Didier
Previous Topic: Can Upp develope applications on Symbian or Android or WinCE?[FEATURE REQUEST]
Next Topic: Using an existing win32 control.
Goto Forum:
  


Current Time: Tue Apr 23 09:34:06 CEST 2024

Total time taken to generate the page: 0.01258 seconds