Jump to content
  • Advertisement
Sign in to follow this  
silverphyre673

transparent background for rendering text in win32 api

This topic is 4731 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey all. There is some function in pure win32 API that will make the background transparent when you render text with the TextOut() function. I can't remember it off the top of my head, and MSDN is kind of hard to search through for a relatively trivial function like that. Can anybody remember what it is? Thanks a bunch.

Share this post


Link to post
Share on other sites
Advertisement
I think so... yeah. I can't test it though, as on full recompile my entire program is suddenly crashing! Arrgh. I have no idea what the problem is, but thanks - I'm pretty sure that's what I needed. Awesome.

Share this post


Link to post
Share on other sites
Is it crashing when you are recompiling the program or crashing when you execute your newly compiled program?

Try the following inserted after every Win32 API function call to help isolate the problem.

char buffer[256];
FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM,0,GetLastError(),MAKELANGID(LANG_NEUTRAL,SUBLANG_DEFAULT),buffer,256,0);
MessageBox(hwnd,buffer,"Error",MB_OK|MB_ICONERROR);

Share this post


Link to post
Share on other sites
Quote:
Original post by Xiachunyi
Is "SetBkMode((HDC)wparam, OPAQUE);" what you are looking for?
Right function, but he wants TRANSPARENT, not OPAQUE.

Share this post


Link to post
Share on other sites
Quote:
Original post by iMalc
Right function, but he wants TRANSPARENT, not OPAQUE.


Ah, my fault. I copied and pasted it out of my own application; I should have just deleted all but the function's name. [looksaround]

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!