|
trinadh_t wrote: I have list of dependency dll's for my application
How you have obtained it ? If it's using dependency walker, you need , all these dlls present on machine, to run the application.
Prasad
MS MVP - VC++
|
|
|
|
|
trinadh_t wrote: To run my application in test PC wht are the default dependency files required.
See here.
"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
|
|
|
|
|
Hello
I have a custom control which uses GDI+. I have declared a member variable for the custom control. Now, the problem is that GDI+ is supported from Windows XP, and not in Windows 2000. Though GDI+ dll is a redistributable compontent, I dont want to ship it along with our product.
Now, wat I was looking for a solution wherein I first detect the OS on which my Application is running and if its Windows 2000, I dont want to display my custom control which uses GDI+. ie. I was looking as something a conditional variable declaration based on the OS type, because once the variable gets declared it means it wud require GDI+ components and hence my App will not get loaded due the absenceo of GDI+ dll.
Can somebody tell me a why out of this one ??
Thanx.
|
|
|
|
|
Why dont ship the GDI+ stuff? It would be nice for your kings (costumers)
I do such stuff via a global pointer which has 0 as start value.
CMyCtrl *gpCtrl = 0;
if( IsGdiPlus() )
{
gpCtrl = new CMyCtrl;
}
....
if( gpCtrl )
{
gpCtrl->Show();
}
Greetings from Germany
|
|
|
|
|
GetVersionEx() will return the current verion of the OS.
|
|
|
|
|
Try delay loading GDI+ - see here.
|
|
|
|
|
If you want to run on both GDI+ and non-GDI+ systems, you will either have to write two sets of drawing code (one old GDI or DirectDraw, the other GDI+, possibly abstracting the difference into classes), and no longer implicitly link with the GDI+ library. You would have to explicitly look for the GDI+ DLL and if found, load its API from the DLL using GetProcAddress(...) , or use the old GDI code if not, but this is harder than it might first seem due to how GDI+ has a C++ class-like interface.
FWIW, I believe that like others here, including the merge module in your installer for GDI+ is the best idea. It provides the easiest way to get your app to work on the most platforms with the least amount of work. This is no different than requiring an updated ODBC driver or service pack level.
Peace!
-=- James Please rate this message - let me know if I helped or not!<HR> If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! See DeleteFXPFiles
|
|
|
|
|
I have a dialog based project.
The program would crash after just a short moment(no longer than 1 min).
There had an assert at the 895th line of "wincore.cpp":
#ifdebug
CWnd::AssertValid()const
{
...
...
line 892: ASSERT( (p = pMap->LookupPermanent(m_hWnd)) != NULL ||(p = pMap->LookupTemporary(m_hWnd)) ! = NULL);
.......
}
Why?
And how to resolve it?
Thanks.
GOOD LUCK
|
|
|
|
|
run the application in the debug mode. when the Assert dialog appeares click on the retry button. the it will show the above line in the wincore.cpp. Take the call stack at this momment and look from which part of your code this function gets called.
|
|
|
|
|
yes,I did know where the assert occured.
But it in the member function CWnd::AssertAvlid() function.
It was not in my class 's member function.
So,follow your way,how to find witch code of mine bring up such an assert?
Thanks
|
|
|
|
|
This information can be retrived from the call stack window and also from the variale window.
When you have pressed the rety button the application will be breaked. At that time take the variable window. On the top of that window you can find a combobox called "Context". Drop it. Check whether there is any of your function listed in it. Suppose there are three function say f1(), f2() and f3(), If f1 calls f2 and then f2 calls f3, the f3 calls the above funtion of CWnd, the comboboc will look like
cwd::functionname()
f3()
f2()
f1()
|
|
|
|
|
I would have a try and if there would be some other questions I hope I can gain hands from here.
Thanks.
|
|
|
|
|
kcynic wrote: I hope I can gain hands from here
Sure.
|
|
|
|
|
but I using VS2005 to debug it.How should I doing such things?
|
|
|
|
|
You may be using an unassigned variable or deleting a pointer that does not exist or doing some other incorrect operation. It should ideally not be the MFC files that would show an Assertion error.
Did you try and debug your code?
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
but I did nothing when the dilog disapeared.
It would crash after about one min!
|
|
|
|
|
was this dialog created by a non mfc-thread ?
|
|
|
|
|
no,this dialog was create in a function of its parent dialog which also derived from CDialog
|
|
|
|
|
are you calling the DoModal() with a NULL from a different thread ?
|
|
|
|
|
I only using its member function ShowDialog(TRUE) to make the dialog appeared after I create the modeless dialog.That wat right or wrong to use modeless dialog?
Thanks
|
|
|
|
|
the handle is valid that is clear. It means there is something wrong. In most cases the windows has been destroyed or the windows was not properly (created, from another Thread)
Greetings from Germany
|
|
|
|
|
I think there is no window destroyed and no handle is acessed during such process,because no action I had done.
|
|
|
|
|
As I see you havent read my posting with the needed correctness. If you have 2 dialogs and share some data, as handles or messaging you HAVE to create them in the SAME thread.
Greetings from Germany
|
|
|
|
|
I create the second dialog in the function of the first dialog. I also using GetCurrentThreadId() to indicate the thread ID is the same.
|
|
|
|
|
That sounds fine.
Can you indentify to which windows the asserting handle belongs? (Tooltip?)
Are you creating others windows in one of the dialogs?
Greetings from Germany
|
|
|
|