Sign in to follow this  
freeworld

whats the esiest way to display text in a window?

Recommended Posts

Something has been really bugging me for several months now... why does this site log me out if I'm not do anything for 10-20 minutes?

And I'm using, C++ in a Win32 window... no API so to say.

I was hopeing there would be no need for an API? I could just output the info that I need to a Textfile, but it'd be better if I could see the info while it was happening just to get a better grasp on things.

Share this post


Link to post
Share on other sites
Well, if you're really not using any graphics API, you can just use the DrawText function to draw text on the window. Of course, that won't work if you're using Direct3D or OpenGL or SDL or Allegro or anything... but those are all APIs. For that matter, the GDI is an API as well, but we'll let that slide.

Share this post


Link to post
Share on other sites
Sometimes for debugging purposes using subsystem console with visual studio is useful. It pops up a black console in the background and by default std::cout and printf are both routed to that. I do this with SDL which does my graphic window, but I don't know if you can set the subsystem to console with a regular windows window.

Not sure -exactly- what you need though, clearly this is not ideal for a release of any kind.

Share this post


Link to post
Share on other sites
Quote:
Original post by Sneftel
Well, if you're really not using any graphics API, you can just use the DrawText function to draw text on the window. Of course, that won't work if you're using Direct3D or OpenGL or SDL or Allegro or anything... but those are all APIs. For that matter, the GDI is an API as well, but we'll let that slide.


I'll check out the DrawText function, I'm not using any API right now as I'm re-working my windows code to be more flexible, and test out a new idea. All of which can be done easier without the fuss of my renderer which I know already works.

Share this post


Link to post
Share on other sites
I think you're confused about what "API" means... An API is just the set of functions/etc that are exposed to you by code you didn't write. DrawText/TextOut/ExtTextOut are part of the Win32 API for example.

It sounds like when you say you're not using an API you mean that you are using native Win32 calls and not (say) MFC or OpenGL or something.

Share this post


Link to post
Share on other sites
Quote:
Original post by freeworld
Something has been really bugging me for several months now... why does this site log me out if I'm not do anything for 10-20 minutes?



When logging in you have to check BOTH boxes (Log me in Automatically AND Remember Password).

I found it annoying too until my girlfriend checked both boxes when she logged in..and it worked.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this