|
To add message handlers manually, for each you need to add a prototype
afx_msg void OnMyNewHandler()
This needs to go before the DECLARE_MESSAGE_MAP macro in the .h file.
Add a message map entry in the .cpp file
ON_COMMAND(IDC_OF_COMMAND, OnMyNewHandler)
Add the function
void CMyClass::OnMyNewHandler()
{
}
If you need to put in an update handler
afx_msg void OnUpdateMyNewHandler(CCmdUI *pCmdUI) ;
ON_UPDATE_COMMAND_UI(IDC_OF_COMMAND, OnUpdateMyNewHandler)
void CMyClass::OnUpdateMyNewHandler(CCmdUI *pCmdUI)
{
pCmdUI->Enable(...) ;
}
Roger Allen
Sonork 100.10016
If I had a quote, it would be a very good one.
|
|
|
|
|
Thank you for the help provided.
Ingvar
|
|
|
|
|
.CLW is the file for ClassWizard; and .NCB is the file for ClassView. You should close the project, delete the .NCB file, then open the project again.
Visual C++ doesn't handle template really well. When I add some function templates or template classes, ClassView would behave abnormal. And sometimes syntax error causes such condition, too.
Feel free to delete .ncb files!
|
|
|
|
|
Yes! It works! Thank you very much for that help!
Igor
|
|
|
|
|
Maxwell Chen wrote:
.CLW is the file for ClassWizard; and .NCB is the file for ClassView
Rats! I should have known that!
Roger Allen
Sonork 100.10016
If I had a quote, it would be a very good one.
|
|
|
|
|
Well,
the tli and tlh files are loaded into a project that creates a dll file.
these files are from another project that creates a com object using ATL.
I can not edit them! if I try to edit them in the dll project and then "duild all" then they are reloaded from somewhere by the visual c++ compiler and thus get their previous data.
How can I edit them?
Thanks a lot,
Aviv.
avivhal
|
|
|
|
|
Aviv Halperin wrote:
I can not edit them!
Aviv Halperin wrote:
How can I edit them?
You've answered the question - you cannot. The type libraries contain the stuff that your project needs to access your COM object and build smart pointers etc. Why would you want to change them instead of the COM object directly ? If you don't have access to the code to build the object, then you cannot change it. I'd have thought that was blindingly obvious.
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
And you don't spend much time with the opposite sex working day and night, unless the pizza delivery person happens to be young, cute, single and female. I can assure you, I've consumed more than a programmer's allotment of pizza, and these conditions have never aligned. - Christopher Duncan - 18/04/2002
|
|
|
|
|
Well,thats what I thought.
I did change the com object's code but strangly enough the tli tlh files don't change.
I guess I have to check my project definitions to find out where does the compiler load them from.
Thanks anyway,
Aviv.
avivhal
|
|
|
|
|
hi,
how would i go about setting up a 26 by 26 array?
any code would be good
thanks
|
|
|
|
|
int arrayUninit[26][26];
int arrayInit[26][26] = {
{ 0, 1, 2, ..., 25 },
{ 0, 1, 2, ..., 25 },
...
};
memeset(arrayUnint, 0, 26 * 26 * sizeof(int));
for (int x = 0; x < 26; x++)
for (int y = 0; y < 26; y++)
arrayUninit[x][y] = ...;
|
|
|
|
|
hi dose it matter where i declare it?
|
|
|
|
|
hi:
where to get the windows xp style icons(the icons for system ,toolbar..)?I want to use it in my own application,I think it is cool.
thanks
benben
|
|
|
|
|
try http://www.iconbuilder.com/
Gaurika Wijeratne. // www.gaurika.com
|
|
|
|
|
Extract icons from your hard driver.Many different file types on your computer contain one or even many icons that you can use.
Icon Searcher v1.52 :
http://www.yxhome.com/softplus/index.htm
|
|
|
|
|
Hi,
I have three questions,
1.What happens when several threads use the same DLL?
2.race condition takes place during above situation?
3.The usage of TLS in thread and DLL.
Plz in detail.
Thank you.
Best regard.
I confess that I am a stubborn guy, but why not put things thoroughly, logically and systematically clean. One concrete prolem is worth a thousand unapplied abstractions.
|
|
|
|
|
1. Nothing special. The DllMain entry point is called for each newly created thread with fdwReason set to DLL_THREAD_ATTACH .
2. No race conditions occur as calls to DllMain are serialized by the system. As a corollary, threads cannot be created inside DllMain .
3. TLS routines can allocate and deallocate indexes that are local to each running thread. These usually are used to map some dyamically allocated memory. Check MSDN article Using Thread Local Storage for details.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Hi,
I have a DLL, and i want that in some function
it shows a small dialog box (actually with just a
password edit box and a button) and is displayed
whenever i want..
How can i do that..
Sameer
|
|
|
|
|
hi
i download the class that in 'codeproject.com/database' and when i added the ado.h and ado.cpp to my program the following error occures:
"fatal error C1010: unexpected end of file while looking for precompiled header directive"
the file that indicated in error is ado.cpp
any help!!!
Best Regards
|
|
|
|
|
try use in your cpp file:
#include "stdafx.h"
or disable use of precompiled header for that file ....
Bye,
Orbital^
...the night is long ... but not long enought to do some real coding ...
|
|
|
|
|
hi again
thakx alot, it works after i added the include line. but what's the precompiled header!!
Best Regards
|
|
|
|
|
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/_core_creating_precompiled_header_files.asp
Bye,
Orbital^
...the night is long ... but not long enought to do some real coding ...
|
|
|
|
|
Hi,
Can i hide my system tray somehow..
Programatically..
I've seen a program that when run just hides the
system tray and a small line appears - when you
move your mouse over that the system tray appears again.
Its probably the system tray has been moved to right ..
How can i do that
|
|
|
|
|
Sameer Maggon wrote:
Can i hide my system tray somehow..
Programatically..
Yes. Replace Explorer.exe.
++luck; // you'll need it
|
|
|
|
|
I've found it using Hooks..
|
|
|
|
|
Hi!
I'm creting a MDI aplication and I don't want that when I start the aplication a document to be created automaticaly. Any ideas?
Bye,
Orbital^
...the night is long ... but not long enought to do some real coding ...
|
|
|
|