|
Is there any website or user manual to show me how to import XML data file into Crystal Report? I have problems in XML and Web services.
|
|
|
|
|
My application (MFC MDI) launches Excel, but I would like to keep my app on top of Excel. Is there a way to do this in my app or in Excel. I have tried things like SetWindowPos() but I do not know how to get a handle to my application window.
|
|
|
|
|
Like this,
CWnd *pWnd=AfxGetMainWnd();
pWnd->SetWindowPos(&CWnd::wndTopMost,0,0,100,100,0);
system
|
|
|
|
|
It works!! Thank you so much for a complete and effective answer. I did not know how to get a pointer or handle to my current window.
Now one more question, is there a way to keep my window in focus or active after starting Excel. When Excel starts Excel has the focus or is the active window, I would like my window to stay in focus or active.
Thanks again
|
|
|
|
|
I've no pretty way for this.
pYourWnd->SetParent(pExcelWnd);
And this should happen when either your application or Excel starts.
To much to say.
system
|
|
|
|
|
Hi Gurus,
Is there any windows API or struct from which I can come to know whether day light saving is currently on/off?
Thanks in Advance.
Regards
Abhi Lahare
|
|
|
|
|
GetTimeZoneInformation()?
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
|
Hi,
I'm coding huffman and have a doubt.I'm writing the preorder version of my huffman tree in term of 0's and 1's as the header of my encoded file.How do I know when my header ended and my encoded data started?
|
|
|
|
|
aksgh wrote: How do I know when my header ended and my encoded data started?
A binary tree whose leaves are the given characters of the file can do this.
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
First four bytes of the header -> size of header
|
|
|
|
|
error LNK2005: "protected: void __thiscall CxImage::Startup(unsigned long)" (?Startup@CxImage@@IAEXK@Z) is already defined in ximage.obj
how can i resolve this error?
thanks
|
|
|
|
|
susanne1 wrote: how can i resolve this error?
By consulting the the docs.
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
The error means CxImage::Startup is defined in multiple files. You must eliminate one of the (redundant) definitions.
|
|
|
|
|
This[^] may help.
use #pragma once if you're using visual studio or another compiler that supports it, and inclusion guards if you aren't like so;
#ifdef YOUR_SYMBOL<br />
#define YOUR_SYMBOL<br />
<br />
<br />
#endif<br />
Using both at the same time doesn't hurt one bit.
|
|
|
|
|
First, why don't you reply to the original poster ?
Second, this won't help because these include guards are used by the compiler and the OP has a linker error, not a compile error.
|
|
|
|
|
1) My answer was intended as an extension to yours.
2) From the article I linked:
Potential Pitfalls:
...
4) Duplicate instances of objects within the code that compiled fine. This is a linking error, often difficult to understand. (In MSVC, you might see something like "error LNK2005: "int myGlobal" (?myGlobal@@3HA) already defined in myotherfile.obj".)
...
If you read the article properly (or at all, if you didn't already) then you will see that this was a perfectly good suggestion.
|
|
|
|
|
get this error when trying to compile my code(C/VC++) in visual studio 2005
error LNK2001: unresolved external symbol ""public: virtual bool __thiscall CxMemFile::Close(void)" (?Close@CxMemFile@@UAE_NXZ)".
Any help to resolve this error will be appreciated
Susanne
|
|
|
|
|
Hi, you should use a meaningful title for your post (see forum guidelines)
susanne1 wrote: get this error when trying to compile my code(C/VC++) in visual studio 2005
error LNK2001: unresolved external symbol ""public: virtual bool __thiscall CxMemFile::Close(void)" (?Close@CxMemFile@@UAE_NXZ)".
Any help to resolve this error will be appreciated
Add cximage.lib to the list of Linker input files.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Hi,
using C++ (and MFC) I would like to develop an application that is able to create *.exe executable files. (An example for that would be e.g. creating a self extracting executable zip file.)
Has anyone an idea how to proceed? Are there any examples or articles about that problem in the code project or elsewhere? (I did not find anything )
Thanks.
Joe
|
|
|
|
|
It's not all that hard to use CreateFile to make a file that just happens to end in exe, the hard bit is where is the file's contents going to come from?
You could save an exe as a binary resource in your starter app, then simply save it out.
If you search for FILE_FLAG_DELETE_ON_CLOSE on msdn you should find some articles on exe's that even tidy up after themselves when they finish executing.
(I'm assuming you're not writing a compiler).
Iain.
|
|
|
|
|
To create an executable you need a set of tools, traditionally (for C based languages) a compiler to turn your chosen language into the machine language or assembly language of the target, a linker to link together compilation modules and possibly an assembler to turn the targets assembly language into its machine language. All of these can be written using C++ (and MFC although it won't be that much use outside the GUI). In fact MSVC is written using the previous version of MSVC. To write a compiler from scratch you're going to need to know a lot of things, LALR1 grammar/parser theory to start with and potentially a lot of arcane stuff about branch prediction and tree based optimisation. If you're up for all this you could start with Yac & Lex ( or Bison & Flex on Windows ) as example code for generating a language parser. You could download and examine the sources of projects like GCC ( GNU Compiler Collection ) and doxygen ( a C++ etc documentation engine ). Many people have trodden this path before you so there's a lot of rubble to examine. Most either end up writing their own assembler, developing a scripting language Perl, Python, etc, etc or much for usually just use an existing tool to achieve your specification. You could for example adapt one of the GCC compilers to your own use/lanaguage and build it into your product ( You'll have to contribute your changes back to the community of course )
"The secret of happiness is freedom, and the secret of freedom, courage."
Thucydides (B.C. 460-400)
|
|
|
|
|
Member 191829 wrote: An example for that would be e.g. creating a self extracting executable zip file
If you are looking to create a self extracting archive executable, then have a look at the LZMA sdk[^].
If you want to be able to generally create executables, Matthew Faithfull's reply is excellent!
Many are stubborn in pursuit of the path they have chosen, few in pursuit of the goal - Friedrich Nietzsche
.·´¯`·->Rajesh<-·´¯`·.
[Microsoft MVP - Visual C++]
|
|
|
|
|
Member 191829 wrote: ...create *.exe executable files.
Based on what?
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
Based on an existing *.exe file, where only resources (e.g. included bitmap resources, icons,...) should be changed.
|
|
|
|