Click here to Skip to main content
15,911,141 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: how can i serialize a tree struct using c++. not use mfc Pin
Christian Graus1-Dec-02 9:41
protectorChristian Graus1-Dec-02 9:41 
GeneralRe: how can i serialize a tree struct using c++. not use mfc Pin
Gary R. Wheeler1-Dec-02 5:19
Gary R. Wheeler1-Dec-02 5:19 
GeneralRe: how can i serialize a tree struct using c++. not use mfc Pin
Ravi Bhavnani1-Dec-02 6:39
professionalRavi Bhavnani1-Dec-02 6:39 
GeneralRe: how can i serialize a tree struct using c++. not use mfc Pin
ttzzgg_807131-Dec-02 7:59
ttzzgg_807131-Dec-02 7:59 
GeneralRe: how can i serialize a tree struct using c++. not use mfc Pin
Paul Ingles1-Dec-02 7:15
Paul Ingles1-Dec-02 7:15 
GeneralRe: how can i serialize a tree struct using c++. not use mfc Pin
devvvy1-Dec-02 10:18
devvvy1-Dec-02 10:18 
QuestionHow do I ROTATE rectangels in a View? Pin
doruA30-Nov-02 21:59
doruA30-Nov-02 21:59 
AnswerRe: How do I ROTATE rectangels in a View? Pin
Paul M Watt1-Dec-02 7:14
mentorPaul M Watt1-Dec-02 7:14 
The first thing that you will need to do is represent your rectangles as a set of four points rather than two that is done with the RECT structure.

The next thing that you do is apply this rotation matrix to each point in your rectangle to rotate it, where A is the angle that you would like to rotate in radians:

cos(A) -sin(A)
sin(A) cos(A)

your final formula will look like this:

POINT pt;
POINT pt_rotated;

pt_rotated.x = pt.x * cos(A) - pt.y * sin(A);
pt_rotated.y = pt.x * sin(A) + pt.y * cos(A);

This formula is a rotation at the origin. Therefore you will need to translate the points to the origin before you rotate, then after the rotation, translate the points back.

Good Luck



Build a man a fire, and he will be warm for a day
Light a man on fire, and he will be warm for the rest of his life!

QuestionHow do I resize rectangels in a View Pin
doruA30-Nov-02 21:59
doruA30-Nov-02 21:59 
AnswerRe: How do I resize rectangels in a View Pin
Stephane Rodriguez.30-Nov-02 22:34
Stephane Rodriguez.30-Nov-02 22:34 
GeneralRe: How do I resize rectangels in a View Pin
zhdleonid1-Dec-02 5:04
zhdleonid1-Dec-02 5:04 
GeneralRe: How do I resize rectangels in a View Pin
Stephane Rodriguez.1-Dec-02 5:22
Stephane Rodriguez.1-Dec-02 5:22 
GeneralToolbar bitmap Pin
S O S30-Nov-02 21:50
S O S30-Nov-02 21:50 
GeneralRe: Toolbar bitmap Pin
Michael Dunn1-Dec-02 5:44
sitebuilderMichael Dunn1-Dec-02 5:44 
GeneralRe: Toolbar bitmap Pin
ttzzgg_807131-Dec-02 8:04
ttzzgg_807131-Dec-02 8:04 
QuestionHow implements a tab control window dock to any inner side of the window? Pin
Yu_Matrix30-Nov-02 21:19
Yu_Matrix30-Nov-02 21:19 
Questionwhat's the best way to send an email? Pin
devvvy30-Nov-02 20:36
devvvy30-Nov-02 20:36 
AnswerRe: what's the best way to send an email? Pin
Rohit  Sinha1-Dec-02 4:03
Rohit  Sinha1-Dec-02 4:03 
GeneralRe: what's the best way to send an email? Pin
devvvy1-Dec-02 10:14
devvvy1-Dec-02 10:14 
Generalreturning strings from a component Pin
bachan30-Nov-02 20:33
bachan30-Nov-02 20:33 
GeneralRe: returning strings from a component Pin
Michael Dunn30-Nov-02 20:35
sitebuilderMichael Dunn30-Nov-02 20:35 
GeneralMore link troubles... Pin
Jamie Hale30-Nov-02 19:46
Jamie Hale30-Nov-02 19:46 
GeneralRe: More link troubles... Pin
Michael Dunn30-Nov-02 20:32
sitebuilderMichael Dunn30-Nov-02 20:32 
GeneralRe: More link troubles... Pin
Jamie Hale2-Dec-02 11:26
Jamie Hale2-Dec-02 11:26 
GeneralRe: More link troubles... Pin
Michael Dunn3-Dec-02 13:14
sitebuilderMichael Dunn3-Dec-02 13:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.