- changed name of package library to package.dll
[reactos.git] / rosapps / packmgr / gui / main.c
index d798828..a7d90ca 100644 (file)
@@ -40,6 +40,7 @@ int WINAPI WinMain (HINSTANCE hinst, HINSTANCE hPrevInstance, PSTR szCmdLine, in
        HWND       hwnd;
        MSG        msg;
        WNDCLASSEX wc = {0};
+       WCHAR errbuf[2000];
 
        // Window creation
        wc.cbSize        = sizeof(WNDCLASSEX); 
@@ -78,7 +79,7 @@ int WINAPI WinMain (HINSTANCE hinst, HINSTANCE hPrevInstance, PSTR szCmdLine, in
        
        if(error)
        {
-               MessageBox(0,PML_TransError(error),0,0);
+               MessageBox(0,PML_TransError(error, (WCHAR*)errbuf, sizeof(errbuf)/sizeof(WCHAR)),0,0);
                return 0;
        }
        
@@ -154,12 +155,13 @@ void InitControls (HWND hwnd)
 {
 
        HINSTANCE hinst = GetModuleHandle(NULL);
+       WCHAR errbuf[2000];
 
        // Create the controls
        hTree = CreateWindowEx(0, WC_TREEVIEW, L"TreeView", WS_CHILD|WS_VISIBLE|WS_BORDER|TVS_HASLINES|TVS_LINESATROOT|TVS_HASBUTTONS, 
                                                        0, 0, 0, 0, hwnd, NULL, hinst, NULL);
 
-       hEdit = CreateWindowEx(WS_EX_CLIENTEDGE, L"edit", PML_TransError(IDS_LOAD), WS_CHILD|WS_VISIBLE|ES_MULTILINE, 
+       hEdit = CreateWindowEx(WS_EX_CLIENTEDGE, L"edit", PML_TransError(IDS_LOAD, (WCHAR*)errbuf, sizeof(errbuf)/sizeof(WCHAR)), WS_CHILD|WS_VISIBLE|ES_MULTILINE, 
                                                        0, 0, 100, 100, hwnd, NULL, hinst, NULL);
        
        hPopup = LoadMenu(hinst, MAKEINTRESOURCE(IDR_POPUP));
@@ -388,6 +390,8 @@ LRESULT CALLBACK WndProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
 // Warning: This function is called from another thread
 int SetStatus (int status1, int status2, WCHAR* text)
 {
+       WCHAR errbuf[2000];
+
        // Set the Rage to 1000
        SendMessage(GetDlgItem(hStatus, IDC_STATUS1), PBM_SETRANGE32, 0, 1000);
        SendMessage(GetDlgItem(hStatus, IDC_STATUS2), PBM_SETRANGE32, 0, 1000);
@@ -406,7 +410,7 @@ int SetStatus (int status1, int status2, WCHAR* text)
        if(status1==1000)
        {
                EndDialog(hStatus, TRUE);
-               MessageBox(0,PML_TransError(status2),0,0);
+               MessageBox(0,PML_TransError(status2, (WCHAR*)errbuf, sizeof(errbuf)/sizeof(WCHAR)),0,0);
        }
 
        return 0;