ObjReader Community

SDK programming => 64-bit SDK programming => Topic started by: Patrice Terrier on June 11, 2016, 06:50:16 pm

Title: MIDI Piano
Post by: Patrice Terrier on June 11, 2016, 06:50:16 pm
This is the C++ 64-bit version, of the 32-bit custom control "PBPiano" written in PowerBASIC by Borje Hagsten.

The original 32-bit source code can be found there. (https://forum.powerbasic.com/forum/user-to-user-discussions/source-code/749520-pbpiano-custom-control)

Screen shot of the 64-bit version

(http://www.objreader.com/download/demo/MIDIpiano.png)
It's a virtual midi keyboard custom control.


The attached project has been done using the free version of Visual Studio 2017 community

...

Title: MIDI Piano (skinned version)
Post by: Patrice Terrier on April 16, 2017, 05:52:47 pm
This is the skinned version, the main EXE size is only 36 Kb (almost 1/3 of the original PB's 32-bit version).

(http://www.objreader.com/download/images/MidiPianoWLFT.png)

If you want to disable the skin engine, just REM out the lines shown below in blue.

        if (skInitEngine (L"Reader.sks", L"")) {               // REM out these 2 lines if you want
            if (skSkinWindow(gP.hMain, (WCHAR*) SYSTOOLTIP)) { // to disable the WinLIFT skin engine.

                // Show the main window
                ShowWindow(gP.hMain, nCmdShow);
                UpdateWindow(gP.hMain);

                while (GetMessage(&msg, NULL, 0, 0)) {
                    TranslateMessage(&msg);
                    DispatchMessage(&msg);
                }
            }
        }
Title: Re: MIDI Piano
Post by: Patrice Terrier on April 18, 2017, 12:00:54 pm
Quote
I have your versions of MIDIpiano working on both WinDev 21 and Visual Studio 2017. They are an excellent tutorial between PB, C and P-Code.
Chris Maher

Chris,
You are right, the core API SDK syntax is the same on all of them, this is the only common denominator understood by all programming languages.
And that is the only way to { easily } switch between all of them.  8)