Ardhi's Blog
Sebuah catatan kecil dari buah pikiran, pengalaman dan aktivitasku …

January 29, 2007

API Programming Lesson 1

Filed under: IT, Activity

I’ve begun to study the API Functions of VB6 alongside VB2005 Coding (OMG, it’s gonna be tough :o ).

Notes from Lesson 1:

  • These are the basic functions of API : FindWindow, FindWindowEx, GetCursorPos, WindowFromPoint, GetClassName, GetWindowText, and SetWindowText (SendMessage could be the basic function too, but i have not studied about it. I’ll write about it in lesson 2 :) )
  • These are the basic functions which need buffer for storing the return value : GetClassName and GetWindowText (Does it mean that all API functions began with ‘get’ always need buffer ? I’ll find the answer :) )
  • FindWindow, FindWindowEx and WindowFromPoint will return the handlewindow (hWnd) of a window. If you know the class name, use FindWindow/FindWindowEx. If you don’t know the class name, use WindowFromPoint instead.
  • FindWindow could be used to determined if a window was a parent or a child window. Just use it with a class name (class got by windowfrompoint function). If the return value is 0 then it’s a child window and vice versa.
  • If you want to edit a window text with SetWindowText function individually, use hWnd generated by WindowFromPoint. If you want to set window text globally, use hwnd genereted by FindWindow-GetClassName instead (Still confusing me).

 

I think it’s enough for today :)  

Comments »

The URI to TrackBack this entry is: http://ardhi108.blogsome.com/2007/01/29/api-programming-lesson-1/trackback/

No comments yet.

RSS feed for comments on this post.

Leave a comment

Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>



Layout Title: Goodbye Summer
Compatible Browser(s): Mozilla Firefox
Compatible Screen Resolution: 1280px by 800px
Number of Visits: (Put your counter here!)