Sorry for the lack of activity lately, but I usually get wrapped up in convention and art projects just before summer starts until right about now. :)
I plan on getting back to my programming projects fairly soon, so hopefully I'll have something to show for it in the next few weeks.
DMcLgLCD: I need to finish implementing the Logitech features. Specifically, the features for keyboard removal and reattachment so that you can put your PC to sleep and the DLL will automagically start things back up when you wake it up.
Multi-Monitor Wallpaper Stitcher: This thing needs a new name. Anyway, I found a bug in the stitching if your number 2 monitor is to the left and below the number 1 monitor. I also need to tighten up the code for matching the picture size to the screen size. It still sometimes misses by a couple of pixels. After that, I'll start working on Version 2 that acts a little like Photoshop with layers and as many different pictures as you want.
Manga Reader: Need to get back to the conversion to .net project. I'm also thinking about releasing a US only version that regresses the Unicode features so that it doesn't rely so much on a whole bunch of DLL files. VB6 with Unicode is such a pain to work with.
Not a bug fix, per se, but a change in the way the dll handles the hBitmap passed to it. I had made the incorrect assumption that the host language would have a good way to deal with the .GetHbitmap method. Apparently, you need to define a Win32 DeleteObject command to remove the resources created with that function.
It's not too big a deal in the .net languages, but VB6 could get ugly. Instead, I'm now automatically deleting the object sent to the LcdUpdateBitmap function. The download is on the DMcLgLCD page and contains updated example code.
Thanks to TimoHollwedel, I've found a couple of bugs in the DMcLgLCD dll. The bugs have been removed and I went ahead and added in some new functions as well. All of the examples have been updated to reflect all of the changes.
Here's the quick lowdown on what's changed:
- Fixed a small memory leak.
- Added LcdReadSoftButtons. Stable way of polling the soft button status. Meant to replace the LcdSetButtonCallback function.
- Added LcdSetConfigCallback. Allows a headless app to have a config screen that can be called by Logitech's LCD Manager.
- Added LcdConnectEx. Necessary for reading the G-19 extended soft buttons. With LcdConnect, you can only read the direction keys as G-15 buttons.
- Updated examples. C# Example is now more graphical in nature, showing the button presses on the LCD screen itself.
Download available on the DMcLgLCD page.
There are some changes in the installed files, so I'd recommend uninstalling the previous version and reinstalling the new one. I've done testing on the installs, so hopefully there won't be any startup issues from unregistered OCX's or anything. Let me know if you run into issues.Manga Reader v1.4.4 x32.msi
Manga Reader v1.4.4 x64.msiFixes:
+Fixed: Issue with archives within archives. When the volume archive is opened, it is extracted to a temporary location. Once an archive chapter had been read, the temp file was deleted from the hard drive and could not be reopened until the volume had been reopened. Temp archives are no longer deleted in this situation and going back to chapters that had been previously read will now work as expected. Just to be clear, the original files were never in danger of being deleted.
+Fixed: Excess combo box changes removed.
+Fixed: Overflow error when window was farther right than ~32k units. This had been fixed before, but the fix had become undone at some point. Behaves properly now.
+Fixed: Significantly improved speed of drag and drop chapters when there were a lot of manga items in the manga selection box. This used to take several seconds, but now happens almost instantly.Features:
+Added: New Logitech dll wrapper of my own making. Supports color on Logitech G19 now.
+Added: F8 key creates a cover.jpg file for the manga from the current page. Used on G19 display.
There's now a page for the dll at the top. I've included example projects for VB6, VB.NET and VC# and released everything but the dll source code under the BSD license. This makes it free for both commercial and non-commercial use.G15, G19 and soft button support
all made it into the final project. There's a few more options I can add to the dll, but unless there's some sort of demand for it, I'm not sure I'll bother. If there are any questions, bugs, suggestions or needs not addressed by the dll, let me know in the new forums
I'm pretty close to being finished with my DMcLgLCD Logitech Keyboard wrapper. I've got the callback routines for the keyboard buttons working now. I originally just passed a function address along directly to Logitech's DLL, but it tended to crash if someone clicked the buttons too fast. I read up on threading and I now have a thread that can buffer the input a little so the Logitech callbacks aren't held up waiting. It works a lot better, but it still crashes if you really hammer the buttons and your callback takes too long to address them :). I'm going to leave it like that for now and write a warning in the documentation and samples. If I keep the routines simple, it doesn't get hung up.
At this point, I've pretty much finished all of the functionality and I just need to refine the functions a little. Currently, I have functions that pretty much mirror the original Logitech functions. I'll keep those intact, but also write some simpler functions that work for what 99% of people will want to use it for.
I've currently got a small skeleton app written, but I need to split it up into two or three different examples. Maybe an "easy" example using the new simplified functions and a more advanced example that uses the full wrapper. I'll also need something to show how to handle color VS black and white. After that, I'll try doing a quick C# example and if I can get that to work, a VB.NET example as well.
The DLL really started coming along last night. I got color working, got VB talking to the DLL by just passing a Picturebox.Image to it. I then went on to test using a graphics library in VB that returned an HBITMAP and proceeded to throw different types of images at the LCD. As a result, I got 1-Bit, 8-Bit, 24-Bit and 32-Bit images working both for the standard 160x43 screen as well as the 320x240 color screen.
I was pretty excited to have everything working on my dev machine, so I took the newly minted DLL and my updated Manga Reader downstairs to my gaming machine with the G19 keyboard... and it failed miserably. It would have helped if the error made any sense, but Manga Reader kept insisting that it couldn't find the DLL at all.
Quick lesson for all you Visual C++ newbies (like me): By default, VC++ requires that a runtime is installed. Not so bad for a standalone program, but fatal to a distributable DLL. After a whole lot of tail chasing, I finally came across the proper tidbit of information and set my project to compile the libraries statically. Viola! Working DLL.
I'll still need to test on XP as well as machines without a keyboard, but I should be able to get a new version of Manga Reader out fairly soon. As a bonus, it no longer registers itself to start up when Windows starts :) As for the DLL, I'll make a stab at creating a callback function for the soft buttons (I have no idea where to begin on this) and if I'm successful, I'll start writing a couple of sample apps and package it up. I'll definitely make a VB6 sample, but I'll also try to create VB.NET and C# samples as well.
It's been slow going, but I've been working on my own dll Wrapper the Logitech G15 and G19 keyboards. It should work with other languages, but I'm mostly targeting VB6 at the moment. So far, I've managed to wrangle up something that can display the contents of a picturebox to a Black and White display. It's been tough, but I did learn a lot more than I expected to while putting it together.
Next step is to try sending bitmaps in memory and seeing how well my code handles 8-bit, 24-bit and 32-bit images. I'll have to write some new code for 1-bit images, but it shouldn't be too hard. After that is color for the G19 (which should be easy) and then maybe soft button handling.
I'll make up a sample app and create a new page for it when it's ready to distribute. It was really frustrating just trying to find a good VB6 DLL that works only with the G15. I haven't seen anything for the G19.
So I had added support for Logitech gaming keyboards that include an LCD display, but I don't reboot my machines very often, so I didn't realize what Logitech's software does when you connect to it. In short, it adds an entry to the Logitech LCD Manager and helpfully starts the program every time you start Windows. Which can be rather confusing to the developer when he's searching through the registry and not finding any entries that would cause his program to run :-)
At any rate, the fix is to go into the Logitech LCD Manager, find the entry for Manga Reader, highlight it and untick the box that says "Automatically Start This Program" at the bottom. You can leave the two check boxes to the left and right of Manga reader checked as they won't have any effect on Windows start up.
I've been meaning to write my own C++ stub program for handling the Logitech keyboards (mostly for color support), so maybe this will be enough of an incentive to actually do it :-P
I made a compromise and took out the .NET version check for Multi-Monitor Wallpaper Stitcher. It will install just fine without any version of .NET installed, but you'll run into issues if you don't have version 4.0 or later. There's a link to the latest version of .NET on the MMWS page, but if you've got Windows 7, I believe it's installed by default.