03-22-2002, 03:24 PM
I'm writing an encrypted IM, & the code is coming along...Now I have to start thinking about the GUI..."thematically" I'd like it to be...ssspppooookkkyy....so, what can of worms might I have to open to make my controls rock! (graphically speaking) (you know, command buttons made of skulls, stuff like that...)
anyone have any ideas?
ps NOT command buttons made of real skulls of course!:)
03-22-2002, 03:43 PM
Well, the hard way would be to subclass every one of your
controls, intercepting their WM_PAINT, WM_NCPAINT,
BM_GETSTATE and a bunch more messages, then
use the GDI32 LineTo, PolylineTo or DrawEdge
as well as the TextOut API and CopyMemory to put the
whole thing in a nice little UDT.
If you got horribly, horribly lost somewhere in there, you can use
image controls for buttons. :) Just set the Picture property of the
Image control to the button picture you want. You could put all
the pictures you want into a resource file (.RES) and load them
from there. Then, in the mouse-down and mouse-up events,
switch the pictures accordingly.
03-22-2002, 03:45 PM
If you want to simulate a skull command button I would use an image control.
Just place an image control on your form, choose an image from the picture property, and add code.
Volteface beat me too it.
03-22-2002, 11:29 PM
thanks a lot...Will using these options slow my program down significantly? I ask because the encryption algorithms crunch fairly hard on their own & I don't want to bog them down (or at least keep it to a minimum.
03-23-2002, 02:16 AM
It will mean that more stuff has to be stored in memory, so if you are using lots of large images, yes it will slow it down a little. The difference should be pretty much negligable though if you choose your images carefully. Look here (http://www.visualbasicforum.com/showthread.php?threadid=12328) for an example using images...
03-23-2002, 05:34 AM
You'd be far better off if you created your own ActiveX button control or modified one of the many that can be found online. Using images for buttons is probably about the cheapest method of creating an interesting UI. Don't get me wrong, it works, although poorly, both in performance and looks.
03-23-2002, 12:13 PM
but, Exalted One...I've got to have those skulls, I'm "already in the Dark Lord's Domain " I can afford to be cheap this time around, but I do appreciate your concern & I really do agree with you.
On the other hand...Some programs have awesome custom UI's, (ie MetaCreations Poser) that make the otherwise fairly complex innerworkings almost intuitive....
On the 3rd hand...(or the vestigial bud from the first hand)...most awesome programs seem to have very standard interfaces that sort of "blend in" for ease of use...
if i'm going to go custom, ie, taking the above advice that i'm very grateful for, it's going to be on this project...it's destined for it.