|
I have been reading and analyzing various progs dealing with DLL's, looking up things in manuals until I understand what is happening. I have encountered the term WINAPI in one prog that used explicit linking to the DLL. There are references in MSDN, but no explanation. (Just its appearance in code snips.) For example, what does WINAPI do in the following:
typedef INT (WINAPI * lp_ptRegisterCallback)(INT callbackID, ProcAddr CBackProc);
|
|
|
|
|
WINAPI is defined as __stdcall (a calling convention). Basically it tells the compiler what sort of function it is, in particular about the arguments passed into a function and who is responsible for cleaning the stack (the function or the caller). Try searching for terms such as "calling conventions" to get a better idea.
|
|
|
|
|
Oliver123 wrote: I have been reading and analyzing various progs dealing with DLL's, looking up things in manuals until I understand what is happening. I have encountered the term WINAPI in one prog that used explicit linking to the DLL. There are references in MSDN, but no explanation. (Just its appearance in code snips.) For example, what does WINAPI do in the following:
WINAPI expands to __stdcall.
It's a windows calling convention which means the the callee is responsible for clearing the arguments passed to it from the stack.
For more information read this[^] article by Nemanja.
|
|
|
|
|
I'm curious why you did not just put the cursor somewhere on WINAPI and press the F12 key. You would have been taken to windef.h where you would have seen that WINAPI resolves to __stdcall . Searching for __stdcall would have produced a lot more.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
The answer is simple. I didn't know about that F12 trick. VC++ contains quite a lot I haven't yet experienced. Thanks for the tip. I suspect it will get lots of use.
|
|
|
|
|
It's good to learn at least one new thing per day. Go forth and learn!
BTW, click Help --> Keyboard Map for other goodies.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
|
Is there any control in Visual C++/C#.Net that offers an oppertunity to display some data from a database to the GUI in a table/scheme like form?
I have tried to use DataGrid/DataGridView and I can't get the functionality I need from it.
I'm using it for a calendar like program that shows every day horisontally.
Otherwise, is there an easy way to display what I need?
I hope that someone can help me with this.
Thanks and regards in advance.
- Jones M
|
|
|
|
|
jones_m wrote: Is there any control in Visual C++/
There is one control called CListCtrl , don't know if that is what you want, there is another one called MSFlexGrid ActiveX Control .
|
|
|
|
|
a way you can use CListCtrl with LVS_REPORT.
|
|
|
|
|
Thank you very much both. I'll take a look at it.
Is it a Managed C++ control (.Net) or just C++?
Is it possible that any of you can give me an example on how you would make something like a table/scheme with that control with some code?
Thanks & regards in advance!
- Jones M
|
|
|
|
|
|
|
Did you find your answer?
|
|
|
|
|
Thank you very much for asking WhiteSky
The reason why I haven't written anything on it yet is that I haven't got the time for trying to use it just now, but I will try it in a couple of days and write back.
Thanks once again!
- Jones M
|
|
|
|
|
Hi guys... i'm doing a nice application that uses iwebbrowser2 class.
This application navigate through some webpages.
But even if the IE istance is hidden, the click sound that IE runs when navigates to a new page is still there!
So my question:
there is some way to make IE not play that click-sound or any sound??? Obviosly doing it through coding...and not deleting "start.wav".
Thanx
Regards
|
|
|
|
|
I can't think of anything else other than changing the system's sound scheme.
|
|
|
|
|
I was always under the impression that const before or after a function delaration was the same, yet after trying it I get compile errors, so obviously I was wrong. Would somebody please explain the difference between these two declarations:
const TCHAR *GetCurrentHash ();
TCHAR *GetCurrentHash () const;
|
|
|
|
|
"const" after a member function name means the function doesn't change any of the object's internal member variables.
"const" before the function name applies to the return value.
|
|
|
|
|
Ahhh, that makes perfect sense now. Thankyou.
|
|
|
|
|
waldermort wrote: TCHAR *GetCurrentHash () const;
but you can change any function local variable here!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief And you
|
|
|
|
|
Greetings:
I need to launch a CFileDialog box but I need to implement special file name filtering. That is, I might filter with a file name extension like "TXT", however, I need to filter even further by excluding files that have certain sub-strings embedded in their names. The wild card method is not going to work here because I need to exclude file names that have certain characteristics, not include them. This requirement has been thrust upon me and I simply have to find a solution.
I can't see anything in the documentation that says you can do this.
Any suggestions?
Thank you,
Mark
|
|
|
|
|
Jethro63 wrote: This requirement...
Does it also include using CFileDialog ?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hi David:
No, not necessarily. I am becoming resigned to the possibility that I'll just have to construct my own selection dialog. No big deal, just another little thing on the great-big pile.
But I was expecting (or hoping) that under the hood of CFileDialog, there might be a mechanism, an optional callback function perhaps, where each time the dialog was about to add another entry to the list box embedded in the dialog, the callback would first be called and you could use this callback to do any manner of screening that you need and say "yes" or "no" to adding the file. No such luck, apparently.
So, I'm open to suggestions but I need to get this done. It is a minor requirement in the grand scheme of things but I have already spent a lot of time trying to come up with a solution.
Thanks,
Mark
|
|
|
|
|
Look up CDN_INCLUDEITEM in MSDN.
You may be right I may be crazy -- Billy Joel --
Within you lies the power for good, use it!!!
|
|
|
|