|
The DLL on your customers machine is out of date, it can't export the function with ordinal 6883. Try supplying your customer with a newer DLL or beter yet, link your program statically so it won't need the customers DLL!
Arjan
|
|
|
|
|
Thanks, for the help - sounds like one quuick fix and one more permanent fix. I've never considered linking any differently - I will look into it.
By the way, what are the pro's & con's of linking statically & dynamically?
Any problems I should look out for?
Thanks Again
Ali
|
|
|
|
|
General rule of thumb - always link statically!
You have found the "con" of linking dynamically - if the libraries (MFC42.DLL and MSVCRT.DLL) are out of date on your customer system, then you'll have to redistribute them - and that is a royal pain.
The "con" of linking statically is that your executable will be a little bigger. It is also a little trickier if you call another MFC DLL and try to share memory/data between the two.
An expert is somebody who learns more and more about less and less, until he knows absolutely everything about nothing.
|
|
|
|
|
Alison Pentland wrote:
By the way, what are the pro's & con's of linking statically & dynamically?
Any problems I should look out for?
If you statically link code, it may require upgrades in other DLLs that could never be statically linked.
Also, if you have a DLL that is statically linked with MFC, and it is being used by an EXE that is dynamically linked with MFC, there will be troubles. In other words, if the EXE has already loaded MFC42.DLL, you will have
problems because your DLL is trying to load a second copy, and the two will
become confused. Alternatively, you will end up with whatever copy the
EXE has loaded.
See if this thread helps any.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
I have tried to use this article:
"All you ever wanted to know about the Clipboard..."
http://www.codeproject.com/clipboard/clipboard_faq.asp?df=100&forumid=137&select=881708#xx504274xx
and the infromation that it provides to retrieve a bitmap from the clipboard, and it doesn't seem to be working. When I run the debugger it seem that this call is the one that is not working:
HBITMAP handle = (HBITMAP)GetClipboardData(CF_BITMAP);
The debugger has the following listed for handle:
CXX0030: Error: Expression can not be evaluated.
Why is this? What has gone wrong? If anything, cause I may just not understand it.
Micheal
|
|
|
|
|
I have a strange problem with CTreeCtrl::DeleteAllItems under VS2003: it seems impossible to insert a new tree item after having called this function.
Let's try a simple example:
- Create a new MFC dialog application,
- Add a tree control in the dialog,
- Associate a CTreeCtrl variable with it,
- in the OnInitDialog, add the code:
c_Tree.InsertItem(_T("Item before"));<br />
c_Tree.DeleteAllItems();<br />
c_Tree.InsertItem(_T("Item after"));
When executing the prg, the control remains empty. However, if I comment the call to DeleteAllItems, I see two items as expected.
Has anybody already experimented this ?
|
|
|
|
|
Just a quess but try adding a UpdateData(FALSE); after the last InsertItem
Arjan
|
|
|
|
|
I doesn't change anything because UpdateData usually validates DDX data and not DDX controls.
However, insertions work perfectly as long as I do not use DeleteAllItems. As soon it is called, no further insertions are possible (ie. InsertItem returns a valid HTREEITEM handle, but the tree control client area remains empty, even if I force the control to redraw.)
Looks like DeleteAllItems makes a real mess in the control!
|
|
|
|
|
You're right this is a bug! But you can workaround it.
<br />
m_cTree.InsertItem("Before");<br />
<br />
m_cTree.SetRedraw(FALSE);<br />
m_cTree.DeleteAllItems();<br />
m_cTree.InsertItem("after");<br />
m_cTree.SetRedraw(TRUE);<br />
or just set the tree's scroll property to true.
Arjan
|
|
|
|
|
Thank you, Arjan for the workarounds!
|
|
|
|
|
You just saved me from going crazy over this. Thanks!!!
|
|
|
|
|
hi all!!
i have created a VC++ dialog-based application which uses CDaodatabse, CDaorecordset, mshflexgrid and a pie chart. the application is running fine on my development machine. i then tried to port it on a machine which does not have VC++ installed alongwith the MFC dlls. The application is not opening and it is also not giving ny errors. i tried to then change the code and finally i found that it was not going thru InitDialog(). This is because i had put a messagebox in the constructor of the dialog class which was opening. But i had also put a messagebox in the first line of Initdialog which did not come up. why is this happening. i have no clue. can anyone help?
|
|
|
|
|
Try compile the application is static link mode.
|
|
|
|
|
Try compile the application in static link mode.
|
|
|
|
|
The target machine is probably missing the flexgrid ocx control (and maybe any others your app uses). CreateDialog fails silently so you get no OnInitDialog and no messages.
Just install and register the ocx's your app needs on the target machine. In some cases your user may need a licence to use the control.
The opinions expressed in this communication do not necessarily represent those of the author (especially if you find them impolite, discourteous or inflammatory).
|
|
|
|
|
hi
If i either click the RichEdit box or use tab button, the cursor should not get focused on RichEdit box.
Thank you.
|
|
|
|
|
hi...
Can anybody give me any sample dll & script file of install shield...
I'm trying to use DLL in installsheild but it is not accepting DLL..
even UseDLL() function fail to load..
I'll be thankful...
Sumit Kapoor
sumit_kapoor1980@hotmail.com
---Sumit Kapoor---
|
|
|
|
|
Hi,
I'm using the fftw++ header class for the fftw3 fast Fourier transform library in a pet project.
When I include the file fftw++.h in a source file, I get the following warning:
warning C4291: no matching operator delete found; memory will not be freed if initialization throws an exception
The fftw++ header overloads operators new[] and delete[], like this:
inline void *operator new [](size_t size, Complex)
{
size_t offset=sizeof(Complex)-(size % sizeof(Complex));
void *p=fftw_malloc(size+offset);
p=(char *) p+offset;
if(size && !p) cerr << endl << "Memory limits exceeded" << endl;
return p;
}
inline void operator delete [] (void *p, Complex, size_t size)
{
for(size_t i=size-1; i != (size_t) -1; i--) ((Complex *) p)[i].~Complex();
p=(char *) p-sizeof(Complex);
fftw_free(p);
}
What exactly is the meaning of this warning, and how to get rid of it (without using a #pragma directive)? It seems I have to rewrite operator delete[], I tried interchanging the parameters Complex and size_t to make them match the declaration of operator new[] but it didn't solve the problem.
I'm using Visual Studio .NET 2003.
Any input would be appreciated.
Cheers, blackmesa.
|
|
|
|
|
Hi, I want to know how can i add 2 CRecordset Derived class to my application.. I tried to 2 CRecordset class to my application, but when i make pointers to these classes. It gives me runtime error.. Anyone can help me with that??
I just want to open 2 CRecordset classes and each one point to only 1 table. So i can control them sepeartely... Thanks!
|
|
|
|
|
Recently i have gotten into making windows only using CreateWindow and CreateWindowEx functions, no MFC or any other classes, i find that its kinda hard to find code examples that design the windows this way, most use dialogs, designed in the VC++ IDE, or MFC
can anyone point me to some articas or web-sites with code examples that only use CreateWindow(Ex) to make its windows, and controls?
and also, i design my windows for 95/98/ME, and controls that are near the bottom, are very close or past the bottom of the window when the program is run on XP, this is due to the size of the Title Bar/Caption Bar (whatever you want to call it) so is there someway i could adjust this?
|
|
|
|
|
»Archer282« wrote:
is there someway i could adjust this?
AdjustWindowRect(Ex)
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" mYkel - 21 Jun '04
Within you lies the power for good - Use it!
|
|
|
|
|
»Archer282« wrote:
no MFC or any other classes,
I'm curious - why? You stand to gain in terms of reduced development time and increased stability by using MFC (or an equivalent) class library.
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
smaller file size, less dependecies, unlike some people i like the "more coding" part
|
|
|
|
|
if this is a commercial application that you have to support you will soon get over the joy of "more coding"
If you just doing it for fun then go for it
|
|
|
|
|
Ravi Bhavnani wrote:
increased stability by using MFC
I would have to disagree
How do I print my voice mail?
|
|
|
|