Refactor code finding the name of the windows class to use in wxMSW
Determine which class name to use in MSWCreate() caller instead of doing it partly there and partly in MSWCreate() itself, which used to add the "NR" suffix if necessary -- now it doesn't do this any more and just really created the window using the given class. No real changes, just prepare for future enhancements.
This commit is contained in:
@@ -53,6 +53,16 @@ public:
|
||||
// variant registered without CS_[HV]REDRAW styles
|
||||
static const wxChar *GetNoRedrawClassSuffix() { return wxT("NR"); }
|
||||
|
||||
// Flags for GetRegisteredClassName()
|
||||
enum
|
||||
{
|
||||
// Just a symbolic name indicating absence of any special flags.
|
||||
RegClass_Default = 0,
|
||||
|
||||
// Return the name with the GetNoRedrawClassSuffix() appended to it.
|
||||
RegClass_ReturnNR = 1
|
||||
};
|
||||
|
||||
// get the name of the registered Win32 class with the given (unique) base
|
||||
// name: this function constructs the unique class name using this name as
|
||||
// prefix, checks if the class is already registered and registers it if it
|
||||
@@ -68,7 +78,8 @@ public:
|
||||
// or (default) -1 meaning that the class paints its background itself
|
||||
static const wxChar *GetRegisteredClassName(const wxChar *name,
|
||||
int bgBrushCol = -1,
|
||||
int extraStyles = 0);
|
||||
int extraStyles = 0,
|
||||
int flags = RegClass_Default);
|
||||
|
||||
// return true if this name corresponds to one of the classes we registered
|
||||
// in the previous GetRegisteredClassName() calls
|
||||
|
Reference in New Issue
Block a user