|
Pate wrote:
I change the service properties LogOn from Local account to user account (this is needed to get network access for some file transfers).
After this change the icon doesn't show up anymore.
That user most probably have no access whatsoever to your desktop object. I believe there was an MSDN article of how to implement RunAs using NT4 that had to deal with this problem too. Most probably it was written by Matt Pietrek.
|
|
|
|
|
What a stupid compiler VC++ 6 is !! Someone please help me for chasing bugs. I've developed a childish VC++ console application. I added a header file and a cpp file.
In header file myheader.h, i declared a class like:
class myclass
{
public:
static BOOL function(BYTE a, BYTE b)
};
In cpp file mycpp.cpp I wrote code as:
#include "myheader.h"
BOOL myclass::function(BYTE a, BYTE b)
{
/*Some Code */
return 0;
}
Now I am getting following errors while compiling:
c:\mum_client\myheader.h(6) : error C2146: syntax error : missing ';' before identifier 'Start'
c:\mum_client\myheader.h(6) : error C2061: syntax error : identifier 'BYTE'
C:\mum_client\mycpp.cpp(4) : error C2143: syntax error : missing ';' before 'tag::id'
C:\mum_client\mycpp.cpp(4) : error C2501: 'BOOL' : missing storage-class or type specifiers
C:\mum_client\mycpp.cpp(4) : fatal error C1004: unexpected end of file found
Error executing cl.exe.
mum_net_io.obj - 5 error(s), 0 warning(s)
Someone please tell me what reason these bugs get generated.
|
|
|
|
|
This time it is not VC++'s fault, but yours. BOOL , BYTE , etc., are not built-in types, but rather they're Windows specific. You have to #include<windows.h> to get their definitions.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
It's not VC that's being stupid.
1/ Why are you using BOOL at all ?
2/ What's a BYTE ? Obviously the M$ header that does this typedef for an unsigned char is not in your project. Same goes for BOOL.
3/ You're probably using precompiled headers and did not #include stdafx.h
beyond that, you've failed to show where some of these errors are generated. Where does the terms 'Start' and 'tag::ID' appear in your code ?
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
|
|
|
|
|
Yep, the title says it all. How to have bitmap on the background of CMDIFrameWnd (instead of the boring grey background)? ...and also... to have the small bitmap tiled on the background.
|
|
|
|
|
This post of mine shows you how.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Thank you very much. This is just what I want.
|
|
|
|
|
Does anyone know how I can sub-class the CRichEditView so that I can display the text in the view in columns? I have looked for similiar on the Web and found nil.
The best I can come up with now, is that I will have to read all of the text into a buffer, and reformat the text on a line per line basis. ie) if the user whats 3 columns, and there are 100 lines of text, then I redo the text so that line 1 now has line 1, line 34, and line 67's text on it.
But, shouldn't there be an easier way? After all, Word does it. The problem that I foresee with my method will be speed.
Suggestions?
|
|
|
|
|
hello..
little question: when using an ostringstream how to pass non - readable codes (e.g. ASCII Code 27)...
because of christian graus's type safety i only can insert it as an integer.. or it doesn't insert it at all.. (via "\0x1B")
i hope anyone can help me otherwise i have to use the awkward sprintf again..
thanks in advance
bernhard
"I'm from the South Bronx, and I don't care what you say: those cows look dangerous." U.S. Secretary of State Colin Powell at George Bush's ranch in Texas
|
|
|
|
|
How about a cast to char...
<br />
std::ostringstream oss;<br />
oss << char(0x1b);<br />
Works in VC++6
Stuart Dootson
|
|
|
|
|
thank you..
another way (after messing around too long with these freaking octal numbers)
oss << 'x1B';
works nice..
thanks
bernhard
"I'm from the South Bronx, and I don't care what you say: those cows look dangerous." U.S. Secretary of State Colin Powell at George Bush's ranch in Texas
|
|
|
|
|
Hello friends,
I am trying implementing timer in VC6.0. OS Win2000 , Platform SDK. My requirment is to write some data in .ini file at an interval of 1 sec.
First tried to implement SetTimer with TimerProc Function. But due to lower priority of WM_Timer flag, my function to write data in .ini file is not getting called at all !!
::SetTimer(NULL,0,500,(TIMERPROC)CAutoPlc::TimerProc);
STDMETHODIMP_(void CALLBACK) CAutoPlc::TimerProc
{
// To Do code
}
Then tried to implement following code for MultiMedia Timer:
timeSetEvent(
1000,
resolution,
write_ini_parameter1, //parameter 3
NULL,
TIME_PERIODIC);
STDMETHODIMP_(void CALLBACK) CAutoPlc::write_ini_parameter1(UINT wTimerID, UINT msg, DWORD dwUser, DWORD dw1, DWORD dw2)
{
// To Do Code
}
I'm getting following Error:
error C2664: 'timeSetEvent' : cannot convert parameter 3 from 'void (unsigned int,unsigned int,unsigned long,unsigned long,unsigned long)' to 'void (__stdcall *)(unsigned int,unsigne
d int,unsigned long,unsigned long,unsigned long)'
None of the functions with this name in scope match the target type.
I tried to resolve the error by adding _STRICT parameter in Processor Defination in VC Enviorment, but it couldn't help.
Please suggest solution if any one has faced the same problem.
Thanks in advance.
Kinjal.
|
|
|
|
|
Have you declared (in the .h file) write_ini_parameter1 with the qualifier CALLBACK ?
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
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.
|
|
|
|