Click here to Skip to main content
15,921,467 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Breakpoint problem----howto use it in a loop Pin
Nemanja Trifunovic28-Dec-01 7:15
Nemanja Trifunovic28-Dec-01 7:15 
GeneralGetDeviceCaps problems... Pin
Braulio Dez28-Dec-01 6:05
Braulio Dez28-Dec-01 6:05 
GeneralLoading a string from a binary file Pin
James Bird28-Dec-01 5:34
James Bird28-Dec-01 5:34 
GeneralRe: Loading a string from a binary file Pin
Nemanja Trifunovic28-Dec-01 5:44
Nemanja Trifunovic28-Dec-01 5:44 
GeneralRe: Loading a string from a binary file Pin
Daniel Lohmann28-Dec-01 5:53
Daniel Lohmann28-Dec-01 5:53 
GeneralRe: Loading a string from a binary file Pin
James R. Twine28-Dec-01 7:06
James R. Twine28-Dec-01 7:06 
GeneralTrying to get the size of A3... Pin
Braulio Dez28-Dec-01 4:35
Braulio Dez28-Dec-01 4:35 
GeneralRotating shapes Pin
bhat_adarsh28-Dec-01 4:24
bhat_adarsh28-Dec-01 4:24 
Dear friends,
There is an MFC Sample called DRAWCLI provided in MSDN which is a drawing application with Visual Editing
container support. Basically you can draw rectangles, circles and polygons and these shapes are represented
as separate objects which can be moved, resized, filled with color etc. (CDrawObj is the base class
and individual classes have been derived from CDrawObj for each kind of shape)
Now I want to add a feature of rotating these objects. I do not want any fancy rotation using the mouse (like in Microsoft Word). The user will
simply enter the degrees to be rotated in a dialog and the object has to rotate after that.
I have tried this by changing the World transformation (using the SetWorldTransform function) specifying
appropriate XFORM values just before drawing the object ( say a rectangle) and set the transformation
back to normal after the rectangle is drawn and I am able to rotate the rectangle by the required degrees
although a part of the rectangle is hidden.
What I am unable to do is other operations like selecting, moving etc after rotating the rectangle since
the coordinates defining the rectangle (a CRect object) still are the same even after rotation. All
operations like invalidating, detecting mouse clicks (hit-testing) on the rectangle are based on its CRect object
which stores its position.
How can I update or store the coordinates of this rotated rectangle.
OR
If I am going in a totally wrong direction please tell me a better way to accomplish this
GeneralRe: Rotating shapes Pin
567890123430-Dec-01 1:08
567890123430-Dec-01 1:08 
GeneralMigrating from Win9x to Linux - PLEASE HELP! Pin
Sergei Yevseyev28-Dec-01 4:16
Sergei Yevseyev28-Dec-01 4:16 
GeneralRe: Migrating from Win9x to Linux - PLEASE HELP! Pin
Matt Newman28-Dec-01 4:31
Matt Newman28-Dec-01 4:31 
GeneralRe: Migrating from Win9x to Linux - PLEASE HELP! Pin
Nemanja Trifunovic28-Dec-01 5:25
Nemanja Trifunovic28-Dec-01 5:25 
GeneralRe: Migrating from Win9x to Linux - PLEASE HELP! Pin
Fazlul Kabir28-Dec-01 5:30
Fazlul Kabir28-Dec-01 5:30 
GeneralRe: Migrating from Win9x to Linux - PLEASE HELP! Pin
Ravi Bhavnani28-Dec-01 5:31
professionalRavi Bhavnani28-Dec-01 5:31 
GeneralRe: Migrating from Win9x to Linux - PLEASE HELP! Pin
Tomasso7-Jan-02 7:10
Tomasso7-Jan-02 7:10 
Generalaccess CRecordSet from another class Pin
jafrazee28-Dec-01 2:43
jafrazee28-Dec-01 2:43 
GeneralRe: access CRecordSet from another class Pin
Carlos Antollini28-Dec-01 3:05
Carlos Antollini28-Dec-01 3:05 
GeneralRe: access CRecordSet from another class Pin
jafrazee28-Dec-01 3:46
jafrazee28-Dec-01 3:46 
GeneralRe: access CRecordSet from another class Pin
Carlos Antollini28-Dec-01 5:07
Carlos Antollini28-Dec-01 5:07 
Questionhow can i DRAW in CVIEW:OnInitialUpdate() function? Pin
AnonymousBabe@usa.net28-Dec-01 2:08
AnonymousBabe@usa.net28-Dec-01 2:08 
AnswerRe: how can i DRAW in CVIEW:OnInitialUpdate() function? Pin
AnonymousBabe@usa.net28-Dec-01 6:07
AnonymousBabe@usa.net28-Dec-01 6:07 
AnswerRe: how can i DRAW in CVIEW:OnInitialUpdate() function? Pin
Shog928-Dec-01 8:58
sitebuilderShog928-Dec-01 8:58 
GeneralRe: how can i DRAW in CVIEW:OnInitialUpdate() function? Pin
AnonymousBabe@usa.net28-Dec-01 14:23
AnonymousBabe@usa.net28-Dec-01 14:23 
GeneralRe: how can i DRAW in CVIEW:OnInitialUpdate() function? Pin
Shog929-Dec-01 13:14
sitebuilderShog929-Dec-01 13:14 
Generalcsv file Pin
Sonu Kapoor28-Dec-01 2:06
Sonu Kapoor28-Dec-01 2:06 

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.