|
Have you looked at line 321 of oledisp2.cpp? An unknown type is being used in a call to InvokeHelperV() .
jokhan wrote:
And my application is running properly in Win32 cmrelIU mode. But problem in Win 32 debugIU mode...What could be the reason?
Because the ASSERT() macro will catch program errors only when you are using the debug version of MFC. It will be turned off (and produce no code) when you build your program with the release version of the library.
Don't let the fact that when no errors/messages are produced during the release version of your product that your product is indeed error-free. Whatever condition exists that caused the assertion to fire in the debug version still exists in the release version.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
I would like to seek some advice as in general terms how proceed with my current program, written as a MFC Dialog (C++) application in Visual Studio .Net.
I have developed it over the last few months as an application which creates its own internal database – a large array of a user defined structure. I can access this data by two means; by name or index (0 to n).
Now I need to provide an interface to this array (database) so that I can write other applications to use this database along side my program.
So my question is
‘What sort of interface should I provide?
and
How to implement it? i.e. do I need to protect the data during access etc
I have never written any DLLs, just used them, also currently think of using the database item name as the access key and would like the option to write these programs in C or C++, so I question the use of CString as the database names are held in a CStringArray .
Any comments greatly appreciated.
|
|
|
|
|
IMHO a better approach with a long term view will be to make ur internal database external on some Database servers(M$SQL/MySql,Oracle). Sorry for not answering wot you exactly asked.
There is no spoon.
mail
|
|
|
|
|
Hello Friends,
I want to use the cursor control keys (Key up, key down, key left, key right) and the cursor should move according to the appropriate item which is being displayed in the listview. The Item should be get selected with respective to the cursor key.
please help me regarding the above matter.
Thank you in Advance only,
Neelesh J Jain.
|
|
|
|
|
use OnKeyDown or OnKeyUp
You can read up about these functions on MSDN.
hope this helps.
"If I don't see you in this world, I'll see you in the next one... and don't be late." ~ Jimi Hendrix
|
|
|
|
|
I am using onKeyUp member function only, but how to navigate in the list box according to the appropriate key.
Thank you,
Neelesh Jain.
|
|
|
|
|
test for VK_UP (VK_DOWN)
then you can set the selectitem (or SetCurSel) property or something of the listbox +1 or -1.
Look up the members for CListBox...
Good luck.
"If I don't see you in this world, I'll see you in the next one... and don't be late." ~ Jimi Hendrix
|
|
|
|
|
Neelesh K J Jain wrote:
...in the list box...
In your original post, you indicated this was a listview, yet now you indicate it is a listbox. Which is it?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Hello all,
needing to allocate a large number of buffers (let's say 20.000 buffers of
sizes between 8 and 200 bytes (I do not know their size at first)), which method would you recommend:
1. malloc (slow from my tests)
2. dlmalloc (Doug Lea's malloc replacement)
3. other
If your solution is a custom memory allocator, I need it to work on Win32
(e.g. Win9x included). I've done tests with dlmalloc and it seems pretty
fast. Perhaps an experience/advice of using it in the real-world would help.
Thanks.
Regards,
George Ionescu.
|
|
|
|
|
http://www.mathtools.net/C_C__/Memory_management/index.html[^]
Short of rolling your own with Virtual*() i was impressed with what i read about Hoard.
If you know the allocation size extents(8-200) and the pattern of allocations you should be able to write an optimized allocator that will outperform most generic implimentations.
...cmk
Save the whales - collect the whole set
|
|
|
|
|
Since you are using VC++, the choice should be the new operator.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Hi,
How to eliminate this warning?
warning C4652: compiler option 'Generate Browser Info' inconsistent with precompiled header; current command-line option will override that defined in the precompiled header.
pls help
Mithuna
|
|
|
|
|
I suggest you completely clean and rebuild your project. This should eliminate the warning.
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Williams (Little Britain)
|
|
|
|
|
|
Hi,
I am developing a client server application with vc++.
I have the following 3 main classes
* PayrollDlg - This is the main dialog box
* WageDlg - This dialog box is accessible thru PayrollDlg
* AbsSocket - This class manages the networking aspect i.e creating a socket & sending , receiving data.
Now i need to create an object os AbsSocket that can be accessed from both PayrollDlg as well as WageDlg. Where do i declare this object to achieve this. If i declare the AbsSocket object in either PayrollDlg or WageDlg classes it becomes local to that class. What i actually want to know is where is the main() function as if i declare the AbsSocket object in this main it can be accessed anywhere right?
|
|
|
|
|
You can declare it as global in one cpp file and then declare it using extern in another
AbsSocket g_AbsSocket;
extern AbsSocket g_AbsSocket;
or if u want a cleaner way you can do this
class CGlobalVariables
{
static AbsSocket g_AbsSocket;
};
CGlobalVariables::AbsSocket g_AbsSocket;
and include this class in stdafx.h
then u can use it like
CGlobalVariables::g_AbsSocket
whereever u like
as for accessing the main function, in MFC it is buried deep under the classes of MFC u can't(shouldn't) access it
hope it helps
C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg
|
|
|
|
|
You could always derive PayrollDlg and WageDlg from a common class where AbsSocket is a member variable.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Using visual C++ 6.0, I have created a user drawn bitmap button and the up,down,focused,etc states and it works just fine. It's a red sphere, but I would like to be able to change it to blue,green,yellow,etc.
I've tried
m_pic1.AutoLoad(IDC_GREEN,this);
where GREEN is the "GREENU" sphere picture, but it just crashes during run time.
I think I may be really barking up the wrong tree.
B
|
|
|
|
|
I think I would use an imagelist.
Load all bmp's in there and switch accordingly.
hope this helps.
(eg. for setting an icon to a button I did this:
icon = (HICON)::LoadImage(AfxGetResourceHandle(), MAKEINTRESOURCE(IDI_PRINT), IMAGE_ICON, 16, 15, LR_DEFAULTCOLOR);<br />
pPrintbutton->SetIcon(icon);<br />
I presume it's round about the same for a bmp)
"If I don't see you in this world, I'll see you in the next one... and don't be late." ~ Jimi Hendrix
|
|
|
|
|
--------------------Configuration: xt3 - Win32 Debug--------------------
Linking...
nafxcwd.lib(afxmem.obj) : error LNK2005: "void __cdecl operator delete(void *)" (??3@YAXPAX@Z) already defined in libcpmtd.lib(delop.obj)
xt3.exe : fatal error LNK1169: one or more multiply defined symbols found
Error executing link.exe.
xt3.exe - 2 error(s), 0 warning(s)
What causes this? And what should I do to fix it easily.
Thanks very much.
|
|
|
|
|
|
Linker Tools Error LNK2005
symbol already defined in object
The given symbol, displayed in its decorated form, was multiply defined.
Tips
One of the following may be a cause:
The most common cause of this error is accidentally linking with both the single-threaded and multithreaded libraries. Ensure that the application project file includes only the appropriate libraries and that any third-party libraries have appropriately created single-threaded or multithreaded versions.
The given symbol was a packaged function (created by compiling with /Gy) and was included in more than one file but was changed between compilations. Recompile all files that include the symbol.
The given symbol was defined differently in two member objects in different libraries, and both member objects were used.
An absolute was defined twice, with a different value in each definition.
This error is followed by fatal error LNK1169.
|
|
|
|
|
hi,
I'm a developper and i'm lookin for books oriented to non beginner on different subjects :
- comrehensive information on run-time librairies and their ideology (ie memory working, the dipatching of messages between objects and their ordonation, error enhancing with (very) old dlls)
- fuzzy logic
- neural networks
- algorythms of mostly used video and audio formats (compilable and shareware if exists)
- a comprehensive one on multithreading and if possible parrallelism
thanks if you can help me, being jobless i prefer stuff on line or in numereical form
styx
|
|
|
|
|
Hi,
I am new to VC++ and would like to know that if I have a C++ console
application and want to add it to a VC++ MFCAppwizard project, how do
I do it? The problem I am facing is thatwhen I add those .cpp files to
the project, I am unable to compile the code as the compiler
apparently is unable to resolve classes defined in the console
application. To give you the exact nature of the problem, I have a C++ console application which I want to import to VC++ and add forms and UI.
Is this problem something to do with "using namespace .."? I
would like to get some pointers on how to solve this problem.
Thanks.
Sid
|
|
|
|
|
It's highly unlikely that your default code is using namespaces, if you've put stuff in a namespace ( and good for you if you have ), then you just need a using statement to scope it. You should just be able to add your classes, unless your classes rely on libraries that your MFC project does not use, then you need to add them to the project settings. Again, unless you added them to the C++ console project, I don't see this being the case. What errors do you get ? It's kind of hard to help you fix a problem if I don't know what the actual problem is
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|