|
I know it is not the preferrable solution but i dont find any other solution to resolve my problem
I am using SetWindowHookEx API and as an argument i use JournalPlayBack and it is working fine in other OS but not in vista.
1)I run it as an admin.
2)change manifest file.
I tried all hit and trial but not find any solution than i disable the UAC.
In your problem you find the solution but for JournalPlayback there is no solution except this as per as I know.
Yes U Can ...If U Can ,Dream it , U can do it ...ICAN
|
|
|
|
|
I have an ActiveX control with button, combobox and cedit on it and hosting mfc app with this ocx. I would like to create an event in my ActiveX control which fires when the button is pressed, combobox selection or text in cedit changes to take some actions in hosting mfc app. I have no idea how to do that ;/ Any ideas?
|
|
|
|
|
Hi ,
I am working on an simple vc++ application using vc6.0.
When I compile my code I am getting lots of warnings like:
c:\program files\microsoft visual studio\vc98\include\xtree(120) : warning C4786: 'std::_Tree<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,
std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::map<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<cha
r,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >::_Kfn,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::basi
c_string<char,std::char_traits<char>,std::allocator<char> > > >' : identifier was truncated to '255' characters in the debug information.
This is a single warning.
Is it beacuse I added an template??
If so please help me how to getrid of this one.
Regards,
Sunil Kumar
|
|
|
|
|
it is because the identifier has more than 255 characters, which is truncated in debug build.
just don't bother with this.
if you want to hide it, insert the following in your stdafx.h (or any common header if any) :
#pragma warning(disable: 4786)
|
|
|
|
|
Hi all,
Please tell me how can Create Shortcut keys in MFC-SDI type application?
i want to open any dialog of shortcut key.
thanks in advance.
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
If you want them to be global, take a look at this article at the CodeProject. However, if you only want the shortcut to work from within your application, then you'll have to process the keyboard input yourself.
Hope this helps,
--Perspx
"The Blue Screen of Death, also known as The Blue Screen of Doom, the "Blue Screen of Fun", "Phatul Exception: The WRECKening" and "Windows Vista", is a multi award-winning game first developed in 1995 by Microsoft" - Uncyclopedia
|
|
|
|
|
I want the shortcut is work from within my application,please tell me how can i do this.
please tell me with example if possible
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
In Resource Tab->Accelerator..
Enter the ID of Dialog box and give shortcut key for that.
Anu
|
|
|
|
|
i m try this but its not working
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
You can use the WM_SETHOTKEY message.
See the documentation on MSDN.
Hope this helps,
--Perspx
"The Blue Screen of Death, also known as The Blue Screen of Doom, the "Blue Screen of Fun", "Phatul Exception: The WRECKening" and "Windows Vista", is a multi award-winning game first developed in 1995 by Microsoft" - Uncyclopedia
|
|
|
|
|
Can you explain with example please.
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
You can find an example here. If this isn't quite what you're looking for then you could just use the RegisterHotkey() function - however this defines a system-wide hotkey (documentation here). If this fails, look at keyboard accelerators here.
Hope this helps,
--Perspx
"The Blue Screen of Death, also known as The Blue Screen of Doom, the "Blue Screen of Fun", "Phatul Exception: The WRECKening" and "Windows Vista", is a multi award-winning game first developed in 1995 by Microsoft" - Uncyclopedia
|
|
|
|
|
Expecting favourable reply.
|
|
|
|
|
Super Hornet wrote: Expecting favourable reply
Explecting explicit and clear question, with code snippets and all that i need to understand the point with ambiguity...
|
|
|
|
|
char *ReverseString(char *pszString)
{
if (pszString)
{
int ilength = strlen(pszString) + 1;
for (int iIndex = ilength; iIndex > 0; iIndex--)
{
pszString[i] = pszString[i-1];
}
pszString[0] = '\0';
return &pszString[ilength];
}
else
{
return NULL;
}
}
int main()
{
char szString[] = "hello world";
cout << "String before reversing " << szString;
szString = ReverseString(szStirng);
cout << "\n String after reversing " << szString;
}
Is the above code correct???
|
|
|
|
|
hum... bad habits lead to bad code...
you're using C++, so use it entierely.
first of all, abandon the C-style strings (char*), it's just a pain to use when you can make use of the string class.
here is another solution:
std::string ReverseString(const std::string& str) {
std::string strTmp;
std::string::const_reverse_iterator iter;
for (iter = str.rbegin(); iter != rend(); --iter) {
strTmp += *iter;
}
return strTmp;
}
you could also use the swap technic:
std::string ReverseString(const std::string& str) {
std::string strTmp = str;
size_t len = strTmp.length();
for (size_t i = 0; iter < len/2; i++) {
strTmp[i] = str[len-i];
strTmp[len-i] = str[i];
}
return strTmp;
}
or even more powerful, using the STL algorithms (thanks jijo raj):
std::string ReverseString(const std::string& str) {
return std::reverse(str.begin(), str.end());
}
now in your main, just call it:
int main(int argc, char* argv[]) {
std::string s = "Hello World";
std::cout << "Before reversing : " << s <<endl;
std::cout << "After reversing : " << ReverseString(s) << endl;
}
modified on Wednesday, August 6, 2008 6:00 AM
|
|
|
|
|
You can further optimize it by using std::reverse() algorithm...
string Str = _T("Hello");
reverse( Str.begin(), Str.end());
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
damn it, i was sure such a functor was existing somewhere, but i couldn't put a hand on it though.
thanks for the notice.
|
|
|
|
|
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
Dosen't string have a reserve() function?
|
|
|
|
|
Naveen wrote: Dosen't string have a reserve() function?
reserve() ? what for ?
|
|
|
|
|
ops My bad. sorry I miss read the reserve as reverse.
|
|
|
|
|
|
Super Hornet wrote: Is the above code correct???
That all depends on what you were trying to accomplish. The use of cout appears to be the only thing C++ that I see.
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
Hi,
I have CListCtrl with 4 coloumn, I want to cerate CEdit and CButton control in 3 and 4 colomn. How can I do that?
And How can I handle these control on resize any colomn.
|
|
|
|