Exetools  

Go Back   Exetools > General > Source Code

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 01-16-2015, 14:20
atom0s's Avatar
atom0s atom0s is offline
Family
 
Join Date: Jan 2015
Location: 127.0.0.1
Posts: 396
Rept. Given: 26
Rept. Rcvd 126 Times in 63 Posts
Thanks Given: 54
Thanks Rcvd at 730 Times in 279 Posts
atom0s Reputation: 100-199 atom0s Reputation: 100-199
[C++] patchLib v3 (GDI GUI)

Please note: This project is old and this post is just copied from my original post I made when I released this. I do not give support for this anymore and I do not encourage people to use this code as it is fairly shit. However it is a decent reference for getting into GDI I think since there is a limited amount of info for some features I use in patchLib.

patchLibv3 is another full rewrite of the project. I decided to rewrite from scratch again to better make use of new things I've learned as well as better incorporate new features into the project. Updating v2 would have lead into major rewrites of almost every part of the project so starting over was the better option.

The main new feature of patchLib v3 is the support for standard Win32 controls.

patchLib v3 Change Log
Overall Project Changes
  • Change: patchLibv3 is fully rewritten from the ground up.
  • Change: CEngine has been renamed to CPatchLib and is now a singleton.
  • Removed: CBaseWindow is removed. (Condensed into CWindow.)
  • Removed: CFrame is removed. (Condensed into CPatchLib.)
  • Removed: CCommand and CCommandHandler are both removed. (Condensed into CWindow.)
  • Change: Usage of Visual Studio 2010.
  • Change: Usage of Boost template library.
  • Change: Usage of Lua scripting engine. (Optional; not included in first release.)
  • Fixed: Fixed .lib inclusion problems.
  • Added: Win32 Control drawing support.

Class-Specific Changes
  • Main Engine Changes (CPatchLib)
    • Change: Class friendship fully removed and no longer required.
    • Change: Mouse and Icon are now handled by CWindow.
    • Change: Misc functions are moved to separate header. (imghelper.h)
    • Added: Frame variables are now embedded into main engine class.
    • Added: Various property exposure for more customization.
  • CWindow Changes
    • Change: CBaseWindow is now embedded into CWindow.
    • Change: CWindow is now responible for cursor and icon.
    • Change: CWindow has inherited CCommand / CCommandHandler responsibilities.
    • Change: CWindow now has Draw( .. ) and Update( .. ) to handle all controls at once.
    • Change: Object containers are now contained in a single vector.
    • Added: Various property exposure for more customization.
  • CButton, CLabel, CScroller, CUrl Changes
    • Change: All controls now inherit CChild base class.
    • Change: CButton now handles position and sizing in a single rect.
    • Change: CLabel, CScroller, CUrl no longer create separate copies of the font object.
    • Added: CScroller now has more properties exposed for better control / customization.

patchLib v3 Credits and Thanks
patchLib Lead Developer
- atom0s

patchLib External Libraries
  • Boost Template Library [Boost]
  • alphablend.lib (bitRAKE, ufo-pu55y, HVC, atom0s)
  • pngLib (c) 2002 Thomas Bleeker [MadWizard.org]
  • tinyXML (c) 2000-2006 Lee Thomason [GrinningLizard.com]
  • uFMOD (c) 2005-2008 Asterix and Quantum [uFMOD.net]
  • Lua (c) 1994-2008 Lua.org, PUC-Rio [Lua.org]
  • Luabind (c) 2003 Daniel Wallin and Arvid Norberg [Luabind.com]

patchLib External Code Usage / Snippets
  • Wine Emulation Project [Winehq.org]
    • PremultipledAlpha() function snippet. (imghelper.h)
  • bobbysing
    • Framework design based on his DirectX Gui Library design.
  • ufo-pu55y
    • alphaBlend.lib - Majority of the code in this library is from him.
    • Parts of drawing code is based on some of his MASM source.
    • Graphics for the Patcher example are from his uPPP project.
  • HVC
    • Fixed up alphaBlend.lib to properly compile into a lib.
  • bitRAKE
    • Parts of alphaBlend.lib code (mainly MMX code) is by him.
  • Renkokuken / Sakuri
    • Window message override was developed for a project him and I worked on.
  • D.K. Wang
    • Article on CodeProject explaining how to use WM_PRINT to draw controls on layered windows.
    • Usage of Gdiplus for drawing the overall project.
  • Joe Woodbury
    • CodeProject article covering how to load images from resources into Gdiplus objects. (imghelper.h)


patchLib Suggestions, Bugfixes, Etc.
  • Stephenteh {RES}
    • Various suggestions for patchLib v2.

patchLib Support, Testing, Etc.
  • Absolution [GameDeception]
    • Hosted the previous patchLib site free of charge.
  • Team {RES} [Team {RES}]
    • Cracking team; home of a lot of talented people.
  • Team SnD [Team SnD]
    • Cracking team; home of a lot of talented people.
    • Home of ufo-pu55y; uPPP creator.

For the lack of caring, I didn't write documentation for this version. Things should be fairly straight forward on how to use the library. There are three example projects included in the release, and I will probably release some more later on including some custom controls and such. You can use the forums over at patchLib's site (or here) if you have any questions or issues.

Screenshots
Launcher Examples
http://i.imgur.com/xMmI5TK.png http://i.imgur.com/rz0pWrB.png

Patcher Examples
http://i.imgur.com/1ulYQFV.png http://i.imgur.com/tWJJ3u4.png

patchLib v3 Examples (Win32 Controls)
http://i.imgur.com/21zpxXy.png http://i.imgur.com/fSc8JJa.png

~ Enjoy.
Attached Files
File Type: 7z patchLibv3.1.7z (1.37 MB, 77 views)
Reply With Quote
The Following 5 Users Gave Reputation+1 to atom0s For This Useful Post:
bilbo (01-21-2015), mr.exodia (01-17-2015), p4r4d0x (01-21-2015), ReBirth (01-21-2015), zeuscane (01-17-2015)
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On



All times are GMT +8. The time now is 20:26.


Always Your Best Friend: Aaron, JMI, ahmadmansoor, ZeNiX, chessgod101
( 1998 - 2024 )