whats that API function to make a RECT?
I knew it the other day.. now i seem to have forgotten it.
Whats the function that will return a RECT given the top, left, bottom and right values?
i think there is one.. something like CreateRect or MakeRect.. but it seems they dont exist
it woudn''t be hard to write one myself, but i wanna know the winapi one
so, anyone?
I can''t remeber one to get a rect. But ther is GetClientRect to get the RECT of the client window.
Regards
/Joachim
Regards
/Joachim
September 26, 2000 11:15 AM
RECT rc;rc.left = x;rc.right = x + width;rc.top = y;rc.bottom = y + height;
or you can use something like SetRect(...)
- HTH
Rectangle(hdc, x1, y1, x2, y2)
"It's obvious isn't it Miller? Curiosity killed these cats!"
"It's obvious isn't it Miller? Curiosity killed these cats!"
"It's obvious isn't it Miller? Curiosity killed these cats!"
I just do:
RECT stuff
stuff.left = 0;
stuff.top = 0;
stuff.right = 10;
stuff.bottom = 10;
RECT stuff
stuff.left = 0;
stuff.top = 0;
stuff.right = 10;
stuff.bottom = 10;
just tell me one thing : Do you have a book, or an online help with the compiler you are using (and what is it) ? Since there is a topic about vets flaming newbies, I guess I won''t go further, but can you answer ?
If you don''t, well, then mea culpa.
If you don''t, well, then mea culpa.
-----------------------------Sancte Isidore ora pro nobis !
Well, I have an old copy of the MSDN CD''s copied onto my hard drive for use with VC++ 6.0. Didn''t quite get your point about vets flaming newbies?
"It's obvious isn't it Miller? Curiosity killed these cats!"
"It's obvious isn't it Miller? Curiosity killed these cats!"
"It's obvious isn't it Miller? Curiosity killed these cats!"
I was gonna answer with a burning *RTFM*.
I mean, is it that hard to look up RECT in the index of the help files ???? I think not. Then I thought, well, if you don''t have the help files, nor the book ...
but of course, what are you doing if you code without those tools ?
ahw ell
I mean, is it that hard to look up RECT in the index of the help files ???? I think not. Then I thought, well, if you don''t have the help files, nor the book ...
but of course, what are you doing if you code without those tools ?
ahw ell
-----------------------------Sancte Isidore ora pro nobis !
A.
RECT R;
SetRect(&R, 10, 10, 100, 30);
B.
RECT R;
SetRectEmpty(&R);
C.
RECT R = { 10, 10, 100, 30 };
D.
Use stuff in above posts...
RECT R;
SetRect(&R, 10, 10, 100, 30);
B.
RECT R;
SetRectEmpty(&R);
C.
RECT R = { 10, 10, 100, 30 };
D.
Use stuff in above posts...
hmm...no one gave me the answer i wanted
i wanted this: (i wrote my own)
oh well
i wanted this: (i wrote my own)
RECT CreateRect(int left, int top, int right, int bottom){ RECT rc; SetRect(&rc, left, top, right, bottom); return RECT;}//so i can use it like this:Blt(CreateRect(X, Y, X+width, Y+height), ....);
oh well
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement