I switched back to Windows API progrmming

This forum is reserved for everything you want to talk about. It could be about programming, opinions, open source programs, development in general, or just cool stuff to share!
Post Reply
Ronald
I live to help wx-kind
I live to help wx-kind
Posts: 155
Joined: Mon Mar 05, 2018 4:17 am

I switched back to Windows API progrmming

Post by Ronald » Thu Oct 10, 2019 1:54 pm

  • WTL
    Not upgrading on the edge at all.
    CComModule is deprecated since ATL 7 (likely serveral years ago), but WTL10 (release on 2019.9.25) still uses it.
  • MFC
    Powerful enough, but not as cool as native API, so be candidate of native API
  • API
    Feel good after programming for 2 days, I don't worry about any hacks or tricks hidden.
    Free to design, either for architecture or native UI custom draw.
    Absolutely fast and small.
    The only thing I wondering now is if I'll need message map to route messages later, hope not.
    BTW, switch statement in WndProc is cool. 8)
  • Qt
    Much slower than each one above

Ronald
I live to help wx-kind
I live to help wx-kind
Posts: 155
Joined: Mon Mar 05, 2018 4:17 am

Re: I switched back to Windows API progrmming

Post by Ronald » Sat Oct 12, 2019 10:06 am

Tow notes when programming with Windows native API:
  • Naming
    When creating multiple windows of the same type,
    hwnd and its data binds, C interfaces are needed to access the data, the problem is the names easily becomes long with most part the same, e.g.

    Code: Select all

    GetMainWindowMyData1(hwnd)
    GetMainWindowMyData2(hwnd)
    GetMainWindowMyData3(hwnd)
    
    Compred to object oriented way:

    Code: Select all

    wnd.GetData1()
    wnd.GetData2()
    wnd.GetData3()
    
    OO wins.

    I switched to MFC because of this reason. I've also considered WTL, but when I find that it use a decrypted class CComModule, I hesitated.
  • About reusability
    Take house building for instance.
    For native API programming, giving the fundamental blocks, build the house from ground up, it's pure, needs full kinds of skills.
    For framework, giving an skeleton, complete the house, it's fast, industry quality. However you should endure the framework, like overhead/redundency/imperfection.

Ronald
I live to help wx-kind
I live to help wx-kind
Posts: 155
Joined: Mon Mar 05, 2018 4:17 am

Re: I switched back to Windows API progrmming

Post by Ronald » Mon Oct 14, 2019 7:26 am

Problem,
Hard to find a decent grid control,
Utimate Grid is native for MFC, though with a lot of features, obviously slower than wxGrid, and more buggy.
In fact, after developing with wxWidgets for several weeks, the experience is fine.
Just not enough interface ready for customizing, e.g. custom draw,
I'll check the source code to see if it is easy/efficient to be implented.

Post Reply