|
you should use an Keyboard hook.(key board filter function)
use SetWindowsHookEx,
lowlevelkeyborad event.
|
|
|
|
|
Hello,
I'm trying to disable some compiler warnings generated while using the stl. The warnings that I try to disable are:
4663, 4018, 4100, 4786, 4245, 4146, 4244.
I installed the latest service pack and processor pack for visual studio 6.
Does anybody have a clue why these warnings do not get disabled?
Multiply it by infinity and take it beyond eternity and you'll still have no idea about what I'm talking about.
|
|
|
|
|
Where are you placing the #pragma directives?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
At the top of my precompiled header file "StdAfx.h".
But I found some article here on codeproject that explains that some stl headers are setting the warnings back to default (on). Because of that my #pragma is everruled by the stl...
Multiply it by infinity and take it beyond eternity and you'll still have no idea about what I'm talking about.
|
|
|
|
|
I understand the article's intent, but it seems excessive. I placed the following in my project's stdafx.h file right before any other STL includes:
#include <yvals.h>
#pragma warning(disable:4018 4100 4146 4244 4663)
#include <iostream>
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
And you get a clean build? If I do that, the warnings keep on coming...
Multiply it by infinity and take it beyond eternity and you'll still have no idea about what I'm talking about.
|
|
|
|
|
Bob Stanneveld wrote:
And you get a clean build?
Yes, for those particular warnings.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Do you also have the latest sdk installed?
Multiply it by infinity and take it beyond eternity and you'll still have no idea about what I'm talking about.
|
|
|
|
|
I have the Febuary 2003 (5.2.3790.0) edition installed.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
And now I'm starting to think that some paranormal influence wants me to go crazy...
Multiply it by infinity and take it beyond eternity and you'll still have no idea about what I'm talking about.
|
|
|
|
|
Please show the contents of your project's stdafx.h file.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
#ifndef __StdAfx_h_included__
#define __StdAfx_h_included__
#define VC_EXTRALEAN
#include <afx.h>
#include <afxwin.h>
/*
// these didn't work
#pragma warning(disable: 4018)
#pragma warning(disable: 4100)
#pragma warning(disable: 4146)
#pragma warning(disable: 4244)
#pragma warning(disable: 4245)
#pragma warning(disable: 4511)
#pragma warning(disable: 4512)
#pragma warning(disable: 4663)
#pragma warning(disable: 4710)
#pragma warning(disable: 4786)
*/
// warning 4018 still falls through
#define STL_USING_STRING
#include "Stl.h"
#endif // __StdAfx_h_included__
Multiply it by infinity and take it beyond eternity and you'll still have no idea about what I'm talking about.
|
|
|
|
|
I finally solved it.
After digging through the slt headers for a long time, I discovered that in the header <xlocale> the warnings 4018 and 4663 get set to their default state.
The solution was editing the Stl.h file in the STRING section so that those warnings get disabled after <xlocale> was included...
Now I can go to sleep with a clear mind...
Thanks for your help
Multiply it by infinity and take it beyond eternity and you'll still have no idea about what I'm talking about.
|
|
|
|
|
Maybe you're having a hard time with precompiled headers? Try deleting the debug (or release) subdir and build again. Sometimes this does wonders.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
Want a Boost forum in Code Project? Vote here[^]!
|
|
|
|
|
Nope, does not work either..
Multiply it by infinity and take it beyond eternity and you'll still have no idea about what I'm talking about.
|
|
|
|
|
What Windows Explorer stores in the lParam of TVITEM structure
If you retrieve information about treenode you have to use TVITEM structure. lParam of this structure allows to you to cache some data. Do you know what Windows Explorer caching here?
Thanks.
|
|
|
|
|
There is a good reason it is undocumented, to stop people from playing about too much.
That said, the ListView control has the PIDL stored in the items LPARAM. So, chances
are that will be the same for the Tree.
See here[^].
It is also possible that the LParam simply points to some internal structures holding pidls, and all sorts of com objects.
Iain.
|
|
|
|
|
How do you get your program to have XP-style buttons when running on XP? My buttons are still regular style.
~Nitron.
ññòòïðïðB A start
|
|
|
|
|
Quick Answer.
To get all the nifty new autotheme stuff, you need to have a manifest file.
Though I'm not the right person to ask more detail! I treat XP as W2K+Pretty.
OK, that was vague, but I hope it gives you a head start.
Iain.
|
|
|
|
|
|
Hi Guys,
In my Application i have some Menus. The Menus work fine with W2k and Win XP. The Menus look like those from MS Word (File -> New, File -> Open, File -> Save, File -> Save as etc.). On Windwows NT 4 they are displayed a bit strange.
File -> ,÷| (should be File -> New)
File -> ,÷| (should be File -> Open) and so on. I have this problem for the whole menus on Win NT 4
Can anybody help me to solve this problem?
P-Rex
|
|
|
|
|
I had exactly the same problem a few years ago. I investigated, and found that MENUITEMINFO had expanded
post NT4. Fortunately, I didn't need any of the new fields, so I just used my own retro class. Newer
OSs can cope with the older structure, but not vice versa. You can get similar effects by playing with
platform definitions, but this seemed less intrusive. It is also better than MENUITEMINFO, as it self
initialises with sensible starting values.
struct CMenuItemInfo
{
UINT cbSize;
UINT fMask;
UINT fType;
UINT fState;
UINT wID;
HMENU hSubMenu;
HBITMAP hbmpChecked;
HBITMAP hbmpUnchecked;
DWORD dwItemData;
LPTSTR dwTypeData;
UINT cch;
CMenuItemInfo()
{
memset(this, 0, sizeof(CMenuItemInfo));
cbSize = sizeof(CMenuItemInfo);
};
inline operator LPMENUITEMINFO() const
{
return (LPMENUITEMINFO)this;
}
};
I hope this helps.
Iain.
|
|
|
|
|
Hello,
i have a problem with creating a completely owner drawn popup menu, because i cannot manipulate the border of it. Painting the menu-items in the way i want works fine. But the common 3d border will be drawn under Win2k always.
I searched in all menu-articles and in the message board. Also i did a google- and msdn-search. I don't know how to paint my own menu-border at all ?!
Please help!
|
|
|
|
|
I would strongly recommend a look at Bruno Podetti's NewMenu article classes. It is well written,
had a *lot* of work in it (including a smidgeon by me), and I've used it to great effect in my
own projects.
Owner Drawn Menu with Icons, Titles and Shading [^]
It has a choice of a variety of styles, including menu shadows, and all that.
Iain
|
|
|
|
|
Thank you very much !!! I will check the article!
Best regards
Tabor25
|
|
|
|