|
i'm waiting for ur response ---CPallini
|
|
|
|
|
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.
Veni, vidi, vici.
|
|
|
|
|
Hi,
I have one question...
Is there any way a C/C++ program can crash before main()?
Regards,
Mbatra
modified 3-May-13 6:46am.
|
|
|
|
|
The question is unclear: are you asking about compilation order?
int x = ;
int main()
{
return 0;
}
this will not compile, error is before main
there are no facts, only interpretations
|
|
|
|
|
Hi,
My question was:
Is there any way a C/C++ program can crash before main()?
Like when u run your program, it crashes even before it starts to execute main..
Regards,
Mbatra
|
|
|
|
|
Yes, it is possible, but without more details it is impossible to guess why.
Use the best guess
|
|
|
|
|
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().
|
|
|
|
|
Yes ! A c/c++ program will crash when it can't find a necessary library.
|
|
|
|
|
Here is a cooked-up example:
#include <iostream>
using namespace std;
class Crash
{
public:
Crash()
{
int *a = new int[5];
for (int i = 0; i < 7; ++i)
{
a[i] = 25;
}
delete[] a;
}
};
Crash crash;
void main()
{
cout << "If ever I come here ..." << endl;
}
This program will crash even before entering main().
modified 3-May-13 11:15am.
|
|
|
|
|
Yes, it can if the program didn't find dependency libraries in the search paths.
|
|
|
|
|
Hello,
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.
Thanks in advance
|
|
|
|
|
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.
|
|
|
|
|
Hello Friends
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 for this 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 ?
Any Help will be Appreciated.
Regards
Yogesh
|
|
|
|
|
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.
Like,
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.
|
|
|
|
|
Thanks For your Reply.
Actually , I am giving toolbar single bmp name to MenuItem.
For Example. ToolBar name is IDR_TOOLBAR1 which consist of images whose names are ID_FILE_NEW,ID_FILE_OPEN.
And Under Menu IDR_MENU1 have menuItems New,Open with ID ID_FILE_NEW and ID_FILE_OPEN same as in toolbar bmp.
And Used same LoadImage function to load Icon but returning NULL.
Or am I doing something Wrong?
Regards
y
|
|
|
|
|
why are you not trying this??
CImage image;
image.Load(_T("C:\\image.png")); CBitmap bitmap;
bitmap.Attach(image.Detach());
|
|
|
|
|
If I try this way then I have to load each and every image for Menuitems again single by single.
I am looking for a way to use from Toolbar bmp into MenuItems Icons.
So,only I am accessing over resources by name to match with same menuitem Icon.
Anyway,thanks For ideas. But ,better if I use from toolbar bmp.
Y
|
|
|
|
|
The new CMFCMenuBar class already does this for you.
To use this class you will need Visual Studio 2008 with Feature pack or VS 2010 and later.
|
|
|
|
|
How Can I use CMFCMenuBar to load Images from Toolbar. As I am already using CMenu.
Do I need to get CMFCMenubar object OnInitmenuPopup? or Some other way .
I am confused about using CMFCMenubar.
Regards
Y
|
|
|
|
|
Another solution you can find here[^] ....
|
|
|
|
|
Thanks Flaviu2 But I saw this Post already. here it is just conversion from ICon to bitmap. And My problem is to first Find out the Icons from Resources by name from either toolbar bmp .
|
|
|
|
|
Hello all,
I have a MFC app being developed on VS 6.0
I added code to dynamically change the size of the dialog when a check box is checked. i.e., it hides some controls and then resizes the dialog to show only less controls.
And this works fine in one display setting. And i am running it on Windows 7 and mydisplay is Medium - 125%
If i go to display settings and change the type to Smaller - 100% or Larger - 150%, then resizing completely screws up and some controls are not shown at all.
I figured that with change in display setting the resizing takes the controls to different positions that it goes out of scope of dialog.
Is there a way around? Any way of locking the controls irrespective of change in display settings?
Thanks in advance.
|
|
|
|
|
|
When i try to call SetProcessDPIAware from inside the InitInstance fucntion of the app, it says the fucntion - error C2065: 'SetProcessDPIAware' : undeclared identifier
Why is it so?
Btw, this is a MFC app being developed in Visual Studio 6.
Is there a different way to set it DIPaware?
|
|
|
|
|
The API is only supported from Windows Vista and above.
So you need to define the following macros as below -
_WIN32_WINNT = 0x0600
WINVER = 0x0600
|
|
|
|