![]() MessageBox_(hWnd, " Can't register main window class.", " ", #MB_ICONERROR) WindowClass.s = " WndClass1" Initialize Window Class If you want to use in GUI not only latin characters, compile it in Unicode! Warning: exe size - it's very, very small!ĭeclare.l WndProc(hWnd, Msg, wParam, lParam) declare Window events callback Global vars Way 1 - Standard cross-platform GUI library Backhanded way, depends on the quality of libraries. Using third-party GUI libraries based on 1, 2, 4 way or combining few ways.NET :) Prefered way for game and 3D graphics development. It's using 3D engine to draw game-like GUI and a bit like WPF in Microsoft. Using PB's standard cross-platform 3D GUI library.Combining PB's standard cross-platform GUI library and OS API if it needed.For example, WinAPI allows you to create extemelly small executables, sometimes gives access to special features OS. Using PB's standard cross-platform GUI library only.In PureBasic you can create GUI by 5 ways: It's very useful for "temporary" and "experimental" apps (see Why native & no 3rd-party? Why not. You can just write a code in editor from its first to last line, such as in many of script PLs. In PB you shouldn't implement a main class or an entry point a main() in C++. Also you can use "dirty tricks" such as to imitate OOP in your applications. ![]() In PB 5.20+ (23 July 2014) you can use Modules, like a Modules in VB 6.0 / VBA or static classes in C# / VB.NET. PB officially not fully supports object-oriented paradigm today. PB supports imperative and procedural paradigm. Ogre lib integrared into PureBasic.Īlso you can use a many of native OS API functions and interfaces, such as WinAPI on Windows and GDK/GTK on Linux. Ogre 3D engine (!) It allow you to work with 2D and 3D graphics.BMP, JPEG, JPEG2000, PNG, TGA, TIFF formats.PB's standard library including a many of functions with different "cross-platformity" level (see documentation).įor example, it contains functions for use: Msvcrt.dll pre-installed in Win 2000 and newer. PB compiler creating a light-weight (2 KB and more), fully native EXEs requiring only msvcrt.dll and WinAPI (DependencyWalker screen): PB compiler at first translates a PB code into FASM code and next compiles this code by FASM compiler which provides a great performance and inline FASM using possibility. PB compiling to platform-dependent binary format (EXE in Win) by platform-specified compiler version. PB designed for Windows, Linux, Mac OS and Amiga OS development. Also, Delphi has long been used as malware creating tool - now few antiviruses suspects of Delphi EXEs in malware. But they are paid (and very expensive) and creating quite large EXEs. You should learn and write a much more to obtain the same result.ĭelphi and C++ Builder aren't so hard. #include #include #include #include // #pragma comment(lib, "user32.lib") - for MessageBox, required if lib not added in the compiler options Tool for this should be quick, native and simply. And "temporary" soft writing for experiments with undocument libx, hacks, etc. ![]()
0 Comments
Leave a Reply. |