I already have the print function. I just want to know how to print multiple lines. It's because right now it prints on one even if the edit box has more than one line of text.
I already have the print function. I just want to know how to print multiple lines. It's because right now it prints on one even if the edit box has more than one line of text.
Website(s): http://www16.brinkster.com/trifaze/
E-mail: [email protected]
---------------------------------
C++ Environment: MSVC++ 6.0; Dev-C++ 4.0/4.1
DirectX Version: 9.0b
DX SDK: DirectX 8.1 SDK
'\n' doesnt work?
What will people say if they hear that I'm a Jesus freak?
What will people do if they find that it's true?
I don't really care if they label me a Jesus freak, there is no disguising the truth!
Jesus Freak, D.C. Talk
-gnu-ehacks
\n in windows? haha, ya right!
ok, first make sure yor button has style ES_MULTILINE and I think ES_WANTRETURN (but you don't really need ES_WANTRETURN) then to add multiple lines of text use \r\n instead of \n.
I mean from and EDIT box. When I type on multiple lines, it puts boxes on the paper where the new line should come in.
Website(s): http://www16.brinkster.com/trifaze/
E-mail: [email protected]
---------------------------------
C++ Environment: MSVC++ 6.0; Dev-C++ 4.0/4.1
DirectX Version: 9.0b
DX SDK: DirectX 8.1 SDK
I think you need to declare a TEXTMETRIC structure and fill it with GetTextMetric(HDC dc, TEXTMETRIC *texm );//<---sample prototype
Anyway try it and also create two ints to hold the current output location(X,Y). Set Y to = texm.tmHeight + texm.ExternalLeading, then when you are ready to print on a new line, do Y+=Y;
Of course Y, and X will be arguments passed to TextOut(), anyway hope that helps a little!
Windows is so confusing! Even Simple things are made difficult!
Code:#include <cmath> #include <complex> bool euler_flip(bool value) { return std::pow ( std::complex<float>(std::exp(1.0)), std::complex<float>(0, 1) * std::complex<float>(std::atan(1.0) *(1 << (value + 2))) ).real() < 0; }