Hi Guys,
According the SDK different instances of the same application can share a registered class, however they should not register a class that has already been registered bye a previous instance.
I tested this with 30 instances without checking and runs fine, but just to be sure I made this:
FUNCTION AvClassExist(ClsName As String) As LONG
LOCAL TmpWc as WNDCLASSEx
FUNCTION = GetClassInfoEx(hInstance, ByVal STRPTR(ClsName), TmpWc)
END FUNCTION
IF ISFALSE AvClassExist ("MyClass") THEN create it!
Question is, is this needed how should we reed SHOULD NOT?
Whitout the check it runs fine , but then windows register 30 classes ?,
would be stuppid if you ask me, so I really think they have something like above already running ?
According the SDK different instances of the same application can share a registered class, however they should not register a class that has already been registered bye a previous instance.
I tested this with 30 instances without checking and runs fine, but just to be sure I made this:
FUNCTION AvClassExist(ClsName As String) As LONG
LOCAL TmpWc as WNDCLASSEx
FUNCTION = GetClassInfoEx(hInstance, ByVal STRPTR(ClsName), TmpWc)
END FUNCTION
IF ISFALSE AvClassExist ("MyClass") THEN create it!
Question is, is this needed how should we reed SHOULD NOT?
Whitout the check it runs fine , but then windows register 30 classes ?,
would be stuppid if you ask me, so I really think they have something like above already running ?
Comment