朋友的建议

I learned standard C++ one year ago. C++ is a good programming language for a beginner to learn. I want to become a WINDOWS programmer, so I began to learn WIN32 API two weeks ago. It is a very different language from C++, so I was quite uncomfortable with it. Because WIN32 API is encapsulated by Microsoft (although I dont like Microsoft, but I had to learn it for cash.), so many functions were strange to me. I memorized some function names, but then new problems came. What was the problem? Windows mechanism itself was the problem. It is very difficult for a newbie like me. I confused  some new keywords like HANDLE, CreateWindow(), and why must I fill RegisterClass() in every program? If I want to create Multi Window, should I write LRESULT CALLBACK WndProc() one more time in my program? All these problems were really difficult. But, now I feel better. I start understood how to do WIN32 SDK programming, and what WINDOWS Mechanism is. Thats all. I want to say thanks to Programming Windows (a book by author Charles Petzold), it taught me many things. I will stick to learning WINDOWS programming. If you like that, we can talk together. I welcome and appreciate any suggestions you may have.

                                                                                                                                    Shawn

I guess I fail to see the point of the post... but oh well. Anyway, personally, I don't care for using any API. I will use them as I need, but I prefer to stay as much within the language I am using as much as possible. The windows API really isn't that differant in its use than any C type function though, I dunno why it threw you off. The hard part is learning how the OS works and understanding the prerequisites that each function will have that the programer has to satisfy.

Also, if you don't like windows, then why do you want to become a windows programmer? Personally, I have worked on many programming projects and typically my role was to write the actual algorithms to be used, and then provide documentation on their use that the GUI guys then used and tied the gui to the functions that I wrote. These ranged from basic data handling and stoarge (mini proprietary filesystems) to algorithms like simulated annealing or ANT algorithms. I am sure that could find a similiar job if you made algorithms your focus. The windows API may be confusing at first, but there are many programmers out there who can use it, but much fewer out there who have truly mastered algorithm creation and optimization, especially in complex fields.

this is really the granularity trade-off. c++ programmers *think* that they need low level access to functions, but many of us dread working directly with the WinAPI due to the error-prone nature of the endeavor. MFC was intended to be a solution to this, but most of us dreaded using it because it was bloated. a better answer has been .NET, which has abstracted the mechanics of setting up a GUI into a nicer API... you can still dig into the details should the need arise, but you don't have to re-invent the wheel each time you start an application.

Krellor

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值