|
Hi shivditya,
I have a question I think you can help me I want to learning programming for IE(Toolbar) and I searching on the codeproject and find lot of articles about it,but I have a problem with all of them I cant compile their when I want to compling each of them I am getting many errors
that I didnt understand do you know an article that I can learn and it compile without error for example I get this error on the an article
error C2787: 'IInputObject' : no GUID has been associated with this object
Thank you
|
|
|
|
|
.NET comes up with predefined macros like __FUNCTION__ which can be handy while retrieving the function signatures in a program. Is there a way to get the same functionality in lower versions of VC++?
|
|
|
|
|
Copy and paste the macro definitions from .NET to your older project?
|
|
|
|
|
__FUNCTION__ is a special #define created for you by the compiler. Unless the compiler provides it, there's no way for you to code it, unless you do the following at the start of each function:
void API::Function1()
#undef __FUNCTION__
#define __FUNCTION__ API::Function1
{
}
void API::Function2()
#undef __FUNCTION__
#define __FUNCTION__ API::Function2
{
}
void API::Function3()
#undef __FUNCTION__
#define __FUNCTION__ API::Function3
{
} which would get really, really old, really, really fast.
Software Zen: delete this;
|
|
|
|
|
I dont understand what do you need do you want to learning VC++ ?
|
|
|
|
|
Hi,
How can I get the last part ("1") of the file name using strstr or something else ???
char dtSrt[BUF_SIZE] = "C:\\Test\\6.20.1.txt"
char *pdest;
pdest = strstr(dtSrt,"");
Thnx again
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
|
|
|
|
|
Searching a bit longer proves to be a good option for me ....
char dtSrt[BUF_SIZE] = "C:\\Test\\6.20.1.txt"
char *pdest;
pdest = strrchr(dtSrt,'.');
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
|
|
|
|
|
char dtSrt[BUF_SIZE] = "C:\\Test\\6.20.1.txt";
char *pdest = 0;
pdest = strrchr( dtSrt,".");
if( pdest > dtSrt )
{
char c = pdest[ -1 ];
}
nave
|
|
|
|
|
This will point you to the dot separating the file's name from its extension:
char *pExt = PathFindExtension(dtSrt);
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
I want to lock a file so that another application will not be able to open it. I am using CFile.open method with the flags CFile::modeRead|CFile::shareExclusive. However, after opening the file (and keeping it open) I am able to open the file using the windows api CreateFile function. How can I lock the file so that, the CreateFile function will fail?
C++beginer
|
|
|
|
|
ashokvishnu wrote: I am able to open the file using the windows api CreateFile function.
Can you show code ?
|
|
|
|
|
I found out the problem. If you use createfile function with dwDesiredAccess flag as 0, then it will not try to open the file. It will only check whether the file exists.
C++beginer
|
|
|
|
|
ashokvishnu wrote: I found out the problem. If you use createfile function with dwDesiredAccess flag as 0, then it will not try to open the file. It will only check whether the file exists.
I don't think that is a solution, at least for the problem you posted.
What will happen if another application tries to open your file?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
if you can send the file, may be someone can chk it. I don't understand any particular reason for this to be possible. Like i told you window's does force not to write on a file that is being used.. u can get the exact details from the book "Windows Driver Development"
best of luck
|
|
|
|
|
i am preparing application to test sound at different speaker configuration for Windows vista and Windows XP.
for doing this i am using API SetSpeakerConfig() to set the different configuration and API GetSpeakerConfig()for getting same configuration.
this is working fine in Windows XP. but not in Windows Vista.
The call to SetSpeakerConfig() succeeds in Vista, but doesn't actually change anything.
Is there any way other than by using the Sound control panel.
pavan
|
|
|
|
|
Use waveOutGetDevCaps() and waveOutGetVolume() and waveOutSetVolume() APIs.
|
|
|
|
|
Hi,
Is there a function or something I can use to just get the current year?
Thnx
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
|
|
|
|
|
What about COleDateTime::GetYear ?
|
|
|
|
|
Programm3r wrote: Is there a function or something I can use to just get the current year?
SYSTEMTIME sys;
GetSystemTime (&sys);
//sys.wYear has the year that you require
Also you can have a look at
CTime::GetYear()
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
check GetLocalTime()
nave
|
|
|
|
|
have a look at CTime::GetYear .
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
Thnx alot everyone, wow that was quick ....
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
|
|
|
|
|
last day posted some pblm saying "application not working in another mechine...."
What about that. Was that solved?
nave
|
|
|
|
|
Well, yes and no. If I statically link some libraries to the application and fiddle with it's settings it works (local & other computers), and on the other hand if I don't do it I get and error when I want to run the exe on a different machine. Someone told me it has to do with CRT dll's and the whole .Net Framework ... and it's a long story ... thanx for asking Naveen
Regards
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
|
|
|
|
|
Hi,
I have to convert a text report to a PDF file...
I done the first half., and now i have to create the PDF file from the text file... (ie., "murugan.txt"-->"murugan.pdf").
In one of a forum told that we can do this using CFile,CSTDIO FILE..
i don't know how to handle the conversion with the help of these files.,
can any one pls help me to do this.,
thank for your great help.
murugan.K
|
|
|
|