Pardon for my poor English and programming background.. My thead is long and not summarized, but easy to read and understand.
Can I make a XP-style button control using newly introduced CLASS support?
In reality, I want to make a waveform editor using graphic control.. But I think it's more easy to explain what I want, giving you a example of BUTTON control as a similar case.
Button control needs to include event methods to receive and process user inputs, like CLICK(), KeyPress(), MouseMove() and etc..
I think those event methods have to be contained in a CLASS code block, so those event methods should be made automatically per a instance when user declare a OBJ variable using a CLASS definition.
But to my knowledge, We use a default window callback function or user-defined WindowProc function to handle appropriate event.
The problem is Callback function is outside the CLASS block.
I can't contain event methods into a CLASS definition because..
1) a CLASS definition is a ideal print for instances. It's not a existing codes block, so I can't reference the address of method using CODEPTR.
2) CODEPTR does not support class method.
As a reference, I saw codes of chameleonButton control in visual basic 6.. There is 'UserControl' object and 'Public Event Click()'.. So programmer can make sub like 'Private Sub UserControl_Click()'..
Can I make such event methods using PowerBasic.. Or Are there any event class GUID in Windows responding form event?
Can I make a XP-style button control using newly introduced CLASS support?
In reality, I want to make a waveform editor using graphic control.. But I think it's more easy to explain what I want, giving you a example of BUTTON control as a similar case.
Button control needs to include event methods to receive and process user inputs, like CLICK(), KeyPress(), MouseMove() and etc..
I think those event methods have to be contained in a CLASS code block, so those event methods should be made automatically per a instance when user declare a OBJ variable using a CLASS definition.
But to my knowledge, We use a default window callback function or user-defined WindowProc function to handle appropriate event.
The problem is Callback function is outside the CLASS block.
I can't contain event methods into a CLASS definition because..
1) a CLASS definition is a ideal print for instances. It's not a existing codes block, so I can't reference the address of method using CODEPTR.
2) CODEPTR does not support class method.
As a reference, I saw codes of chameleonButton control in visual basic 6.. There is 'UserControl' object and 'Public Event Click()'.. So programmer can make sub like 'Private Sub UserControl_Click()'..
Can I make such event methods using PowerBasic.. Or Are there any event class GUID in Windows responding form event?
Comment