I don't care how just get it done so i can use it!Inf0Byt3 wrote:Thanks.
Remember we wanted to build something like this some time ago? Let's improve this one, add new gadgets, etc. What do you say?
InfoSkin1.0 - OpenSource Theme Engine for PB4
@InfoByte: I can see what I do, in my first snippets, I hacked up the window buttons (their size, position, etc.).. So, if you want to make your engine better, don't make your own custom OpenWindow() function, you should create a function like: "EnableInfoSkin(hWnd)" that way more and more people would use the product and even buy if you make it commercial, but I see you want to keep it for free, so it's up to you what you will make.
Also, we code in whole different ways, your code looks easy-to-understand and optimized, but mine looks dirty and really(x10)-hard-to-understand. So, we can't work together, as good + evil = chaos.. (And I'm the evil
)
Also, we code in whole different ways, your code looks easy-to-understand and optimized, but mine looks dirty and really(x10)-hard-to-understand. So, we can't work together, as good + evil = chaos.. (And I'm the evil
Agree. But your code is betterAlso, we code in whole different ways
Come on.. Be serious. You code like a real programmer. All I do is simplify things until the program does not work anymoreyour code looks easy-to-understand and optimized, but mine looks dirty
About the EnableInfoSkin(hWnd) - style, how to achieve this? Create something like a hook for the window? That's too hard for me, I guess.
A question: How can I create an owner draw progressbar? I have 2 pictures, the border for the pr-bar and the State image? Any ideas?
None are more hopelessly enslaved than those who falsely believe they are free. (Goethe)
Well, sure I'm a professional programmer, as I was a former VB user so I am very (and very means VERY) experienced in API programming.
About the owner drawn progressbar, well you could use something similar to this:
It propably doesn't work as I typed from my mind... I am now at a friend..
EDIT: Forgot to tell about the EnableInfoSkin(hWnd) procedure. Well, that procedure internally sets the windowcallback of the specified hWnd to InfoSkinCallback(hWnd, Msg, wParam, lParam)
You enumerate all child windows of the hWnd window and get each child window's classname. After that you check the classname if it's valid (Button, ComboBox32, etc..), then you REAL skin the gadget.
It isn't hard to make, but requires a high knowledge of the Win API. So if I were you, I wouldn't start with such a big project, but I know this means a lot to you. And real skinning the gadget isn't hard, but requires more than 1 or 2 routines (structures/interfaces).
I hope you know now how to make things. But I am busy now, so I can't help you much.
About the owner drawn progressbar, well you could use something similar to this:
Code: Select all
StartDrawing(WindowOutput())
LoadImage(#ProgressBar_Background, "MyImage.gif")
LoadImage(#ProgressBar_State, "MyImage_2.gif")
DrawImage(ImageID(#ProgressBar_Background), UserX, UserY)
For i=1 To UserState
DrawImage(ImageID(#ProgressBar_State), UserX+i, UserY+1)
Next
StopDrawing()EDIT: Forgot to tell about the EnableInfoSkin(hWnd) procedure. Well, that procedure internally sets the windowcallback of the specified hWnd to InfoSkinCallback(hWnd, Msg, wParam, lParam)
You enumerate all child windows of the hWnd window and get each child window's classname. After that you check the classname if it's valid (Button, ComboBox32, etc..), then you REAL skin the gadget.
It isn't hard to make, but requires a high knowledge of the Win API. So if I were you, I wouldn't start with such a big project, but I know this means a lot to you. And real skinning the gadget isn't hard, but requires more than 1 or 2 routines (structures/interfaces).
I hope you know now how to make things. But I am busy now, so I can't help you much.
Got it. Thank you. One more thing I don't know. What do you mean by REAL skinning of the button? If you can, when you are free, can you show me a small example of how to subclass a single normal gadget to change the way it looks? If I have an example, it's easy to implement the rest, I just need a quickstart. I simply cannot find a logical explanation of how to change the content of a control with a bitmap.
None are more hopelessly enslaved than those who falsely believe they are free. (Goethe)
Never use getasynckeystate_(#VK_LBUTTON)
Instead, you must catch the messages #WM_LBUTTONDOWN and #WM_LBUTTONUP !.
You CAN catch those without using a callback, but you should use one already for secure messaging.
And if you really want to use GetAsyncKeyState(); Then you'll need to do a test to see if your window has focus first, because it will fire/trigger whenever you click your LMB anywhere at your system.
This is an overhead of 2 api calls vs catching a message. It's your call though, I'd go with the callback for some comfy messaging. But you could always call GetKeyState()...
Instead, you must catch the messages #WM_LBUTTONDOWN and #WM_LBUTTONUP !.
You CAN catch those without using a callback, but you should use one already for secure messaging.
And if you really want to use GetAsyncKeyState(); Then you'll need to do a test to see if your window has focus first, because it will fire/trigger whenever you click your LMB anywhere at your system.
This is an overhead of 2 api calls vs catching a message. It's your call though, I'd go with the callback for some comfy messaging. But you could always call GetKeyState()...


