|
hi. i am writing a project in MFC and i am using GDI+ in this project. when i Execute my project.exe in another Operating System it says : mfc40...dll Not Found. the joke is that my project Size is only 300kb and the Size of all Dll that needed in project is 2 mb
is there anyway to include these Dlls in project to get rid of them or somthing to recude the Dlls Size ?
thanks.
-=Ehsan-de-Burge=-
|
|
|
|
|
-=Ehsan-de-Burge=- wrote:
is there anyway to include these Dlls in project to get rid of them or somthing to recude the Dlls Size ?
Link statically with the MFC library : Project settings, General, Link statically with MFC.
-=Ehsan-de-Burge=- wrote:
the joke is that my project Size is only 300kb and the Size of all Dll that needed in project is 2 mb
I am not sure you are going to like it when it comes to .NET. The run-time is 24MB (core run-time, without mentioning additional stuff including IE6, MDAC, ...), while your app can be a few hundreds kb only. There are so many classes in .NET that your app is likely to be small (you don't reinvent the wheel).
|
|
|
|
|
my IMvironment is Visual C++.net.in witch menu should i set this option?
|
|
|
|
|
Right-click while you are on the project item. In the General tab, change Use Of Mfc : "Use MFC in a shared dll" to "Use MFC in a static library".
|
|
|
|
|
Project menu -> Properties
On the properties pages you want to select the 'General' page. Under 'Project Defaults' you will find 'Use of MFC'. From the dropdown list select 'Use MFC in a Static Library'.
ps. be sure to select correct configuration (Debug, Release, etc.)
CPUA 0x5041
Sonork 100.11743 Chicken Little
"So it can now be written in stone as a testament to humanities achievments "PJ did Pi at CP"." Colin Davies
Within you lies the power for good - Use it!
|
|
|
|
|
Hi,
I am using visual C++ Ver.6.
I want to read form an XML document a element node by name "childNmae" that is a child of another node
whose name is "nodeName". "childNmae" a child of other nodes as well, in which I am not interested.
Using IXMLDOMDocumentPtr->getElementsByTagName("nodeName")
I get the list of nodes with the name "nodeName". A loop over nodes is made.
How do I get directly to children nodes of these nodes that their name is "childNmae" ?.
A method getElementsByTagName(...) does not exist for the IXMLDOMNode object.
I don't wnat to go through each child and check it's name.
Thanks.
|
|
|
|
|
You migh wanna take a look at selectNodes() which uses XSLT to select nodes, very handy.
For example, the following code will select all nodes with the attribute id = "3" and the path /test/yadda.
<code>
IXMLDOMElement* pElem;
pDoc->get_documentElement(&pElem);
IXMLDOMNodeList* resList;
if(SUCCEEDED(pElem->selectNodes(CComBSTR("/test/yadda[@id = \"3\"]"), &resList)))
{
long len;
if(SUCCEEDED(resList->get_length(&len)))
{
for(long n = 0; n < len; n++)
{
IXMLDOMNode* pNode;
resList->get_item(n, &pNode);
CComBSTR strXml;
pNode->get_xml(&strXml);
MessageBox(CString(strXml.m_str));
}
}
}
</code>
"You can stand all night at a redlight anywhere in town, hailing Marys left and right but none of them slow down. I've seen the best of men go past. I don't wanna be the last..."
|
|
|
|
|
Thanks. Is there a way to do it without usitng the attribute?. I want to get the child using only the name and I still don't have a way to do it.
|
|
|
|
|
nodelist = xmldoc->GetElementsByTagName("name");
hope this helps...
|
|
|
|
|
Thanks, but it doe's not help.
I would like to find in the nodelist ( returned from the call nodelist = xmldoc->GetElementsByTagName("name");) a child with the name "name1" which I don't know how to get from a node in the list.
Another solution? Thanks.
|
|
|
|
|
Just remove the attribute, i.e. "/test/yadda"
"You can stand all night at a redlight anywhere in town, hailing Marys left and right but none of them slow down. I've seen the best of men go past. I don't wanna be the last..."
|
|
|
|
|
Hi all,
I am writing my own HTTP web server that is suppose to be runnig on a computer in a network that is connected to the internet througth a router.
Now the router has been configed to send any HTTP protocal messages to the
computer with the web server. But when I try to connect to the web server througth the routers internet IP from the same computer running the server it fails to connect. Now I think that you arn't suppose to be able to connect to a local web server througth a internet ip, am I right? But then how can I test that my web server works on the internet and what about FTP servers? Any ideas on how to test if the server works with the same computer running it, without connecting to it througth it's local IP?
Aidman » over and out
|
|
|
|
|
Hi guys, I'm writing a program using database, there are some fields should be currency data type, so I used COleCurrency... but I got some problems/questions(never used COleCurrency before):
1, How do you handle negative currency value?
For example, I have a variable with value COleCurrency(0, 0), now I have to further deduct it, so its negative. And now if I want to divide it by a DWORD, its value messed up.
COleCurrency init(0, 0); // initial value is 0.00
COleCurrency refund = blahblah; // some value determined at runtime
init -= refund; // remaining value, it's negative
DWORD dwQty = 500;
COleCurrency unitPrice = init / dwQty; // now value of init becomes a mess
My observation: we cannot divide a negative COleCurrency value?
2, How do you use "SUM" to get sum of currency format field values from a table in database?
I used the following SQL to access the sum value of "dPrice" column, which is in currency format, and the table name is tblDStorage:
"SELECT SUM (dPrice) AS total_price FROM tblDStorage"
Now, on one of my PC it worked well but on another the result is always 0. Why? Both machines have same softwares installed.
3, Can you use double instead of currency to store currency values in database, if no, what's the downside of doing so, and in what case we may loss precision?
I've actually tried to use double, and all problems are gone and there has been no data loss found, but I was told that currency would be more precise for sure...
Thanks a lot for your time.
|
|
|
|
|
hi.
char buf[100];
I want to save the buffer on the file.
say, first 87 array has a character but left over has NULL.
so when I save it, also save NULL value into the file.
fputs(buf,fp);
How can I save just 87 character into the file??
thanks
|
|
|
|
|
Tomohiro wrote:
How can I save just 87 character into the file??
By using C++ instead of C. If you used an ofstream, even if you use a C style string instead of std::string, it will stream only the 87 characters you are after.
Christian
No offense, but I don't really want to encourage the creation of another VB developer.
- Larry Antram 22 Oct 2002
C# will attract all comers, where VB is for IT Journalists and managers - Michael
P Butler 05-12-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not
as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|
|
fprintf
-c
I'm not the droid you're looking for.
|
|
|
|
|
|
Tomohiro wrote:
for(int i=0;i fprintf(fp,"%c",buf[i]);
}
wouldn't it be easier to do: fprintf(fp,"%s",buf) ?
cheers,
-B
|
|
|
|
|
You can also try fwrite, and specify that you want 87 elements each of size 1.
Dave
"You can say that again." -- Dept. of Redundancy Dept.
|
|
|
|
|
Hi.
I am working with HTTP 1.1. I would like to know what other characters such as alpha and punctuactions are allowed for a given URL?
For example:
// Valid
http://www.oiahsdifh.com/aoihsdofhad_jalsdif-joihasdf/theFile.file
// Is this valid?
www.oiahsdifh.com/aoihsdofhad!jalsdif{joihasdf/theFile|file
The project deals with HTTP and websites links. Thus, I need to know the standard and pattern to which servers and clients communicate.
Thanks,
Kuphryn
|
|
|
|
|
Check http://www.ietf.org/rfc/rfc2616.txt[^]
"You can stand all night at a redlight anywhere in town, hailing Marys left and right but none of them slow down. I've seen the best of men go past. I don't wanna be the last..."
|
|
|
|
|
|
I added a template class to one of my projects and none of the methods that I defined are showing up in the class view. Everything compiles cleanly with no errors and I've included all of the proper header files but only data members show up. I know I'm missing something simple. Any suggestions?
Jared
jparsons@jparsons.org
www.prism.gatech.edu/~gte477n
|
|
|
|
|
Are they public ? Why are you exposing your data members ? Does the code compile, even though class wizard is broken ?
Christian
No offense, but I don't really want to encourage the creation of another VB developer.
- Larry Antram 22 Oct 2002
C# will attract all comers, where VB is for IT Journalists and managers - Michael
P Butler 05-12-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not
as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|
|