The initialization of your static variables are performed before main() and their deinitialization is performed after main() returns or after the exit() call. If you put buggy code in there then you can easily crash before/after main().
I am trying to design and develop a DXF importer using C++. I have gone through the DXF references starting from version 2000 onwards. There are four things which have put the development on hold for me right now.
1) Handles for each entity. Are they really important? If so, then how are they related to other entities?
2) Entities such as ARC, POLYLINE, TEXT etc occurs in BLOCKS section and in ENTITIES section. What difference does these two sections make? Why not all the entities are placed in ENTITIES section?
3) What is INSERT entity? How does this work? Does it have any visualization (as it contains insertion point, scale and rotation factors)? If so, how is it represented graphically? As a point (as it contains only one point )?
4) I see that some points are in OCS and some are in WCS. How do I convert OCS to WCS? For this point I did some google research and didn't get much help, as most of them use auto-lisp for this and I am using C++.
Kindly learned people guide me, by clarifying these doubts.
I might be stating the obvious but is sounds like you need to find a good specification of what a .dfx file can contain. I've never written a .dfx importer but did look at a similar task once in C++, then quickly opted to use an XML type export (Drawing XML?) from the CAD program and import that into my C++ instead.
I am drawing Owner Draw Menu Icons.
For that I want to use Toolbar bmp images as Menu Item icons.
I used LoadImage to Find the Icons from Resources Like this
hIcon = (HICON)::LoadImage(::AfxGetResourceHandle(), resName, IMAGE_ICON, 0, 0, LR_DEFAULTCOLOR | LR_SHARED);
And it is working fine. But forthis I need to Define All new Icons with same name as MenuItem in resources.
That's, why I want to Load it from Toolbar bmp resources inspite of Icon Resources.
How can I load Image in same manner by name from Toolbar bmp ?
Basically, MFC is quit strong to handle all this things enternally, you only need to do is that give same ID to toolbar and menubar item.
If you have PQR.bmp on ID_CLICK_ME toolbar then give ID_CLICK_ME to menu bar item so it directly taken POR.bmp as menubar bitmap.
In a dialog I had replaced an CListBox with CListCtrl ... the old CListBox had used SetItemDataPtr, to store a CMyObjects pointers ... but CListCtrl does not have not such a thing (CListCtrl::SetItemDataPtr, only CListCtrl::SetItemData) ... how can I store an object pointers into CListCtrl ? Is it posible ?
modified 2-May-13 8:57am.
Last Visit: 31-Dec-99 19:00 Last Update: 7-Dec-16 8:25