i saw ur name in top experts Great.! i've a question and i posted it in forum but i didnt get correct answer so i want too ask u that question as u r an expert please give me answer sorry for writing here i'm waiting for ur reply Thanks in advance
HOW TO WRITE SQL QUERY IN XML? please explain about it i seen an article in this forum but it not help me lot of errors in it
Actually I'm not an expert, neither of SQL nor of XML. However you may store data both in databases and in XML files, each method having its pros and cons. Typically you query for data in databases using SQL, while use XPath for finding them in XML files. If you are interested in using XML files as data storage then you may find many many tutorial available on the web, just use Google.
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 ?
Thank you so much for your answers (both of you), I will try that right away and tell you what I've done ... but it came into my mind a question ... if I could store pointers into SetItemData(...), why CListBox does have SetItemData and SetItemDataPtr ... it is not a kind of redundancy ?
I can't see anything seriously wrong in the posted code. So the error may be also somewhere else (probably in a line before number 33 in mydialog.cpp). A possible error source is forgetting the trailing semicolon after the class declaration:
class CMyDialog : public CDialog
}; // <- Don't forget the semicolon here.
I have some more notes:
You should always use parentheses with definitions and macros:
Such mistakes happen (even to me after years of programming). When forgetting the semicolon at the end of a header file, the error is thrown at the first semicolon in the next file which might be another header file or the source file. If you remember this and get such a bulk of messages the next time, you will probably know where to look first.
It seems that one of the major obstacles in developing a real application is lack of understanding of one of the fundamental language features – in this case C preprocessor. Majority of coding articles posted here ignore such details. I am sure this can be applied to any C derivative - C++, C# and other languages. I think I got the basics, but would like to know how compiler applies stuff like “dependencies” , settings – preprocessor “additional includes” and “Options – directories”. Of course I am using VS/VC 6.0 terminology and it will be different in later VS IDE's Any educational commentaries are much appreciated. References, links etc would be great. And after this discussion is done, I'll ask about usage of #pragma – I am currently using it to stop the compiler when there are too many initial error. Crude but works for me. Appreciate your time. Cheers Vaclav
would like to know how compiler applies stuff like “dependencies” , settings – preprocessor “additional includes” and “Options – directories”.
It doesn't, these are merely convenient ways of indicating how your source code should be compiled, and all are used by Visual Studio to build the command and options used to invoke the compiler. The preprocessor reads the source file, expands #included sources and macros, and passes the resulting source to the actual compiler. You can set options in VS to get the output of the preprocessor saved to a file.
And after this discussion is done, I'll ask about usage of #pragma
Thanks Richard, in VS\VC 6.0 there is an *.opt file which comes from "Options". (For now I forgot how to get to the compiler command line itself.) An easy way to change path used during development at once, I am using plain Notepad. I have not found a way to do it in IDE itself. Acually this post was promted by me being curious if the sequence of "includes" in Option setting matters. I guess I shall test that after I get my app to work again - my XP crashed! Thanks for your time. Vaclav
I'm afraid it's quite a few years since I used VC 6, and it was quite different in many ways from the Visual Studio versions. However, you should be able to check and see all the various items by using the Project -> Properties link in the solution explorer.
Not what I really expected, but if I added "MY lack of understanding" you would probably get little more personall with your response. I am not confusing anything with C# since I don't use it. And don't tell me not to use #error - it does what I want, so what if it is not "cool". ANyway, thanks for your response.
Last Visit: 31-Dec-99 19:00 Last Update: 27-May-15 12:44