|
Hello, I am in need of some assistance. Currently, I have a application that opens microsoft word and reads in a word document. I put my own bitmap on the toolbar (after looking at the office 2K addin article) but I do not understand how to capture when my button has been hit. I have looked at other posts and do not understand what to do. This is an mfc based COM/OLE application that is NOT an ATL server. So what do I need to do, in plain english, to determine when my button has been hit.
|
|
|
|
|
Hi,
I am trying to build a project with Visual C++.
1) I point and click my way to making this project
the "Active Project".
2) I do Build >> Rebuild All
3) I get the error message ...
Deleting intermediate files and output files for project 'CoreXYZ - Win32 Release'.
--------------------Configuration: CoreXYZ - Win32 Release--------------------
Invoking TAO IDL Compile
'tao_xyz' is not recognized as an internal or external command,
operable program or batch file.
Error executing c:\windows\system32\cmd.exe.
CoreXYZ.lib - 1 error(s), 0 warning(s)
... I understand that Visual C++ is trying to execute the program
tao_xyz for me. tao_xyz is in the "folder" C:\XYZ\bin so I put
C:\XYZ\bin in every frigging environment variable I can point
and click my way to. I reboot the **#$& computer and start
VC++ 6 up again and do step 1 & 2 above over again with the same
results!
What the heck to I right double left click to get VC++ 6 to
use C:\XYZ\bin\tao_xyz instead of tao_xyz?
And what the hell is that icon for Build >> Rebuild All
suppose to be? Rain drops hitting a lego?
|
|
|
|
|
1. Go to Tools->Options
2. In the directories tab select "Executable Files"
3. Add ":\XYZ\bin" there
Everything will work magically
|
|
|
|
|
Oops! ignore that last posting ... I add C:\XYZ\bin to the wrong list
of directories.
Now I am getting these errors ...
Deleting intermediate files and output files for project 'CoreIDL - Win32 Release'.
--------------------Configuration: CoreIDL - Win32 Release--------------------
Invoking TAO IDL Compile
tao_idl: spawn of C:\Program Files\DevStudio\VC\bin\CL.EXE failed
Invoking TAO IDL Compile
tao_idl: spawn of C:\Program Files\DevStudio\VC\bin\CL.EXE failed
Invoking TAO IDL Compile
That doesn't look good ... do you know anything about ACE+TAO
|
|
|
|
|
Hmmm ... nice try. I did what you said
I added ..
C:\XYZ\bin
... to that list of directories.
Did a re-build all ... same error.
I did a clean then re-build all ... same error
I restarted VC++ 6 did a clean then re-build all ... same error
Was that a typo in your last response or should I really
add ...
:\XYZ\bin
... to that list of directories.
Do I need to reboot again?;P
|
|
|
|
|
Hello,
How can I catch I open_file notification (or a message) ?
I want to write a small program that can catch the open_file notification (in order to protected this file - user must type password correctly to open this file). If user type password incorrectly, open_file operation must be ignored (user can not open this file unless he have the password).
Thanks for reading.
If you have the solution, please email to dgtuan@hcm.fpt.vn
Wait for a solution.
____________
DDawngjTuaan
IG-Group
|
|
|
|
|
This is a pretty low-level operation that most people shouldn't need to perform. If it's security you're concerned about, there are other ways to protect the file depending on the user currently logged in. I'll leave researching that option up to you. However, if you insist on being able intercept every single open file message (which is probably far more file access than you believe), you can look at Mark Russinovich and Bryce Cogswell's http://www.sysinternals.com. In the "Source" link under the Windows NT/2K/XP navigation item, you'll find source code for an application called filemon (means "file monitor"). Download and run this app to see exactly how much file access occurs every second. If this still doesn't convince you to try another route, read the source code. It's not for the faint of heart!!
Best of luck.
-Matt
------------------------------------------
The 3 great virtues of a programmer:
Laziness, Impatience, and Hubris.
--Larry Wall
|
|
|
|
|
Hello,
How do you delete executable files in windows?
The following will not work but return that they have:
unlink(file);
DeleteFile(file);
Remove(file);
system("del file");
The following will not allow me access rights to delete the file:
CFile::Remove(file);
Any Suggestions?
~C
|
|
|
|
|
Two questions:
1. Does the user you're logged in as have the proper permissions to be able to delete the file (assuming you're running in an NT based environment)? If not, then log in as Administrator and try again.
2. Are you trying to delete the exe you're currently running in. I don't think this is the case, but if it is... duh!! You can't delete it because it is in use.
Best regards and good luck.
-Matt
------------------------------------------
The 3 great virtues of a programmer:
Laziness, Impatience, and Hubris.
--Larry Wall
|
|
|
|
|
CArray<cstring,cstring &=""> CMyClass::MyFunction(const char*,const char*)
{
CArray<cstring,cstring &=""> tmp;
CString str_component = "test";
tmp.Add(str_component);
return tmp;
}
=======Compile=========
error C2558: class 'CArray<class cstring,class="" cstring="" &="">' : no copy constructor available
What's wrong ?
What could I do (show me the example please)?
Thanks a lot for your kindness
|
|
|
|
|
// make sure you have this include file:
#include <Afxtempl.h>
//Put this in your header
CArray<CString,CString> yourArray;
//This is how you would do it in your cpp file
yourArray.InsertAt(0,YourString);
Try this, my first response wasn't formatted correctly.
<i>
After a poor performance in London in 1899, Steinitz went insane and died a year later on August 12, 1900 at Wards Island, N.Y.</i>
|
|
|
|
|
heyyyyyyyy just repaly after knowing the problem.he wants to retun a CArray from a function...
me also face the same problem
Renjith-The CPian.
|
|
|
|
|
> he wants to retun a CArray from a function...
> me also face the same problem
Doesn't work!
Solution: use std::vector and fire the responsible MS-Programmer
Really: To return a CArray by value requires the use of the copy constructor
to copy the object (as the local instance will be destructed on return from the function.
But-CArray has got no copy constructor, meaning CArray is almost useless.
Greetings
Jan-Henner Wurmbach
|
|
|
|
|
jhwurmbach wrote:
CArray is almost useless.
YES YES YES YES YES !!!!!
Christian
I am completely intolerant of stupidity. Stupidity is, of course, anything that doesn't conform to my way of thinking. - Jamie Hale - 29/05/2002
Half the reason people switch away from VB is to find out what actually goes on.. and then like me they find out that they weren't quite as good as they thought - they've been nannied. - Alex, 13 June 2002
|
|
|
|
|
Instead of returning a CArray (which is impossible no matter what you do since it's a template class; but that's another story) do this:
void CMyClass::MyFunction(CStringArray& a)
{
CString str_component = "test";
a.add(str_component);
} #include "afxtempl.h" to use the class 'CStringArray'. To use 'MyFunction' do like this:
void CMyClass::AnotherFunction()
{
CStringArray myArray;
this->MyFunction(myArray);
} After the call to 'MyFunction' the string is still added since the array is sent by reference. And there is no need for a copy constructor for the same reason.
Sprudling
|
|
|
|
|
Hi everybody!
Just wanted to know whether there are any good places/articles that will give instructions on how to define and create STLs and general information about what are they used for.
Thanks!
Kind regards,
wilche
|
|
|
|
|
http://www.codeproject.com/vcpp/stl/
Michel
It is a lovely language, but it takes a very long time to say anything in it, because we do not say anything in it, unless it is worth taking a very long time to say, and to listen to.
- TreeBeard
|
|
|
|
|
AS well as articles here, try www.sgi.com for good online docs.
Christian
I am completely intolerant of stupidity. Stupidity is, of course, anything that doesn't conform to my way of thinking. - Jamie Hale - 29/05/2002
Half the reason people switch away from VB is to find out what actually goes on.. and then like me they find out that they weren't quite as good as they thought - they've been nannied. - Alex, 13 June 2002
|
|
|
|
|
I am trying to profile some performance-critical code and I can't seem to get the profiler to work. It's been ages since I have used it, so I am probably doing something dumb.
I am using MS Visual Studio 6 Pro, SP 5 under Win2k Pro SP 2. I am running on an account that is a member of "Administrators" and I have granted "Administrators" the right to profile both single processes and system processes.
- I create a new project from MSDEV (The same thing happens for both console and MFC applications).
- I go to "Project/Settings," choose the release build, and tell C++ to generate program database debugging info, and tell link to enable profiling and output both a map file and debuging info.
- Set build config to Release and rebuild all.
- "Profile..." is still grayed in the "Build" menu.
- If I run PREP, PROFILE, PREP /M, PLIST from the command line, I get some output, but PLIST throws a fatal error trying to read illegal memory (
The instruction at "0x004060f6" referenced memory at "0x7bd22ef0." The memory could not be "read" ).
Can anyone help me understand why the code profiler seems not to be working here?
|
|
|
|
|
I found some answers to my own problem:
- KB Q224382 answers why the profiler is grayed out on the menu. There is a known bug, whereby you need to manually create the registry value (REG_DWORD) HKLM\Software\Microsoft\DevStudio\6.0\General\ProfilerInstalled = 0x1
- KB Q195374 answers the PLIST crash. PLIST cannot handle symbols longer than 255 characters, so it crashes if you use STL with call attributed profiling.
I have found another bug with the profiler. The debug info generated by MSVC has multiple line numbers for several STL functions, so you get scads of "offset duplication" error messages from PREP.
Oh well, I guess profiling STL is not really possible on VC6. Does anyone know if it is possible under VC7?
|
|
|
|
|
It's better to get some good profilers like NuMega TrueTime. I think there is one which they are giving away for free for VC7 go to http://www.compuware.com. Look for something called Community Profiler
|
|
|
|
|
Hello there !
I have a bitmap
I just want to draw a line and paint a part of the bitmap !
How could i do that ?
What's ur idea ?
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
Hadi_Rezaie wrote:
What's ur idea ?
Look it up yourself before asking ?
What do you mean by paint a part of the bitmap ? Do you mean use the ExtFloodFill function, or the FillSolidRect function ? As for drawing lines, MoveTo and LineTo usually do the trick.
Or did I misread the question entirely ? The header said 'filtering an image', not drawing on it.
Christian
I am completely intolerant of stupidity. Stupidity is, of course, anything that doesn't conform to my way of thinking. - Jamie Hale - 29/05/2002
Half the reason people switch away from VB is to find out what actually goes on.. and then like me they find out that they weren't quite as good as they thought - they've been nannied. - Alex, 13 June 2002
|
|
|
|
|
Thanks dear Christian !
The answer was ExtFloodFill
Thanks alot !
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
I've searched in CP for some articles regarding to using the MFC class CPropertySheet, some articles here provided the way how to remove the "apply" button, which by default is visible and disabled, however, none mentioned how to actually use the "apply" button, that is, make that button enabled and interact with user input.
As far as I know, in order to enable the "apply" button I need to derive a class from CPropertySheet... and then what? Which method I need to override in new class? Thanks.
|
|
|
|