READ ALL**** This is a COMPLETE tutorial on api concerning actual windows. FINDWINDOW(), FINDWINDOWEX(), GETPARENT(), GETWINDOWTEXT(), SETWINDOWTEXT(),SENDMESSAGE(), WindowFromPoint(),WM_ constants, EM_ constants. All separate tutorials for advanced programmers, and also go in order for new api programmers. I cover pointers, buffers, basic api, window api, cover it deeply and completely, and include sample code and examples. You need to see if you have a pretty good or no grasp of window api. Learn how to make an API spy from this as well. You will be extremely pleased. Uses notepad for all examples. Also teaches parent/child hwnd types, explains hwnd, does everything! Please download and vote :-) KEYWORDS: Jaime Muscatelli
Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. Afterdownloading it, you will need a program like Winzip to decompress it.Virus note:All files are scanned once-a-day by Planet Source Code for viruses, but new viruses come
out every day, so no prevention program can catch 100% of them. For your own safety, please:
Re-scan downloaded files using your personal virus checker before using it.
NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.
Scan the source code with Minnow's Project Scanner
If you don't have a virus scanner, you can get one at many places on the net
including:McAfee.com
Terms of Agreement:
By using this article, you agree to the following terms...
You may use
this article in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
You MAY NOT redistribute this article (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.
You may link to this article from another website, but ONLY if it is not wrapped in a frame.
You will abide by any additional copyright restrictions which the author may have placed in the article or article's description.
Nice and concise. A great refresher for those of us who have been using VB for a while. (If this comment was disrespectful, please report it.)
1/6/2003 3:24:17 PM:
Great work! I was pulling my hair out not understanding the handle relationship and now it's VERY clear. Thanks. (If this comment was disrespectful, please report it.)
Is there anywhere (other than the VB API viewer) that we could find a full list of SENDMESSAGE constants? (If this comment was disrespectful, please report it.)
Very nice! It's rare to come across such a detailed explanation of code with lots of comments etc. You get 5 globes from me, keep up the good work! ;) (If this comment was disrespectful, please report it.)
1/31/2003 4:55:23 PM:
keep up the good work! (If this comment was disrespectful, please report it.)
2/4/2003 1:54:19 PM:
umm i was wonding how to select mutilpal EDIT boxes (If this comment was disrespectful, please report it.)
Hi, thanks for the great comments. As for the "multiple textboxes", I have placed a new tutorial on PSC for that. It is called A Supreme Window API Tutorial Part 2. Check it out and vote! (If this comment was disrespectful, please report it.)
3/1/2003 11:37:38 PM:
Excellent code man! If you have anymore tutorials could you post them here or email them to me? Thanks! Once again, GREAT JOB! (If this comment was disrespectful, please report it.)
3/4/2003 9:24:29 AM:
i'm looking article how to make operating system (If this comment was disrespectful, please report it.)
Great article. It was a big help with some questions I was having. Thanks for putting up the tutorial, five globes from me. (If this comment was disrespectful, please report it.)
3/10/2003 6:48:50 PM:
Very helpful. It helped me get a Handle on VB (pun intended). Thank you. (If this comment was disrespectful, please report it.)
Wel done, its a brilliant tutorial, i got it first time i read it thanx (If this comment was disrespectful, please report it.)
1/18/2004 1:45:43 PM:
I am trying to use this technique for paltalk, although it has 3 RichEdit20A windows, and it doesnt work, could anyone direct me around this: djwhiteknight@hotmail.com I'm also on MSN with that email if u wana contact me (If this comment was disrespectful, please report it.)
Why include anything called "fake virus"... sad, but you lost my vote for that. Good luck, Kevin (If this comment was disrespectful, please report it.)
Thanks Man! This helped me a lot! Now these things are very clear for me!! Hey!! can you send more C++ tutorials?? (If this comment was disrespectful, please report it.)
Hey could you write a tutorial about remote access of computers, I mean not without using Winsock. There has gotta be another way on how to do this. Thanks!
(If this comment was disrespectful, please report it.)
How can I use sendmessage to click a command button using it's hwnd? I tried sending the mousedown then up events but that didnt work (please respond via email) (If this comment was disrespectful, please report it.)
11/7/2004 7:03:15 PM:
nice work. creates a good foundation for someone new to the api (If this comment was disrespectful, please report it.)
just a small note, you never mention that you need to declare the functions, it may be obvious to most people but it had me a little confused as to wether or not i needed to... (If this comment was disrespectful, please report it.)
Kinda a late comment, but the second hwnd parameter in FindWindowEx is used when you have to find another control of the same type in a window without being able to use the caption. You just use the hwnd of the control you got in the previous search and it'll find the next one, if there is one.
Like: lHwnd = FindWindow("#32770", vbNullString) '#32770 is usually a system message box or a Save As prompt lRet = FindWindowEx(lHwnd, 0&, "Static", vbNullString) lRet = FindWindowEx(lHwnd, lRet, "Static", vbNullString)
Don't know how often you'd use that, but that's what I found it was for. (If this comment was disrespectful, please report it.)
HI all i am trying to send to an api using an example that i found in a website but i could not change it to my own api from notpad.
I used window grabber to get the class name :
CODE RichEdit20A #32770 AtlAxWin71 ATL:0053D798 WTL_Splitter Window WTL_SplitterWindow WTL_SplitterWindow My Window Class
I be happy if u based on classe name above tell me what changes should i make to send text to my api instead of sending text to notepad. I assume my api textbox is already open. I tried to replaces the class name but i could not send text to my api!
(If this comment was disrespectful, please report it.)
7/30/2006 1:13:06 AM:
trying to use this to get the data in a treeeview, but the data isnt a caption so no help there.. any one know? (If this comment was disrespectful, please report it.)
3/3/2007 4:39:13 AM:
very nice coding 5 gloves (If this comment was disrespectful, please report it.)
To be honest. it was an okay tutorial. I wouldn't say it was amazing. You kind of insult People who are new to the API programming world. I personally would have re-written it but I just don't have the time.
Just note that you misspelled "Window" a few times and I don't know why you continuously wrote everything in uppercase. To a newbie I believe that would be difficult for them to understand. I would say 2.5 out of 5 for me Sorry mate. (If this comment was disrespectful, please report it.)
Add Your Feedback
Your feedback will be posted below and an email sent to
the author. Please remember that the author was kind enough to
share this with you, so any criticisms must be stated politely, or they
will be deleted. (For feedback not related to this particular article, please
click here instead.)