allocate size for the extra controls in the file dialog (#9679)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58270 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -605,14 +605,25 @@ private:
|
||||
class GlobalPtr
|
||||
{
|
||||
public:
|
||||
// default ctor, call Init() later
|
||||
GlobalPtr()
|
||||
{
|
||||
m_hGlobal = NULL;
|
||||
}
|
||||
|
||||
// allocates a block of given size
|
||||
GlobalPtr(size_t size, unsigned flags = GMEM_MOVEABLE)
|
||||
void Init(size_t size, unsigned flags = GMEM_MOVEABLE)
|
||||
{
|
||||
m_hGlobal = ::GlobalAlloc(flags, size);
|
||||
if ( !m_hGlobal )
|
||||
wxLogLastError(_T("GlobalAlloc"));
|
||||
}
|
||||
|
||||
GlobalPtr(size_t size, unsigned flags = GMEM_MOVEABLE)
|
||||
{
|
||||
Init(size, flags);
|
||||
}
|
||||
|
||||
~GlobalPtr()
|
||||
{
|
||||
if ( m_hGlobal && ::GlobalFree(m_hGlobal) )
|
||||
|
Reference in New Issue
Block a user