00001 00009 /* 00010 * CC PDF Converter: Windows PDF Printer with Creative Commons license support 00011 * Excel to PDF Converter: Excel PDF printing addin, keeping hyperlinks AND Creative Commons license support 00012 * Copyright (C) 2007-2010 Guy Hachlili <[email protected]>, Cogniview LTD. 00013 * 00014 * This file is part of CC PDF Converter / Excel to PDF Converter 00015 * 00016 * CC PDF Converter and Excel to PDF Converter are free software; 00017 * you can redistribute them and/or modify them under the terms of the 00018 * GNU General Public License as published by the Free Software Foundation; 00019 * either version 2 of the License, or (at your option) any later version. 00020 * 00021 * CC PDF Converter and Excel to PDF Converter are is distributed in the hope 00022 * that they will be useful, but WITHOUT ANY WARRANTY; without even the implied 00023 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00024 * GNU General Public License for more details. 00025 * 00026 * You should have received a copy of the GNU General Public License 00027 * along with this program. If not, see <http://www.gnu.org/licenses/>. * 00028 */ 00029 00030 #include "precomp.h" 00031 #include "globals.h" 00032 #include "debug.h" 00033 00035 #define MAX_STR 10000 00036 00037 00039 // Globals 00041 00043 HINSTANCE ghInstance = NULL; 00044 00049 std::tstring LoadResourceString(UINT uID) 00050 { 00051 // Make enough space 00052 TCHAR cStr[MAX_STR]; 00053 DWORD dwSize = MAX_STR; 00054 // Load the string 00055 if (LoadString((HMODULE)ghInstance, uID, cStr, dwSize) == 0) 00056 { 00057 // Failed! 00058 ASSERTMSG(FALSE, "Resource string not found"); 00059 return _T(""); 00060 } 00061 return cStr; 00062 }