CodeVis - Art and Vision in Software


PROJECTS DOWNLOADS PRODUCTS INFORMATION


Status: Update

VidCapture - Image Capture Library for Web Cameras

For full source code for an image capture library for web cameras, check out VidCapture. I've updated it and included a WINAPI / C-style .DLL as well as the static library and source code now with version 0.2.

Mike's Hacks and Scraps

Solving problems is what programming is all about. Unfortunately, we tend to waste a lot of time solving the same problems again and again.

I'll post my solutions (and other's solutions that I've come across and liked) to annoying problems I expect other programmers encounter pretty often. If I didn't come up with the solution on my own, I'll also post as much information about where it came from and who figured it out as I can. I've got a lot of stuff I want to post, it's just going to take some time to get it organized.

This archive is going to be Windows/C++-centric at first - that's where I do most of my hacking. However, I'd love submissions for any platform or language, and as I move into other realms I'll expand the content. If you'd like to submit an entry, email it to me. Likewise, if you have an annoying problem that you expect people have solved, but you don't know the answer - feel free to email me. If I know it, I'll try to post the answer w/code. If not, it's probably worth just posting as a question until someone does answer it.


Owner Drawn Menus

Owner drawn menus are great. You can set the fonts, change the colors, draw pretty pictures on them, make them as big or as small as you want - just about anything except for get rid of that bloody triangle if you create a submenu.

Who knows why that's not overrideable? I had spent a few hours scratching my head and trying to find some obscure WM_* message for drawing it when I came across this post on USENET by Jim Barry.

Jim's hack is to call ExcludeClipRect with the rectangle and HDC given from the DRAWITEMSTRUCT structure passed to WM_DRAWITEM. It works beautifully.

Thank you Jim! My menus will be much prettier in the future.
^Top


^Top


Questions? Comments? Suggestions?
Email them to codevis@codevis.com or check out our public forums.
Copyright © 2003-2004 by Michael Ellison. All Rights Reserved.