|
hm.. yeah dats rite.. its a calling convention.. herez the piece of code frm winnt.h
#if ((_MSC_VER >= 800) || defined(_STDCALL_SUPPORTED)) && !defined(_M_AMD64)
#define NTAPI __stdcall
#else
#define _cdecl
#define NTAPI
#endif
Thanx
|
|
|
|
|
pfnNtQueryInformationProcess is a function pointer to a function that returns NTSTATUS , has an NTAPI calling convention, and takes five arguments.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hi all,
I am busy testing the use of minidumps, but I received this messge
Debugging information for @project 1.exe' cannot be found or does not match.
Binary was not built with debug information.
I am well aware of how to do it in Visual Studio
You can use the following options:
Compiler: /Zi (/Z7 and /ZI can also be used in some cases - see their documentation for more information)
Linker: /debug (in release builds also use /opt:ref option)
All these options can be set in the IDE.
My question is, how can I do it in Borland Developer Studio 2006 ??
Can anyone please help me ??
Many thanks
Regards,
The only programmers that are better that C programmers are those who code in 1's and 0's
Programm3r
My Blog: ^_^
|
|
|
|
|
Hi All,
I am doing project in VC++ 6.0 in which i am displaying tabs on the window area.I want to load a particular page whenever user click on particular tab.These tabs are created at run time.So how can I identify which tab is clicked by user.If anybody know the solution of this, then please forward it me.
Thanks in Advance
Atul
|
|
|
|
|
you wil recieve a TCN_SELCHANGE message when user changes the tab item.
|
|
|
|
|
Atulmahajan wrote: So how can I identify which tab is clicked by user.
Check out the PSN_SETACTIVE notification.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Does anyone knows if
in file.h
namespace MyNamespace{
...
enum MyEnum{
...
EnumItem,
....
};
...
};
then in file.cpp
using namespace MyNamespace;
...
foo(MyNamespace::MyEnum::EnumItem, ..);
or
foo(MyEnum::EnumItem, ..);
...
gives error C2825 and error C2275 in the first case
and
gives error C2039 in the second case
It doesn't work also if I remove the line using (of course then using extended variable usage)
can it be related to a bug of the compiler in VS2003? I'm quite sure that I'm not wronging the code sintax.
Russell
|
|
|
|
|
Hmm. This
namespace MyNamespace{
enum MyEnum{ EnumItem,SecondItem };
};
int _tmain(int argc, _TCHAR* argv[])
{
MyNamespace::MyEnum firstItem = MyNamespace::MyEnum::EnumItem;
MyNamespace::MyEnum secondItem = MyNamespace::MyEnum::SecondItem;
return system("pause");
} gives a warning C4482: nonstandard extension used: enum 'MyNamespace::MyEnum' used in qualified name with VC 2005.
That is meaning that enums are second class citizens and the correct way of refering them would be:
MyNamespace::MyEnum firstItem = MyNamespace::EnumItem;
MyNamespace::MyEnum secondItem = MyNamespace::SecondItem;
Though I speak with the tongues of men and of angels, and have not money, I am become as a sounding brass, or a tinkling cymbal. George Orwell, "Keep the Aspidistra Flying", Opening words
|
|
|
|
|
yes!
you are right.
I found only now your same conclusion.
thank you
Russell
|
|
|
|
|
Sorry,
looks solved:
this is a wrong usage
MyNamespace::MyEnum var=MyNamespace::MyEnum::EnumItem
this is correct
MyNamespace::MyEnum var=MyNamespace::EnumItem
Russell
|
|
|
|
|
i am using list control in report view and want to color the header of that list control, how this is done
malik
|
|
|
|
|
AFAIK either you need to owner draw it or Custom draw( LVN_CUSTOMDRAW ) it.
|
|
|
|
|
custom draw is only way to do so.. for that you have to subclass CListCtrl
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
hi
I need to call the following function somewhere in a program:
void __fastcall TFormMain::btnUpdateClick(TObject *Sender)
{.....}
This is the event of mouse-click on a button.
How can i call this function in the program itself (which otherwise gets called on 'mouse-click'??
|
|
|
|
|
Try sending a WM_COMMAND message to the button
ex:SendMessage(WM_COMMAND,/*ID_OF_BUTTON*/);
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
By calling it directly. I do not know how the function is implemented, so I do not know if it can handle a NULL Sender parameter or not - e.g.:
btnUpdateClick( NULL ); If you have to call it outside of the TFormMain class, you need a way to expose it from that class.
Peace!
-=- James Please rate this message - let me know if I helped or not!<HR> If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! See DeleteFXPFiles
|
|
|
|
|
|
Hi
can anyone help me finding a book about developing "com add-in" for office applications using mfc ?
thanks alot
Tarek
|
|
|
|
|
See Here ....[^]
Regards,
The only programmers that are better that C programmers are those who code in 1's and 0's
Programm3r
My Blog: ^_^
|
|
|
|
|
Hi,I have a path (like "c:\path\programname.exe")
How can I determine if program 'programname.exe' exist in 'c:\path' directory?
I tried with 'FindFirstFile' and checking 'WIN32_FIND_DATA' structure, but for what 'dwFileAttributes'?
Thanks!
|
|
|
|
|
there's a quicker way - something like :-
bool bFExists(LPCTSTR szText) {
struct _stat buf;
return (_stat(szText, &buf) == 0);
}
should be quicker if you dont need to iterate through the files .. you'll need an include for <sys/stat.h>
hth, 'g'
|
|
|
|
|
<br />
WIN32_FIND_DATA wfd;<br />
HANDLE hf = FindFirstFile("c:\path\programname.exe",&wfd);<br />
if (hf != INVALID_HANDLE_VALUE) {<br />
FindClose(hf);<br />
return TRUE;<br />
}<br />
else<br />
return FALSE;<br />
but personally I just use
<br />
return (GetFileAttributes("c:\path\programname.exe") != -1);<br />
NB: in reference to the answer above the MSVC runtime function _stat() does a GetFileAttributes and a bunch of other stuff
|
|
|
|
|
use PathFileExists() API.
|
|
|
|
|
The simplest way to check if a file is exists is to open it with a call to CreateFile()
Waldermort
|
|
|
|
|