]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/progdlg.cpp
Preserve client data pointers when setting bitmaps in wxBitmapComboBox.
[wxWidgets.git] / src / msw / progdlg.cpp
index 09cba141b7bb22f23516435bc48c0c91019e3878..50c3f5b9741c88a869d2350c90c322ec8e70a64c 100644 (file)
@@ -170,7 +170,7 @@ BOOL CALLBACK DisplayCloseButton(HWND hwnd, LPARAM lParam)
     {
         sharedData->m_labelCancel = _("Close");
         SendMessage( hwnd, WM_SETTEXT, 0,
     {
         sharedData->m_labelCancel = _("Close");
         SendMessage( hwnd, WM_SETTEXT, 0,
-                     (LPARAM) sharedData->m_labelCancel.wx_str() );
+                     wxMSW_CONV_LPARAM(sharedData->m_labelCancel) );
 
         return FALSE;
     }
 
         return FALSE;
     }
@@ -212,7 +212,7 @@ void PerformNotificationUpdates(HWND hwnd,
     }
 
     if ( sharedData->m_notifications & wxSPDD_TITLE_CHANGED )
     }
 
     if ( sharedData->m_notifications & wxSPDD_TITLE_CHANGED )
-        ::SetWindowText( hwnd, sharedData->m_title.wx_str() );
+        ::SetWindowText( hwnd, sharedData->m_title.t_str() );
 
     if ( sharedData->m_notifications & wxSPDD_MESSAGE_CHANGED )
     {
 
     if ( sharedData->m_notifications & wxSPDD_MESSAGE_CHANGED )
     {
@@ -236,16 +236,21 @@ void PerformNotificationUpdates(HWND hwnd,
             body.assign(title, posNL + numNLs, wxString::npos);
             title.erase(posNL);
         }
             body.assign(title, posNL + numNLs, wxString::npos);
             title.erase(posNL);
         }
+        else // A single line
+        {
+            // Don't use title without the body, this doesn't make sense.
+            title.swap(body);
+        }
 
         ::SendMessage( hwnd,
                        TDM_SET_ELEMENT_TEXT,
                        TDE_MAIN_INSTRUCTION,
 
         ::SendMessage( hwnd,
                        TDM_SET_ELEMENT_TEXT,
                        TDE_MAIN_INSTRUCTION,
-                       (LPARAM) title.wx_str() );
+                       wxMSW_CONV_LPARAM(title) );
 
         ::SendMessage( hwnd,
                        TDM_SET_ELEMENT_TEXT,
                        TDE_CONTENT,
 
         ::SendMessage( hwnd,
                        TDM_SET_ELEMENT_TEXT,
                        TDE_CONTENT,
-                       (LPARAM) body.wx_str() );
+                       wxMSW_CONV_LPARAM(body) );
     }
 
     if ( sharedData->m_notifications & wxSPDD_EXPINFO_CHANGED )
     }
 
     if ( sharedData->m_notifications & wxSPDD_EXPINFO_CHANGED )
@@ -257,7 +262,7 @@ void PerformNotificationUpdates(HWND hwnd,
             ::SendMessage( hwnd,
                            TDM_SET_ELEMENT_TEXT,
                            TDE_EXPANDED_INFORMATION,
             ::SendMessage( hwnd,
                            TDM_SET_ELEMENT_TEXT,
                            TDE_EXPANDED_INFORMATION,
-                           (LPARAM) expandedInformation.wx_str() );
+                           wxMSW_CONV_LPARAM(expandedInformation) );
         }
     }
 
         }
     }
 
@@ -302,7 +307,7 @@ wxProgressDialog::wxProgressDialog( const wxString& title,
                                     int maximum,
                                     wxWindow *parent,
                                     int style )
                                     int maximum,
                                     wxWindow *parent,
                                     int style )
-    : wxGenericProgressDialog(parent, style),
+    : wxGenericProgressDialog(),
       m_taskDialogRunner(NULL),
       m_sharedData(NULL),
       m_message(message),
       m_taskDialogRunner(NULL),
       m_sharedData(NULL),
       m_message(message),
@@ -311,6 +316,8 @@ wxProgressDialog::wxProgressDialog( const wxString& title,
 #ifdef wxHAS_MSW_TASKDIALOG
     if ( HasNativeTaskDialog() )
     {
 #ifdef wxHAS_MSW_TASKDIALOG
     if ( HasNativeTaskDialog() )
     {
+        SetTopParent(parent);
+        SetPDStyle(style);
         SetMaximum(maximum);
 
         Show();
         SetMaximum(maximum);
 
         Show();
@@ -799,7 +806,7 @@ void* wxProgressDialogTaskRunner::Entry()
         if ( !m_sharedData.m_expandedInformation.empty() )
         {
             tdc.pszExpandedInformation =
         if ( !m_sharedData.m_expandedInformation.empty() )
         {
             tdc.pszExpandedInformation =
-                m_sharedData.m_expandedInformation.wx_str();
+                m_sharedData.m_expandedInformation.t_str();
         }
     }
 
         }
     }