PlanetSquires Forums

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: win32hello test project  (Read 295 times)

Paul Squires

  • Administrator
  • Guru Member
  • *****
  • Posts: 9313
  • Windows 10
    • PlanetSquires Software
win32hello test project
« on: June 03, 2020, 03:37:07 PM »

I have attached the simple win32 test project that I have been using to create my first C++ Windows based program. Of course, it was easy to download and run the C++ windows sample from the Microsoft site, but I wanted to start to integrate Jose's CWindow style of class in order to make the creation of windows a little bit easier.

My initial translation of Jose's CWindow class is included in the download. It is a stripped down version of the original because I only needed the basics.

« Last Edit: June 06, 2020, 05:42:24 PM by Paul Squires »
Logged
Paul Squires
PlanetSquires Software
WinFBE Editor and Visual Designer

Paul Squires

  • Administrator
  • Guru Member
  • *****
  • Posts: 9313
  • Windows 10
    • PlanetSquires Software
Re: win32hello test project
« Reply #1 on: June 05, 2020, 08:09:44 PM »

I have updated the attachment in the first post. The example program now separates out the main window and popup window into separate files.

main.cpp ---> the main entry point and contains wWinMain()
mainwindow.cpp ---> the main window for the program
popup.cpp ---> A simple popup dialog that is displayed modal.

I also did a few minor revisions to the CWindow.cpp class (assigning background brush in the register class was failing).

I also changed to use MESSAGE CRACKERS to handle incoming Window messages.

Download and use this open source program (been around since 2003 but recently updated):
https://github.com/hernandp/MessageCrackerWizard

It is a single exe that does not need to be installed. You use it to select the messages that you want for your window and then it automatically creates the functions and message cracker handlers for you (copies them to the clipboard). Greatly speeds up program development without having to remember the function prototypes for all of the cracked messages.

 
« Last Edit: June 05, 2020, 08:13:55 PM by Paul Squires »
Logged
Paul Squires
PlanetSquires Software
WinFBE Editor and Visual Designer

Paul Squires

  • Administrator
  • Guru Member
  • *****
  • Posts: 9313
  • Windows 10
    • PlanetSquires Software
Re: win32hello test project
« Reply #2 on: June 06, 2020, 05:43:11 PM »

Updated first post attachment. Ran the program under CLang and noticed a few warning messages. Those are now cleaned up.
Logged
Paul Squires
PlanetSquires Software
WinFBE Editor and Visual Designer