Hi! I'm very confused here. I want to know "how to find right API for a specific task?" I mean API helps you a lot if you know the name of API such as if you wanna know more about "MessageBox" you look at Win32API and it will give you all info that you need. But what if you don't know what is the best/right API that you should use for the program. How do you guys find about API what you don't know before? Let's suppose you are working on a program and you would like to place a picture on the centre of the program. So what do you look for in win32API? I mean you can't type "How do I do this or that?" in the search box of Win32API. It'll only help you when you are looking for the API that you already know before. Any suggestion is WELCOME! thanks in advance, Musca
Posted on 2000-11-28 06:27:00 by Musca
if you want to deal with picture, you type BITMAP in your Win32api reference and it will propose you BITMAP function, so try to look there after that you should know that many API name do what there name do... i mean SendMessage, SelectObject...etc... and with some experience you're going to remember most used API
Posted on 2000-11-28 08:22:00 by (scalpp)
hte win32api help file, besides having an index, also has a find tab and a contents tab. Under contents, you can find a topic on bitmaps, which deals only with bitmaps, explains everything about them and gives you a list of relevant APIs. Otherwise, try the find feature.
Posted on 2000-11-28 22:52:00 by Hel
sorry for the double post.
Posted on 2000-11-28 22:53:00 by Hel
the win32api help file, besides having an index, also has a find tab and a contents tab. Under contents, you can find a topic on bitmaps, which deals only with bitmaps, explains everything about them and gives you a list of relevant APIs. Otherwise, try the find feature.
Posted on 2000-11-28 22:53:00 by Hel
Musca, I can sympathise with you. I've been there myself. I wish I had an eazy answer for you, but that would probably be "get an excyclopedia with every last one of the API functions in it, read it cover to cover, and remember everything inside it." Sure, easy to say, not so eazy to do. Actually, MS has the best reference around, MSDN. I really advise getting a cpoy on CD so you can acces it fast, don't use the net for this unless you have a blazingly fast (non-dial-up) net connection. Then, once you have ANY API function displayed, scroll to the bottom for 'related functions' or the other functions listed. Blundering around here for a while will give tyour intuition food to mull over. (Always feed your muse.) Additionally, you need to know HOW the API was meant to be used, for this you need examples. Iczelion has an excellent set. It always seemed to me he started from a classic work, "Programming Windows" by Petzold. GET THIS BOOK. While it is writtin in C, it provides a clear path to learning the fundamentals of how to get all the graphics on the screen. Adn since it's in C, it is easy to translate directly into asm. In fact, any book on windows in C is helpful. These are now rare, which is good and bad. Bad because they are hard to find, good because they are oft in discount areas (I bought my copy of Petzold for 3 bucks, and a Graphics in Win32 for 2 bucks). Mostly the titles will proudly proclaim "Learn this for the new Windows 95," this era C still held the market over C++. Once you start "getting" the API, more will come easier. E PS Hel, isn't that THREE posts? ;-)
Posted on 2000-11-29 03:53:00 by TTom
Thanks for your suggestion. I think, it'll come by experinece and I need to practise more and more. musca
Posted on 2000-11-29 06:47:00 by Musca
Musca, If anything comes back to you as useful, its learning your basic architecture. Windows is still a message driven windowing system and while many different models have been constructed using this, event driven architecture, OOP etc... they all depend on the basic architecture of the operating system. For each window there is a message handling procedure that processes the default messages for that window and the OS communicates between windows using messages. To do what you had in mind with placing an image depends on how you want to do it, you can create a static control in the right place with the SS_BITMAP style and load an image into it or you can BitBlt() the image directly onto the client area of the window from the WM_PAINT message in the windows message handling proc. For reference material, I would still recommend having win32.hlp as it has a very large range of data in it, even though it is now a little elderly. To get the most up to date information, TTom's suggestion of getting the MSDN CD set will do the job for you. MSDN is a lot more comprehensive but it also a lot harder to find your way around where win32.hlp is still a direct API reference for win 32. When you know your way around win32.hlp, you will be a long way towards what you are after. Regards, hutch@pbq.com.au
Posted on 2000-11-29 17:20:00 by hutch--