|
How do you want this data to be stored? In a database file or just a text file with your own formatting and syntax?
--PerspX
"Nowadays, security guys break the Mac every single day. Every single day, they come out with a total exploit, your machine can be taken over totally. I dare anybody to do that once a month on the Windows machine." - Bill Gates
|
|
|
|
|
gnowkeenz wrote: Draw Classes, showing their relationships to solve the OOP technique, showing clearly the attributes and methods.
Better get started. Turning in late homework is a no-no!
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hai Good Morning...
I need to update the xml file dynamically in vc++. i did parsing to the xml file then i displaying the parsed values in treectrl. now i am goin to edit the values in the ctrl...which means i will rename the values or deleting the values if i did these changes in treectrl i need to update the same values in XML file also....
any idea....
pls reply me
|
|
|
|
|
Hope this helps...
MSXML2::IXMLDOMDocumentPtr m_pXmlDoc;
if(m_csFilePath.IsEmpty()) return false;
_variant_t varString = _T(m_csFilePath);
m_pXmlDoc->save(varString);
return true;
|
|
|
|
|
hai joan...
Thanks
|
|
|
|
|
Hi
i introduce a laibrairie in my project, whene i compile there are error :
D:\Program Files\Microsoft Visual Studio 8VC\PlatformSDK\include\wspiapi.h : (44)error C2894: templates cannot be declared to have 'C' linkage
please help me to resolve this pb.
Thank you verry mutch
|
|
|
|
|
Strange - I don't see anything related to templates in there.
If I include that file anywhere in my projects it compiles fine.
What's the code at and around the offending line?
Mark
This episode brought to you by the number 5
|
|
|
|
|
I must intruduce WinPcap to capture Paquets, fot that i add in Linker>Input : WinPcap.lib and in C/C++>Preprocessor : WIN32;_DEBUG;wpcap and in Forme1.h i introduce #include "Pcap.h"
all this was defined in http://www.winpcap.org/docs/docs_40/html/group__wpcapsamps.html[^]
please help me to resolve this problem
Thank you verry mutch
|
|
|
|
|
WPCAP should be all capitals, right?
You can't show the offending lines of code? Please?
I don't have pcap.h, so I can't try it, but I imagine windows header files need to be included
before or after it because of some name conflict or something. You may want to change where you
include that file. I can only guess without seeing it.
Mark
This episode brought to you by the number 5
|
|
|
|
|
Do you by any chance introduced such code in you project:
extern "C" {
#include "SOMEHEADER.h"
}
where SOMEHEADER may be wspiapi.h or any header file that may use wspiapi.h.
|
|
|
|
|
Whene i click on error it's show this line : template < typename __CountofType, size_t _N >
I don't add Wspiapi.h, i just adding pcap.h and inc.h, i don't see a Wspiapi.h in Solution Explorer!!
Thank you verry mutch
|
|
|
|
|
I see the template declaration in the newer wspiapi.h and I downloaded WinPcap.
Including pcap.h worked fine for me.
Where are you including pcap.h?
This episode brought to you by the number 5
|
|
|
|
|
I am trying to convert an HICON to a PNG in memory. I am able to do this operation but on certain icons, like the XP Drive Icons or anything that uses XP shadowing, I get blotchy edges for the shadow. It looks like the transparency on the shadow is not being converted properly.
Below is how I am doing the conversion. I am wondering if more manual labor is required and if anyone knows what that could be. I am not a graphics expert.
In my application, the HICON handle is from a call to SHGetFileInfo. I am retreiving a file's 16x16 icon, including overlays, which I need in PNG format.
// encoder is "image/png"
int sh_icon2img(unsigned char *out, int outl, HICON icon, CLSID encoder)
{
int size;
ULONG ul;
IStream *s = NULL;
Bitmap *bmp;
ULARGE_INTEGER lisize;
LARGE_INTEGER offset;
if(CreateStreamOnHGlobal(NULL, TRUE, &s) != S_OK)
{
return -1;
}
/* create the Bitmap object and save to stream */
bmp = new Bitmap(icon);
bmp->Save(s, &encoder, NULL);
delete bmp;
/* get stream size */
offset.QuadPart = 0;
if(s->Seek(offset, STREAM_SEEK_END, &lisize) != S_OK)
{
s->Release();
printf("Failed to get the size of the stream!");
return -1;
}
size = (int)lisize.QuadPart;
/* seek back to beginning of stream */
s->Seek(offset, STREAM_SEEK_SET, NULL);
// provided buffer is too small
if(outl < size)
{
s->Release();
return -1;
}
if(s->Read(out, size, &ul) != S_OK || size != (int)ul)
{
s->Release();
return -1;
}
s->Release();
return size;
}
Thanks in advance.
|
|
|
|
|
Hello,
I have written a mathematical matrix class
for VS C++ 6 and I would like to publish it
in your site in the form of a library (*.lib).
Maybe later I release the code too.
However I am facing serious problems with my linker
an I 'm not sure if I will ever manage to publish it (at least in
a reasonable amount of time) without your help. So,
I would like to ask you if you could help me a bit.
I am willing to refer your name in my article.
Although, it may take me some time to write it.
As far as I have understood, it is the MFC (used by my
class) that conflicts when I try to use my compiled
*.lib file. I tried to change the settings of my linker
(/NODEFAULTLIB) but I do not find the process familiar!
I have uploaded the *.lib file and the header file so that
you can test it on your own. It is at:
http://rapidshare.com/files/41398859/LIB.zip[^]
The process of compiling it into a LIB file seems to be OK.
I will sum it up if you want:
I added my header file and my cpp file into the project
(Win32 Static Library) and I just built the lib files
with no errors.
Then I created a new MFC app (Dialog, MFC statically linked -
I don't know if that matters), I added the header file and the
lib files into the project, I added the
#ifdef _DEBUG
#pragma comment(lib, "mat_lib_DEBUG.lib")
#else
#pragma comment(lib, "mat_lib_RELEASE.lib")
#endif
in the code file using my class. But it just does't work.
If you manage to compile a project while using an object
please upload the project, so that I can see what I was
doing wrong. If you wan't you may write sth here too.
To use an object of the class write:
CKelLib::CKelMatrix m,n(2,1);
double p[4][4]={{1,2,3,4},{3,6,9.2,12.9},{7,14,21,27},{3,4,9,12.3}};
m.Initialize((double*)p,4,4);
Any kind of help would be appreciated.
Thank you.
kostas KEL
|
|
|
|
|
KEL3 wrote: But it just does't work.
what makes you think it doesn't work?
|
|
|
|
|
The dozens of linker errors I get.
kostas KEL
|
|
|
|
|
KEL3 wrote: The dozens of linker errors I get.
And those would be?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
--------------------Configuration: mat_lib_test - Win32 Release--------------------
Normally I get:
--------------------Configuration: mat_lib_test - Win32 Release--------------------
Linking...
msvcrt.lib(MSVCRT.dll) : error LNK2005: _malloc already defined in libcmt.lib(malloc.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: _free already defined in libcmt.lib(free.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: _time already defined in libcmt.lib(time.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: __mbscmp already defined in libcmt.lib(mbscmp.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: __setmbcp already defined in libcmt.lib(mbctype.obj)
LINK : warning LNK4098: defaultlib "mfc42.lib" conflicts with use of other libs; use /NODEFAULTLIB:library
LINK : warning LNK4098: defaultlib "mfcs42.lib" conflicts with use of other libs; use /NODEFAULTLIB:library
LINK : warning LNK4098: defaultlib "msvcrt.lib" conflicts with use of other libs; use /NODEFAULTLIB:library
Release/mat_lib_test.exe : fatal error LNK1169: one or more multiply defined symbols found
Error executing link.exe.
mat_lib_test.exe - 6 error(s), 3 warning(s)
---------------------------------------------------------------------------
After a few /nodefaultlib:***
mat_lib_RELEASE.lib /nologo /subsystem:windows /incremental:no /pdb:"Release/mat_lib_test.pdb" /machine:I386 /nodefaultlib:"mfc42.lib" /nodefaultlib:"mfcs42.lib" /nodefaultlib:"msvcrt.lib" /out:"Release/mat_lib_test.exe" /defaultlib:mat_lib_RELEASE.lib
I get:
Linking...
LINK : warning LNK4049: locally defined symbol "_malloc" imported
LINK : warning LNK4049: locally defined symbol "_free" imported
LINK : warning LNK4049: locally defined symbol "_time" imported
LINK : warning LNK4049: locally defined symbol "__mbscmp" imported
mat_lib_RELEASE.lib(CKelMatrix.obj) : error LNK2001: unresolved external symbol __afxForceSTDAFX
mat_lib_RELEASE.lib(CKelMatrix.obj) : error LNK2001: unresolved external symbol __imp__srand
mat_lib_RELEASE.lib(CKelMatrix.obj) : error LNK2001: unresolved external symbol __imp__rand
mat_lib_RELEASE.lib(CKelMatrix.obj) : error LNK2001: unresolved external symbol __imp__ceil
mat_lib_RELEASE.lib(CKelMatrix.obj) : error LNK2001: unresolved external symbol __imp__floor
mat_lib_RELEASE.lib(CKelMatrix.obj) : error LNK2001: unresolved external symbol __imp__atof
Release/mat_lib_test.exe : fatal error LNK1120: 6 unresolved externals
Error executing link.exe.
mat_lib_test.exe - 7 error(s), 4 warning(s)
-----------------------------------------------------------------------------
Now we have problems with mathematical functions mostly.
Any ideas?
kostas KEL
|
|
|
|
|
KEL3 wrote: Any ideas?
Have you seen this, that, and the other?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Generally,
I looked up the error codes
but this is the first library
I build and the whole
linker-directives thing causes
me a headache!
I 'll try again though...
kostas KEL
|
|
|
|
|
MFC applications cannot include <windows.h>!
Why don't you compile your matrix library with the same dependency as the MFC project that needs to use it? Anyway, the conflict occurs between libcmt.lib and msvcrt.lib, thus you can try removing one of them and keep the other... see which one (we can't 'cause don't have the source code).
Regards,
|
|
|
|
|
Ok! My problem was solved!
All I had to do was
to use MFC in a shared DLL
in my application, as I did in my class.
No linker directives at all!
I guess that for apps using MFC in a static
library you use MFC in a static library for
your class... I 'll try this later.
Thank you Borish.
Thank you all,
I 'll thank all of you, more, in my future article.
BUT, Borish, what do you mean by "MFC applications cannot include !"?
I include headers all the time in my MFC apps. Is there sth you can not include?
kostas KEL
|
|
|
|
|
Sorry... that must be a typo, or a glitch when submitting a post (maybe interpreted as html code, 'cause I've used the xml kinda brackets)!
I meant MFC applications cannot include windows.h...
Very glad to hear that you solved your compilation issues.
Congrats!
|
|
|
|
|
I want to delay in the middle of my code without cpu usage , I mean I dont want to use things like timer . if there is any function or algurithm like delay() in turbo C .
thanks
|
|
|
|
|
V_shr wrote: I want to delay in the middle of my code without cpu usage , I mean I dont want to use things like timer
are you talking about the Windows timer (OnTimer, SetTimer) ? that's the simplest way to do what you describe.
|
|
|
|