Unicode fixes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@6916 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1035,183 +1035,183 @@ void wxDB::logError(const char *errMsg, const char *SQLState)
|
|||||||
/**********wxDB::TranslateSqlState() **********/
|
/**********wxDB::TranslateSqlState() **********/
|
||||||
int wxDB::TranslateSqlState(const char *SQLState)
|
int wxDB::TranslateSqlState(const char *SQLState)
|
||||||
{
|
{
|
||||||
if (!wxStrcmp(SQLState, "01000"))
|
if (!wxStrcmp(SQLState, wxT("01000")))
|
||||||
return(DB_ERR_GENERAL_WARNING);
|
return(DB_ERR_GENERAL_WARNING);
|
||||||
if (!wxStrcmp(SQLState, "01002"))
|
if (!wxStrcmp(SQLState, wxT("01002")))
|
||||||
return(DB_ERR_DISCONNECT_ERROR);
|
return(DB_ERR_DISCONNECT_ERROR);
|
||||||
if (!wxStrcmp(SQLState, "01004"))
|
if (!wxStrcmp(SQLState, wxT("01004")))
|
||||||
return(DB_ERR_DATA_TRUNCATED);
|
return(DB_ERR_DATA_TRUNCATED);
|
||||||
if (!wxStrcmp(SQLState, "01006"))
|
if (!wxStrcmp(SQLState, wxT("01006")))
|
||||||
return(DB_ERR_PRIV_NOT_REVOKED);
|
return(DB_ERR_PRIV_NOT_REVOKED);
|
||||||
if (!wxStrcmp(SQLState, "01S00"))
|
if (!wxStrcmp(SQLState, wxT("01S00")))
|
||||||
return(DB_ERR_INVALID_CONN_STR_ATTR);
|
return(DB_ERR_INVALID_CONN_STR_ATTR);
|
||||||
if (!wxStrcmp(SQLState, "01S01"))
|
if (!wxStrcmp(SQLState, wxT("01S01")))
|
||||||
return(DB_ERR_ERROR_IN_ROW);
|
return(DB_ERR_ERROR_IN_ROW);
|
||||||
if (!wxStrcmp(SQLState, "01S02"))
|
if (!wxStrcmp(SQLState, wxT("01S02")))
|
||||||
return(DB_ERR_OPTION_VALUE_CHANGED);
|
return(DB_ERR_OPTION_VALUE_CHANGED);
|
||||||
if (!wxStrcmp(SQLState, "01S03"))
|
if (!wxStrcmp(SQLState, wxT("01S03")))
|
||||||
return(DB_ERR_NO_ROWS_UPD_OR_DEL);
|
return(DB_ERR_NO_ROWS_UPD_OR_DEL);
|
||||||
if (!wxStrcmp(SQLState, "01S04"))
|
if (!wxStrcmp(SQLState, wxT("01S04")))
|
||||||
return(DB_ERR_MULTI_ROWS_UPD_OR_DEL);
|
return(DB_ERR_MULTI_ROWS_UPD_OR_DEL);
|
||||||
if (!wxStrcmp(SQLState, "07001"))
|
if (!wxStrcmp(SQLState, wxT("07001")))
|
||||||
return(DB_ERR_WRONG_NO_OF_PARAMS);
|
return(DB_ERR_WRONG_NO_OF_PARAMS);
|
||||||
if (!wxStrcmp(SQLState, "07006"))
|
if (!wxStrcmp(SQLState, wxT("07006")))
|
||||||
return(DB_ERR_DATA_TYPE_ATTR_VIOL);
|
return(DB_ERR_DATA_TYPE_ATTR_VIOL);
|
||||||
if (!wxStrcmp(SQLState, "08001"))
|
if (!wxStrcmp(SQLState, wxT("08001")))
|
||||||
return(DB_ERR_UNABLE_TO_CONNECT);
|
return(DB_ERR_UNABLE_TO_CONNECT);
|
||||||
if (!wxStrcmp(SQLState, "08002"))
|
if (!wxStrcmp(SQLState, wxT("08002")))
|
||||||
return(DB_ERR_CONNECTION_IN_USE);
|
return(DB_ERR_CONNECTION_IN_USE);
|
||||||
if (!wxStrcmp(SQLState, "08003"))
|
if (!wxStrcmp(SQLState, wxT("08003")))
|
||||||
return(DB_ERR_CONNECTION_NOT_OPEN);
|
return(DB_ERR_CONNECTION_NOT_OPEN);
|
||||||
if (!wxStrcmp(SQLState, "08004"))
|
if (!wxStrcmp(SQLState, wxT("08004")))
|
||||||
return(DB_ERR_REJECTED_CONNECTION);
|
return(DB_ERR_REJECTED_CONNECTION);
|
||||||
if (!wxStrcmp(SQLState, "08007"))
|
if (!wxStrcmp(SQLState, wxT("08007")))
|
||||||
return(DB_ERR_CONN_FAIL_IN_TRANS);
|
return(DB_ERR_CONN_FAIL_IN_TRANS);
|
||||||
if (!wxStrcmp(SQLState, "08S01"))
|
if (!wxStrcmp(SQLState, wxT("08S01")))
|
||||||
return(DB_ERR_COMM_LINK_FAILURE);
|
return(DB_ERR_COMM_LINK_FAILURE);
|
||||||
if (!wxStrcmp(SQLState, "21S01"))
|
if (!wxStrcmp(SQLState, wxT("21S01")))
|
||||||
return(DB_ERR_INSERT_VALUE_LIST_MISMATCH);
|
return(DB_ERR_INSERT_VALUE_LIST_MISMATCH);
|
||||||
if (!wxStrcmp(SQLState, "21S02"))
|
if (!wxStrcmp(SQLState, wxT("21S02")))
|
||||||
return(DB_ERR_DERIVED_TABLE_MISMATCH);
|
return(DB_ERR_DERIVED_TABLE_MISMATCH);
|
||||||
if (!wxStrcmp(SQLState, "22001"))
|
if (!wxStrcmp(SQLState, wxT("22001")))
|
||||||
return(DB_ERR_STRING_RIGHT_TRUNC);
|
return(DB_ERR_STRING_RIGHT_TRUNC);
|
||||||
if (!wxStrcmp(SQLState, "22003"))
|
if (!wxStrcmp(SQLState, wxT("22003")))
|
||||||
return(DB_ERR_NUMERIC_VALUE_OUT_OF_RNG);
|
return(DB_ERR_NUMERIC_VALUE_OUT_OF_RNG);
|
||||||
if (!wxStrcmp(SQLState, "22005"))
|
if (!wxStrcmp(SQLState, wxT("22005")))
|
||||||
return(DB_ERR_ERROR_IN_ASSIGNMENT);
|
return(DB_ERR_ERROR_IN_ASSIGNMENT);
|
||||||
if (!wxStrcmp(SQLState, "22008"))
|
if (!wxStrcmp(SQLState, wxT("22008")))
|
||||||
return(DB_ERR_DATETIME_FLD_OVERFLOW);
|
return(DB_ERR_DATETIME_FLD_OVERFLOW);
|
||||||
if (!wxStrcmp(SQLState, "22012"))
|
if (!wxStrcmp(SQLState, wxT("22012")))
|
||||||
return(DB_ERR_DIVIDE_BY_ZERO);
|
return(DB_ERR_DIVIDE_BY_ZERO);
|
||||||
if (!wxStrcmp(SQLState, "22026"))
|
if (!wxStrcmp(SQLState, wxT("22026")))
|
||||||
return(DB_ERR_STR_DATA_LENGTH_MISMATCH);
|
return(DB_ERR_STR_DATA_LENGTH_MISMATCH);
|
||||||
if (!wxStrcmp(SQLState, "23000"))
|
if (!wxStrcmp(SQLState, wxT("23000")))
|
||||||
return(DB_ERR_INTEGRITY_CONSTRAINT_VIOL);
|
return(DB_ERR_INTEGRITY_CONSTRAINT_VIOL);
|
||||||
if (!wxStrcmp(SQLState, "24000"))
|
if (!wxStrcmp(SQLState, wxT("24000")))
|
||||||
return(DB_ERR_INVALID_CURSOR_STATE);
|
return(DB_ERR_INVALID_CURSOR_STATE);
|
||||||
if (!wxStrcmp(SQLState, "25000"))
|
if (!wxStrcmp(SQLState, wxT("25000")))
|
||||||
return(DB_ERR_INVALID_TRANS_STATE);
|
return(DB_ERR_INVALID_TRANS_STATE);
|
||||||
if (!wxStrcmp(SQLState, "28000"))
|
if (!wxStrcmp(SQLState, wxT("28000")))
|
||||||
return(DB_ERR_INVALID_AUTH_SPEC);
|
return(DB_ERR_INVALID_AUTH_SPEC);
|
||||||
if (!wxStrcmp(SQLState, "34000"))
|
if (!wxStrcmp(SQLState, wxT("34000")))
|
||||||
return(DB_ERR_INVALID_CURSOR_NAME);
|
return(DB_ERR_INVALID_CURSOR_NAME);
|
||||||
if (!wxStrcmp(SQLState, "37000"))
|
if (!wxStrcmp(SQLState, wxT("37000")))
|
||||||
return(DB_ERR_SYNTAX_ERROR_OR_ACCESS_VIOL);
|
return(DB_ERR_SYNTAX_ERROR_OR_ACCESS_VIOL);
|
||||||
if (!wxStrcmp(SQLState, "3C000"))
|
if (!wxStrcmp(SQLState, wxT("3C000")))
|
||||||
return(DB_ERR_DUPLICATE_CURSOR_NAME);
|
return(DB_ERR_DUPLICATE_CURSOR_NAME);
|
||||||
if (!wxStrcmp(SQLState, "40001"))
|
if (!wxStrcmp(SQLState, wxT("40001")))
|
||||||
return(DB_ERR_SERIALIZATION_FAILURE);
|
return(DB_ERR_SERIALIZATION_FAILURE);
|
||||||
if (!wxStrcmp(SQLState, "42000"))
|
if (!wxStrcmp(SQLState, wxT("42000")))
|
||||||
return(DB_ERR_SYNTAX_ERROR_OR_ACCESS_VIOL2);
|
return(DB_ERR_SYNTAX_ERROR_OR_ACCESS_VIOL2);
|
||||||
if (!wxStrcmp(SQLState, "70100"))
|
if (!wxStrcmp(SQLState, wxT("70100")))
|
||||||
return(DB_ERR_OPERATION_ABORTED);
|
return(DB_ERR_OPERATION_ABORTED);
|
||||||
if (!wxStrcmp(SQLState, "IM001"))
|
if (!wxStrcmp(SQLState, wxT("IM001")))
|
||||||
return(DB_ERR_UNSUPPORTED_FUNCTION);
|
return(DB_ERR_UNSUPPORTED_FUNCTION);
|
||||||
if (!wxStrcmp(SQLState, "IM002"))
|
if (!wxStrcmp(SQLState, wxT("IM002")))
|
||||||
return(DB_ERR_NO_DATA_SOURCE);
|
return(DB_ERR_NO_DATA_SOURCE);
|
||||||
if (!wxStrcmp(SQLState, "IM003"))
|
if (!wxStrcmp(SQLState, wxT("IM003")))
|
||||||
return(DB_ERR_DRIVER_LOAD_ERROR);
|
return(DB_ERR_DRIVER_LOAD_ERROR);
|
||||||
if (!wxStrcmp(SQLState, "IM004"))
|
if (!wxStrcmp(SQLState, wxT("IM004")))
|
||||||
return(DB_ERR_SQLALLOCENV_FAILED);
|
return(DB_ERR_SQLALLOCENV_FAILED);
|
||||||
if (!wxStrcmp(SQLState, "IM005"))
|
if (!wxStrcmp(SQLState, wxT("IM005")))
|
||||||
return(DB_ERR_SQLALLOCCONNECT_FAILED);
|
return(DB_ERR_SQLALLOCCONNECT_FAILED);
|
||||||
if (!wxStrcmp(SQLState, "IM006"))
|
if (!wxStrcmp(SQLState, wxT("IM006")))
|
||||||
return(DB_ERR_SQLSETCONNECTOPTION_FAILED);
|
return(DB_ERR_SQLSETCONNECTOPTION_FAILED);
|
||||||
if (!wxStrcmp(SQLState, "IM007"))
|
if (!wxStrcmp(SQLState, wxT("IM007")))
|
||||||
return(DB_ERR_NO_DATA_SOURCE_DLG_PROHIB);
|
return(DB_ERR_NO_DATA_SOURCE_DLG_PROHIB);
|
||||||
if (!wxStrcmp(SQLState, "IM008"))
|
if (!wxStrcmp(SQLState, wxT("IM008")))
|
||||||
return(DB_ERR_DIALOG_FAILED);
|
return(DB_ERR_DIALOG_FAILED);
|
||||||
if (!wxStrcmp(SQLState, "IM009"))
|
if (!wxStrcmp(SQLState, wxT("IM009")))
|
||||||
return(DB_ERR_UNABLE_TO_LOAD_TRANSLATION_DLL);
|
return(DB_ERR_UNABLE_TO_LOAD_TRANSLATION_DLL);
|
||||||
if (!wxStrcmp(SQLState, "IM010"))
|
if (!wxStrcmp(SQLState, wxT("IM010")))
|
||||||
return(DB_ERR_DATA_SOURCE_NAME_TOO_LONG);
|
return(DB_ERR_DATA_SOURCE_NAME_TOO_LONG);
|
||||||
if (!wxStrcmp(SQLState, "IM011"))
|
if (!wxStrcmp(SQLState, wxT("IM011")))
|
||||||
return(DB_ERR_DRIVER_NAME_TOO_LONG);
|
return(DB_ERR_DRIVER_NAME_TOO_LONG);
|
||||||
if (!wxStrcmp(SQLState, "IM012"))
|
if (!wxStrcmp(SQLState, wxT("IM012")))
|
||||||
return(DB_ERR_DRIVER_KEYWORD_SYNTAX_ERROR);
|
return(DB_ERR_DRIVER_KEYWORD_SYNTAX_ERROR);
|
||||||
if (!wxStrcmp(SQLState, "IM013"))
|
if (!wxStrcmp(SQLState, wxT("IM013")))
|
||||||
return(DB_ERR_TRACE_FILE_ERROR);
|
return(DB_ERR_TRACE_FILE_ERROR);
|
||||||
if (!wxStrcmp(SQLState, "S0001"))
|
if (!wxStrcmp(SQLState, wxT("S0001")))
|
||||||
return(DB_ERR_TABLE_OR_VIEW_ALREADY_EXISTS);
|
return(DB_ERR_TABLE_OR_VIEW_ALREADY_EXISTS);
|
||||||
if (!wxStrcmp(SQLState, "S0002"))
|
if (!wxStrcmp(SQLState, wxT("S0002")))
|
||||||
return(DB_ERR_TABLE_NOT_FOUND);
|
return(DB_ERR_TABLE_NOT_FOUND);
|
||||||
if (!wxStrcmp(SQLState, "S0011"))
|
if (!wxStrcmp(SQLState, wxT("S0011")))
|
||||||
return(DB_ERR_INDEX_ALREADY_EXISTS);
|
return(DB_ERR_INDEX_ALREADY_EXISTS);
|
||||||
if (!wxStrcmp(SQLState, "S0012"))
|
if (!wxStrcmp(SQLState, wxT("S0012")))
|
||||||
return(DB_ERR_INDEX_NOT_FOUND);
|
return(DB_ERR_INDEX_NOT_FOUND);
|
||||||
if (!wxStrcmp(SQLState, "S0021"))
|
if (!wxStrcmp(SQLState, wxT("S0021")))
|
||||||
return(DB_ERR_COLUMN_ALREADY_EXISTS);
|
return(DB_ERR_COLUMN_ALREADY_EXISTS);
|
||||||
if (!wxStrcmp(SQLState, "S0022"))
|
if (!wxStrcmp(SQLState, wxT("S0022")))
|
||||||
return(DB_ERR_COLUMN_NOT_FOUND);
|
return(DB_ERR_COLUMN_NOT_FOUND);
|
||||||
if (!wxStrcmp(SQLState, "S0023"))
|
if (!wxStrcmp(SQLState, wxT("S0023")))
|
||||||
return(DB_ERR_NO_DEFAULT_FOR_COLUMN);
|
return(DB_ERR_NO_DEFAULT_FOR_COLUMN);
|
||||||
if (!wxStrcmp(SQLState, "S1000"))
|
if (!wxStrcmp(SQLState, wxT("S1000")))
|
||||||
return(DB_ERR_GENERAL_ERROR);
|
return(DB_ERR_GENERAL_ERROR);
|
||||||
if (!wxStrcmp(SQLState, "S1001"))
|
if (!wxStrcmp(SQLState, wxT("S1001")))
|
||||||
return(DB_ERR_MEMORY_ALLOCATION_FAILURE);
|
return(DB_ERR_MEMORY_ALLOCATION_FAILURE);
|
||||||
if (!wxStrcmp(SQLState, "S1002"))
|
if (!wxStrcmp(SQLState, wxT("S1002")))
|
||||||
return(DB_ERR_INVALID_COLUMN_NUMBER);
|
return(DB_ERR_INVALID_COLUMN_NUMBER);
|
||||||
if (!wxStrcmp(SQLState, "S1003"))
|
if (!wxStrcmp(SQLState, wxT("S1003")))
|
||||||
return(DB_ERR_PROGRAM_TYPE_OUT_OF_RANGE);
|
return(DB_ERR_PROGRAM_TYPE_OUT_OF_RANGE);
|
||||||
if (!wxStrcmp(SQLState, "S1004"))
|
if (!wxStrcmp(SQLState, wxT("S1004")))
|
||||||
return(DB_ERR_SQL_DATA_TYPE_OUT_OF_RANGE);
|
return(DB_ERR_SQL_DATA_TYPE_OUT_OF_RANGE);
|
||||||
if (!wxStrcmp(SQLState, "S1008"))
|
if (!wxStrcmp(SQLState, wxT("S1008")))
|
||||||
return(DB_ERR_OPERATION_CANCELLED);
|
return(DB_ERR_OPERATION_CANCELLED);
|
||||||
if (!wxStrcmp(SQLState, "S1009"))
|
if (!wxStrcmp(SQLState, wxT("S1009")))
|
||||||
return(DB_ERR_INVALID_ARGUMENT_VALUE);
|
return(DB_ERR_INVALID_ARGUMENT_VALUE);
|
||||||
if (!wxStrcmp(SQLState, "S1010"))
|
if (!wxStrcmp(SQLState, wxT("S1010")))
|
||||||
return(DB_ERR_FUNCTION_SEQUENCE_ERROR);
|
return(DB_ERR_FUNCTION_SEQUENCE_ERROR);
|
||||||
if (!wxStrcmp(SQLState, "S1011"))
|
if (!wxStrcmp(SQLState, wxT("S1011")))
|
||||||
return(DB_ERR_OPERATION_INVALID_AT_THIS_TIME);
|
return(DB_ERR_OPERATION_INVALID_AT_THIS_TIME);
|
||||||
if (!wxStrcmp(SQLState, "S1012"))
|
if (!wxStrcmp(SQLState, wxT("S1012")))
|
||||||
return(DB_ERR_INVALID_TRANS_OPERATION_CODE);
|
return(DB_ERR_INVALID_TRANS_OPERATION_CODE);
|
||||||
if (!wxStrcmp(SQLState, "S1015"))
|
if (!wxStrcmp(SQLState, wxT("S1015")))
|
||||||
return(DB_ERR_NO_CURSOR_NAME_AVAIL);
|
return(DB_ERR_NO_CURSOR_NAME_AVAIL);
|
||||||
if (!wxStrcmp(SQLState, "S1090"))
|
if (!wxStrcmp(SQLState, wxT("S1090")))
|
||||||
return(DB_ERR_INVALID_STR_OR_BUF_LEN);
|
return(DB_ERR_INVALID_STR_OR_BUF_LEN);
|
||||||
if (!wxStrcmp(SQLState, "S1091"))
|
if (!wxStrcmp(SQLState, wxT("S1091")))
|
||||||
return(DB_ERR_DESCRIPTOR_TYPE_OUT_OF_RANGE);
|
return(DB_ERR_DESCRIPTOR_TYPE_OUT_OF_RANGE);
|
||||||
if (!wxStrcmp(SQLState, "S1092"))
|
if (!wxStrcmp(SQLState, wxT("S1092")))
|
||||||
return(DB_ERR_OPTION_TYPE_OUT_OF_RANGE);
|
return(DB_ERR_OPTION_TYPE_OUT_OF_RANGE);
|
||||||
if (!wxStrcmp(SQLState, "S1093"))
|
if (!wxStrcmp(SQLState, wxT("S1093")))
|
||||||
return(DB_ERR_INVALID_PARAM_NO);
|
return(DB_ERR_INVALID_PARAM_NO);
|
||||||
if (!wxStrcmp(SQLState, "S1094"))
|
if (!wxStrcmp(SQLState, wxT("S1094")))
|
||||||
return(DB_ERR_INVALID_SCALE_VALUE);
|
return(DB_ERR_INVALID_SCALE_VALUE);
|
||||||
if (!wxStrcmp(SQLState, "S1095"))
|
if (!wxStrcmp(SQLState, wxT("S1095")))
|
||||||
return(DB_ERR_FUNCTION_TYPE_OUT_OF_RANGE);
|
return(DB_ERR_FUNCTION_TYPE_OUT_OF_RANGE);
|
||||||
if (!wxStrcmp(SQLState, "S1096"))
|
if (!wxStrcmp(SQLState, wxT("S1096")))
|
||||||
return(DB_ERR_INF_TYPE_OUT_OF_RANGE);
|
return(DB_ERR_INF_TYPE_OUT_OF_RANGE);
|
||||||
if (!wxStrcmp(SQLState, "S1097"))
|
if (!wxStrcmp(SQLState, wxT("S1097")))
|
||||||
return(DB_ERR_COLUMN_TYPE_OUT_OF_RANGE);
|
return(DB_ERR_COLUMN_TYPE_OUT_OF_RANGE);
|
||||||
if (!wxStrcmp(SQLState, "S1098"))
|
if (!wxStrcmp(SQLState, wxT("S1098")))
|
||||||
return(DB_ERR_SCOPE_TYPE_OUT_OF_RANGE);
|
return(DB_ERR_SCOPE_TYPE_OUT_OF_RANGE);
|
||||||
if (!wxStrcmp(SQLState, "S1099"))
|
if (!wxStrcmp(SQLState, wxT("S1099")))
|
||||||
return(DB_ERR_NULLABLE_TYPE_OUT_OF_RANGE);
|
return(DB_ERR_NULLABLE_TYPE_OUT_OF_RANGE);
|
||||||
if (!wxStrcmp(SQLState, "S1100"))
|
if (!wxStrcmp(SQLState, wxT("S1100")))
|
||||||
return(DB_ERR_UNIQUENESS_OPTION_TYPE_OUT_OF_RANGE);
|
return(DB_ERR_UNIQUENESS_OPTION_TYPE_OUT_OF_RANGE);
|
||||||
if (!wxStrcmp(SQLState, "S1101"))
|
if (!wxStrcmp(SQLState, wxT("S1101")))
|
||||||
return(DB_ERR_ACCURACY_OPTION_TYPE_OUT_OF_RANGE);
|
return(DB_ERR_ACCURACY_OPTION_TYPE_OUT_OF_RANGE);
|
||||||
if (!wxStrcmp(SQLState, "S1103"))
|
if (!wxStrcmp(SQLState, wxT("S1103")))
|
||||||
return(DB_ERR_DIRECTION_OPTION_OUT_OF_RANGE);
|
return(DB_ERR_DIRECTION_OPTION_OUT_OF_RANGE);
|
||||||
if (!wxStrcmp(SQLState, "S1104"))
|
if (!wxStrcmp(SQLState, wxT("S1104")))
|
||||||
return(DB_ERR_INVALID_PRECISION_VALUE);
|
return(DB_ERR_INVALID_PRECISION_VALUE);
|
||||||
if (!wxStrcmp(SQLState, "S1105"))
|
if (!wxStrcmp(SQLState, wxT("S1105")))
|
||||||
return(DB_ERR_INVALID_PARAM_TYPE);
|
return(DB_ERR_INVALID_PARAM_TYPE);
|
||||||
if (!wxStrcmp(SQLState, "S1106"))
|
if (!wxStrcmp(SQLState, wxT("S1106")))
|
||||||
return(DB_ERR_FETCH_TYPE_OUT_OF_RANGE);
|
return(DB_ERR_FETCH_TYPE_OUT_OF_RANGE);
|
||||||
if (!wxStrcmp(SQLState, "S1107"))
|
if (!wxStrcmp(SQLState, wxT("S1107")))
|
||||||
return(DB_ERR_ROW_VALUE_OUT_OF_RANGE);
|
return(DB_ERR_ROW_VALUE_OUT_OF_RANGE);
|
||||||
if (!wxStrcmp(SQLState, "S1108"))
|
if (!wxStrcmp(SQLState, wxT("S1108")))
|
||||||
return(DB_ERR_CONCURRENCY_OPTION_OUT_OF_RANGE);
|
return(DB_ERR_CONCURRENCY_OPTION_OUT_OF_RANGE);
|
||||||
if (!wxStrcmp(SQLState, "S1109"))
|
if (!wxStrcmp(SQLState, wxT("S1109")))
|
||||||
return(DB_ERR_INVALID_CURSOR_POSITION);
|
return(DB_ERR_INVALID_CURSOR_POSITION);
|
||||||
if (!wxStrcmp(SQLState, "S1110"))
|
if (!wxStrcmp(SQLState, wxT("S1110")))
|
||||||
return(DB_ERR_INVALID_DRIVER_COMPLETION);
|
return(DB_ERR_INVALID_DRIVER_COMPLETION);
|
||||||
if (!wxStrcmp(SQLState, "S1111"))
|
if (!wxStrcmp(SQLState, wxT("S1111")))
|
||||||
return(DB_ERR_INVALID_BOOKMARK_VALUE);
|
return(DB_ERR_INVALID_BOOKMARK_VALUE);
|
||||||
if (!wxStrcmp(SQLState, "S1C00"))
|
if (!wxStrcmp(SQLState, wxT("S1C00")))
|
||||||
return(DB_ERR_DRIVER_NOT_CAPABLE);
|
return(DB_ERR_DRIVER_NOT_CAPABLE);
|
||||||
if (!wxStrcmp(SQLState, "S1T00"))
|
if (!wxStrcmp(SQLState, wxT("S1T00")))
|
||||||
return(DB_ERR_TIMEOUT_EXPIRED);
|
return(DB_ERR_TIMEOUT_EXPIRED);
|
||||||
|
|
||||||
// No match
|
// No match
|
||||||
@@ -1333,10 +1333,10 @@ bool wxDB::DropView(const char *viewName)
|
|||||||
{
|
{
|
||||||
// Check for "Base table not found" error and ignore
|
// Check for "Base table not found" error and ignore
|
||||||
GetNextError(henv, hdbc, hstmt);
|
GetNextError(henv, hdbc, hstmt);
|
||||||
if (wxStrcmp(sqlState,"S0002")) // "Base table not found"
|
if (wxStrcmp(sqlState,wxT("S0002"))) // "Base table not found"
|
||||||
{
|
{
|
||||||
// Check for product specific error codes
|
// Check for product specific error codes
|
||||||
if (!((Dbms() == dbmsSYBASE_ASA && !wxStrcmp(sqlState,"42000")))) // 5.x (and lower?)
|
if (!((Dbms() == dbmsSYBASE_ASA && !wxStrcmp(sqlState,wxT("42000"))))) // 5.x (and lower?)
|
||||||
{
|
{
|
||||||
DispNextError();
|
DispNextError();
|
||||||
DispAllErrors(henv, hdbc, hstmt);
|
DispAllErrors(henv, hdbc, hstmt);
|
||||||
@@ -1481,11 +1481,11 @@ int wxDB::GetKeyFields(char *tableName, wxColInf* colInf,int noCols)
|
|||||||
GetData( 5, SQL_C_SSHORT, &iKeySeq, 0, &cb);
|
GetData( 5, SQL_C_SSHORT, &iKeySeq, 0, &cb);
|
||||||
GetData( 7, SQL_C_CHAR, szFkTable, DB_MAX_TABLE_NAME_LEN+1, &cb);
|
GetData( 7, SQL_C_CHAR, szFkTable, DB_MAX_TABLE_NAME_LEN+1, &cb);
|
||||||
GetData( 8, SQL_C_CHAR, szFkCol, DB_MAX_COLUMN_NAME_LEN+1, &cb);
|
GetData( 8, SQL_C_CHAR, szFkCol, DB_MAX_COLUMN_NAME_LEN+1, &cb);
|
||||||
Temp0.Printf("%s[%s] ",Temp0.c_str(),szFkTable); // [ ] in case there is a blank in the Table name
|
Temp0.Printf(wxT("%s[%s] "),Temp0.c_str(),szFkTable); // [ ] in case there is a blank in the Table name
|
||||||
} // if (retcode == SQL_SUCCESS || retcode == SQL_SUCCESS_WITH_INFO)
|
} // if (retcode == SQL_SUCCESS || retcode == SQL_SUCCESS_WITH_INFO)
|
||||||
} // while ((retcode == SQL_SUCCESS) || (retcode == SQL_SUCCESS_WITH_INFO))
|
} // while ((retcode == SQL_SUCCESS) || (retcode == SQL_SUCCESS_WITH_INFO))
|
||||||
Temp0.Trim(); // Get rid of any unneeded blanks
|
Temp0.Trim(); // Get rid of any unneeded blanks
|
||||||
if (Temp0 != "")
|
if (Temp0 != wxT(""))
|
||||||
{
|
{
|
||||||
for (i=0;i<noCols;i++) // Find the Column name
|
for (i=0;i<noCols;i++) // Find the Column name
|
||||||
if (!wxStrcmp(colInf[i].colName,szPkCol)) // We have found the Column, store the Information
|
if (!wxStrcmp(colInf[i].colName,szPkCol)) // We have found the Column, store the Information
|
||||||
@@ -1609,8 +1609,8 @@ wxColInf *wxDB::GetColumns(char *tableName[], const char *userID)
|
|||||||
if (!colInf)
|
if (!colInf)
|
||||||
break;
|
break;
|
||||||
// Mark the end of the array
|
// Mark the end of the array
|
||||||
wxStrcpy(colInf[noCols].tableName, "");
|
wxStrcpy(colInf[noCols].tableName, wxT(""));
|
||||||
wxStrcpy(colInf[noCols].colName, "");
|
wxStrcpy(colInf[noCols].colName, wxT(""));
|
||||||
colInf[noCols].sqlDataType = 0;
|
colInf[noCols].sqlDataType = 0;
|
||||||
}
|
}
|
||||||
// Loop through each table name
|
// Loop through each table name
|
||||||
@@ -1627,7 +1627,7 @@ wxColInf *wxDB::GetColumns(char *tableName[], const char *userID)
|
|||||||
|
|
||||||
// MySQL and Access cannot accept a user name when looking up column names, so we
|
// MySQL and Access cannot accept a user name when looking up column names, so we
|
||||||
// use the call below that leaves out the user name
|
// use the call below that leaves out the user name
|
||||||
if (wxStrcmp(UserID.GetData(),"") &&
|
if (wxStrcmp(UserID.GetData(),wxT("")) &&
|
||||||
Dbms() != dbmsMY_SQL &&
|
Dbms() != dbmsMY_SQL &&
|
||||||
Dbms() != dbmsACCESS)
|
Dbms() != dbmsACCESS)
|
||||||
{
|
{
|
||||||
@@ -1777,8 +1777,8 @@ wxColInf *wxDB::GetColumns(char *tableName, int *numCols, const char *userID)
|
|||||||
if (!colInf)
|
if (!colInf)
|
||||||
break;
|
break;
|
||||||
// Mark the end of the array
|
// Mark the end of the array
|
||||||
wxStrcpy(colInf[noCols].tableName, "");
|
wxStrcpy(colInf[noCols].tableName, wxT(""));
|
||||||
wxStrcpy(colInf[noCols].colName, "");
|
wxStrcpy(colInf[noCols].colName, wxT(""));
|
||||||
colInf[noCols].sqlDataType = 0;
|
colInf[noCols].sqlDataType = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1792,7 +1792,7 @@ wxColInf *wxDB::GetColumns(char *tableName, int *numCols, const char *userID)
|
|||||||
|
|
||||||
// MySQL and Access cannot accept a user name when looking up column names, so we
|
// MySQL and Access cannot accept a user name when looking up column names, so we
|
||||||
// use the call below that leaves out the user name
|
// use the call below that leaves out the user name
|
||||||
if (wxStrcmp(UserID.GetData(),"") &&
|
if (wxStrcmp(UserID.GetData(),wxT("")) &&
|
||||||
Dbms() != dbmsMY_SQL &&
|
Dbms() != dbmsMY_SQL &&
|
||||||
Dbms() != dbmsACCESS)
|
Dbms() != dbmsACCESS)
|
||||||
{
|
{
|
||||||
@@ -1928,11 +1928,11 @@ int wxDB::GetColumnCount(char *tableName, const char *userID)
|
|||||||
UserID = userID;
|
UserID = userID;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
UserID = "";
|
UserID = wxT("");
|
||||||
|
|
||||||
// dBase does not use user names, and some drivers fail if you try to pass one
|
// dBase does not use user names, and some drivers fail if you try to pass one
|
||||||
if (Dbms() == dbmsDBASE)
|
if (Dbms() == dbmsDBASE)
|
||||||
UserID = "";
|
UserID = wxT("");
|
||||||
|
|
||||||
// Oracle user names may only be in uppercase, so force
|
// Oracle user names may only be in uppercase, so force
|
||||||
// the name to uppercase
|
// the name to uppercase
|
||||||
@@ -1952,7 +1952,7 @@ int wxDB::GetColumnCount(char *tableName, const char *userID)
|
|||||||
|
|
||||||
// MySQL and Access cannot accept a user name when looking up column names, so we
|
// MySQL and Access cannot accept a user name when looking up column names, so we
|
||||||
// use the call below that leaves out the user name
|
// use the call below that leaves out the user name
|
||||||
if (wxStrcmp(UserID.GetData(),"") &&
|
if (wxStrcmp(UserID.GetData(),wxT("")) &&
|
||||||
Dbms() != dbmsMY_SQL &&
|
Dbms() != dbmsMY_SQL &&
|
||||||
Dbms() != dbmsACCESS)
|
Dbms() != dbmsACCESS)
|
||||||
{
|
{
|
||||||
@@ -2038,11 +2038,11 @@ wxDbInf *wxDB::GetCatalog(char *userID)
|
|||||||
UserID = userID;
|
UserID = userID;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
UserID = "";
|
UserID = wxT("");
|
||||||
|
|
||||||
// dBase does not use user names, and some drivers fail if you try to pass one
|
// dBase does not use user names, and some drivers fail if you try to pass one
|
||||||
if (Dbms() == dbmsDBASE)
|
if (Dbms() == dbmsDBASE)
|
||||||
UserID = "";
|
UserID = wxT("");
|
||||||
|
|
||||||
// Oracle user names may only be in uppercase, so force
|
// Oracle user names may only be in uppercase, so force
|
||||||
// the name to uppercase
|
// the name to uppercase
|
||||||
@@ -2064,9 +2064,9 @@ wxDbInf *wxDB::GetCatalog(char *userID)
|
|||||||
for (pass = 1; pass <= 2; pass++)
|
for (pass = 1; pass <= 2; pass++)
|
||||||
{
|
{
|
||||||
SQLFreeStmt(hstmt, SQL_CLOSE); // Close if Open
|
SQLFreeStmt(hstmt, SQL_CLOSE); // Close if Open
|
||||||
tblNameSave = "";
|
tblNameSave = wxT("");
|
||||||
|
|
||||||
if (wxStrcmp(UserID.GetData(),"") &&
|
if (wxStrcmp(UserID.GetData(),wxT("")) &&
|
||||||
Dbms() != dbmsMY_SQL &&
|
Dbms() != dbmsMY_SQL &&
|
||||||
Dbms() != dbmsACCESS)
|
Dbms() != dbmsACCESS)
|
||||||
{
|
{
|
||||||
@@ -2180,18 +2180,18 @@ bool wxDB::Catalog(const char *userID, const char *fileName)
|
|||||||
UserID = userID;
|
UserID = userID;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
UserID = "";
|
UserID = wxT("");
|
||||||
|
|
||||||
// dBase does not use user names, and some drivers fail if you try to pass one
|
// dBase does not use user names, and some drivers fail if you try to pass one
|
||||||
if (Dbms() == dbmsDBASE)
|
if (Dbms() == dbmsDBASE)
|
||||||
UserID = "";
|
UserID = wxT("");
|
||||||
|
|
||||||
// Oracle user names may only be in uppercase, so force
|
// Oracle user names may only be in uppercase, so force
|
||||||
// the name to uppercase
|
// the name to uppercase
|
||||||
if (Dbms() == dbmsORACLE)
|
if (Dbms() == dbmsORACLE)
|
||||||
UserID = UserID.Upper();
|
UserID = UserID.Upper();
|
||||||
|
|
||||||
if (wxStrcmp(UserID.GetData(),"") &&
|
if (wxStrcmp(UserID.GetData(),wxT("")) &&
|
||||||
Dbms() != dbmsMY_SQL &&
|
Dbms() != dbmsMY_SQL &&
|
||||||
Dbms() != dbmsACCESS)
|
Dbms() != dbmsACCESS)
|
||||||
{
|
{
|
||||||
@@ -2217,7 +2217,7 @@ bool wxDB::Catalog(const char *userID, const char *fileName)
|
|||||||
}
|
}
|
||||||
|
|
||||||
wxString outStr;
|
wxString outStr;
|
||||||
tblNameSave = "";
|
tblNameSave = wxT("");
|
||||||
int cnt = 0;
|
int cnt = 0;
|
||||||
|
|
||||||
while ((retcode = SQLFetch(hstmt)) == SQL_SUCCESS)
|
while ((retcode = SQLFetch(hstmt)) == SQL_SUCCESS)
|
||||||
@@ -2231,8 +2231,8 @@ bool wxDB::Catalog(const char *userID, const char *fileName)
|
|||||||
fputs("===================== ", fp);
|
fputs("===================== ", fp);
|
||||||
fputs("========= ", fp);
|
fputs("========= ", fp);
|
||||||
fputs("=========\n", fp);
|
fputs("=========\n", fp);
|
||||||
outStr.sprintf("%-32s %-32s %-21s %9s %9s\n",
|
outStr.sprintf(wxT("%-32s %-32s %-21s %9s %9s\n"),
|
||||||
"TABLE NAME", "COLUMN NAME", "DATA TYPE", "PRECISION", "LENGTH");
|
wxT("TABLE NAME"), wxT("COLUMN NAME"), wxT("DATA TYPE"), wxT("PRECISION"), wxT("LENGTH"));
|
||||||
fputs(outStr.GetData(), fp);
|
fputs(outStr.GetData(), fp);
|
||||||
fputs("================================ ", fp);
|
fputs("================================ ", fp);
|
||||||
fputs("================================ ", fp);
|
fputs("================================ ", fp);
|
||||||
|
@@ -275,8 +275,8 @@ wxTable::~wxTable()
|
|||||||
if (!found)
|
if (!found)
|
||||||
{
|
{
|
||||||
wxString msg;
|
wxString msg;
|
||||||
msg.sprintf("Unable to find the tableID in the linked\nlist of tables in use.\n\n%s",s.GetData());
|
msg.sprintf(wxT("Unable to find the tableID in the linked\nlist of tables in use.\n\n%s"),s.GetData());
|
||||||
wxLogDebug (msg.GetData(),"NOTICE...");
|
wxLogDebug (msg.GetData(),wxT("NOTICE..."));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -590,13 +590,13 @@ bool wxTable::Open(void)
|
|||||||
{
|
{
|
||||||
wxString s;
|
wxString s;
|
||||||
if (wxStrcmp(tablePath,""))
|
if (wxStrcmp(tablePath,""))
|
||||||
s.sprintf("Error opening '%s/%s'.\n",tablePath,tableName);
|
s.sprintf(wxT("Error opening '%s/%s'.\n"),tablePath,tableName);
|
||||||
else
|
else
|
||||||
s.sprintf("Error opening '%s'.\n", tableName);
|
s.sprintf(wxT("Error opening '%s'.\n"), tableName);
|
||||||
if (!pDb->TableExists(tableName,NULL,tablePath))
|
if (!pDb->TableExists(tableName,NULL,tablePath))
|
||||||
s += "Table/view does not exist in the database.\n";
|
s += wxT("Table/view does not exist in the database.\n");
|
||||||
else
|
else
|
||||||
s += "Current logged in user does not have sufficient privileges to access this table.\n";
|
s += wxT("Current logged in user does not have sufficient privileges to access this table.\n");
|
||||||
pDb->LogError(s.GetData());
|
pDb->LogError(s.GetData());
|
||||||
return(FALSE);
|
return(FALSE);
|
||||||
}
|
}
|
||||||
|
@@ -1619,8 +1619,7 @@ void wxDocParentFrame::OnMRUFile(wxCommandEvent& event)
|
|||||||
// about it
|
// about it
|
||||||
m_docManager->RemoveFileFromHistory(n);
|
m_docManager->RemoveFileFromHistory(n);
|
||||||
|
|
||||||
wxLogError(_("The file '%s' doesn't exist and couldn't be opened.\n"
|
wxLogError(_("The file '%s' doesn't exist and couldn't be opened.\nIt has been also removed from the MRU files list."),
|
||||||
"It has been also removed from the MRU files list."),
|
|
||||||
filename.c_str());
|
filename.c_str());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -132,12 +132,6 @@
|
|||||||
#include <unix.h>
|
#include <unix.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// wxWindows
|
|
||||||
#include "wx/string.h"
|
|
||||||
#include "wx/intl.h"
|
|
||||||
#include "wx/file.h"
|
|
||||||
#include "wx/log.h"
|
|
||||||
|
|
||||||
#ifndef MAX_PATH
|
#ifndef MAX_PATH
|
||||||
#define MAX_PATH 512
|
#define MAX_PATH 512
|
||||||
#endif
|
#endif
|
||||||
@@ -150,6 +144,12 @@
|
|||||||
#define ACCESS(access) , (access)
|
#define ACCESS(access) , (access)
|
||||||
#endif // Salford C
|
#endif // Salford C
|
||||||
|
|
||||||
|
// wxWindows
|
||||||
|
#include "wx/string.h"
|
||||||
|
#include "wx/intl.h"
|
||||||
|
#include "wx/file.h"
|
||||||
|
#include "wx/log.h"
|
||||||
|
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
// implementation of wxFile
|
// implementation of wxFile
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
@@ -175,7 +175,7 @@ bool wxFile::Exists(const wxChar *name)
|
|||||||
return !access(wxUnix2MacFilename( name ) , 0) && !stat(wxUnix2MacFilename( name ), &st) && (st.st_mode & S_IFREG);
|
return !access(wxUnix2MacFilename( name ) , 0) && !stat(wxUnix2MacFilename( name ), &st) && (st.st_mode & S_IFREG);
|
||||||
#else
|
#else
|
||||||
return !access(name, 0) &&
|
return !access(name, 0) &&
|
||||||
!stat((wxChar*) name, &st) &&
|
!stat(name, &st) &&
|
||||||
(st.st_mode & S_IFREG);
|
(st.st_mode & S_IFREG);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
@@ -460,8 +460,7 @@ void wxFileConfig::Parse(wxTextFile& file, bool bLocal)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
wxLogWarning(_("file '%s', line %d: '%s' "
|
wxLogWarning(_("file '%s', line %d: '%s' ignored after group header."),
|
||||||
"ignored after group header."),
|
|
||||||
file.GetName(), n + 1, pEnd);
|
file.GetName(), n + 1, pEnd);
|
||||||
bCont = FALSE;
|
bCont = FALSE;
|
||||||
}
|
}
|
||||||
@@ -506,8 +505,7 @@ void wxFileConfig::Parse(wxTextFile& file, bool bLocal)
|
|||||||
else {
|
else {
|
||||||
if ( bLocal && pEntry->IsImmutable() ) {
|
if ( bLocal && pEntry->IsImmutable() ) {
|
||||||
// immutable keys can't be changed by user
|
// immutable keys can't be changed by user
|
||||||
wxLogWarning(_("file '%s', line %d: value for "
|
wxLogWarning(_("file '%s', line %d: value for immutable key '%s' ignored."),
|
||||||
"immutable key '%s' ignored."),
|
|
||||||
file.GetName(), n + 1, strKey.c_str());
|
file.GetName(), n + 1, strKey.c_str());
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@@ -517,8 +515,7 @@ void wxFileConfig::Parse(wxTextFile& file, bool bLocal)
|
|||||||
// (c) key from global file now found in local one
|
// (c) key from global file now found in local one
|
||||||
// which is exactly what we want.
|
// which is exactly what we want.
|
||||||
else if ( !bLocal || pEntry->IsLocal() ) {
|
else if ( !bLocal || pEntry->IsLocal() ) {
|
||||||
wxLogWarning(_("file '%s', line %d: key '%s' was first "
|
wxLogWarning(_("file '%s', line %d: key '%s' was first found at line %d."),
|
||||||
"found at line %d."),
|
|
||||||
file.GetName(), n + 1, strKey.c_str(), pEntry->Line());
|
file.GetName(), n + 1, strKey.c_str(), pEntry->Line());
|
||||||
|
|
||||||
if ( bLocal )
|
if ( bLocal )
|
||||||
|
@@ -305,8 +305,7 @@ wxString wxFontMapper::GetEncodingDescription(wxFontEncoding encoding)
|
|||||||
size_t count = WXSIZEOF(gs_encodingDescs);
|
size_t count = WXSIZEOF(gs_encodingDescs);
|
||||||
|
|
||||||
wxASSERT_MSG( count == WXSIZEOF(gs_encodings),
|
wxASSERT_MSG( count == WXSIZEOF(gs_encodings),
|
||||||
wxT("inconsitency detected - forgot to update one of "
|
wxT("inconsitency detected - forgot to update one of the arrays?") );
|
||||||
"the arrays?") );
|
|
||||||
|
|
||||||
for ( size_t i = 0; i < count; i++ )
|
for ( size_t i = 0; i < count; i++ )
|
||||||
{
|
{
|
||||||
@@ -328,8 +327,7 @@ wxString wxFontMapper::GetEncodingName(wxFontEncoding encoding)
|
|||||||
size_t count = WXSIZEOF(gs_encodingNames);
|
size_t count = WXSIZEOF(gs_encodingNames);
|
||||||
|
|
||||||
wxASSERT_MSG( count == WXSIZEOF(gs_encodings),
|
wxASSERT_MSG( count == WXSIZEOF(gs_encodings),
|
||||||
wxT("inconsitency detected - forgot to update one of "
|
wxT("inconsistency detected - forgot to update one of the arrays?") );
|
||||||
"the arrays?") );
|
|
||||||
|
|
||||||
for ( size_t i = 0; i < count; i++ )
|
for ( size_t i = 0; i < count; i++ )
|
||||||
{
|
{
|
||||||
@@ -370,8 +368,7 @@ wxFontEncoding wxFontMapper::CharsetToEncoding(const wxString& charset,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
wxLogDebug(wxT("corrupted config data: invalid encoding %ld "
|
wxLogDebug(wxT("corrupted config data: invalid encoding %ld for charset '%s' ignored"),
|
||||||
"for charset '%s' ignored"),
|
|
||||||
value, charset.c_str());
|
value, charset.c_str());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -455,16 +452,13 @@ wxFontEncoding wxFontMapper::CharsetToEncoding(const wxString& charset,
|
|||||||
|
|
||||||
// the message
|
// the message
|
||||||
wxString msg;
|
wxString msg;
|
||||||
msg.Printf(_("The charset '%s' is unknown. You may select\n"
|
msg.Printf(_("The charset '%s' is unknown. You may select\nanother charset to replace it with or choose\n[Cancel] if it cannot be replaced"), charset.c_str());
|
||||||
"another charset to replace it with or choose\n"
|
|
||||||
"[Cancel] if it cannot be replaced"), charset.c_str());
|
|
||||||
|
|
||||||
// the list of choices
|
// the list of choices
|
||||||
size_t count = WXSIZEOF(gs_encodingDescs);
|
size_t count = WXSIZEOF(gs_encodingDescs);
|
||||||
|
|
||||||
wxASSERT_MSG( count == WXSIZEOF(gs_encodings),
|
wxASSERT_MSG( count == WXSIZEOF(gs_encodings),
|
||||||
wxT("inconsitency detected - forgot to update one of "
|
wxT("inconsitency detected - forgot to update one of the arrays?") );
|
||||||
"the arrays?") );
|
|
||||||
|
|
||||||
wxString *encodingNamesTranslated = new wxString[count];
|
wxString *encodingNamesTranslated = new wxString[count];
|
||||||
|
|
||||||
@@ -499,8 +493,7 @@ wxFontEncoding wxFontMapper::CharsetToEncoding(const wxString& charset,
|
|||||||
// remember the alt encoding for this charset
|
// remember the alt encoding for this charset
|
||||||
if ( !config->Write(charset, (long)encoding) )
|
if ( !config->Write(charset, (long)encoding) )
|
||||||
{
|
{
|
||||||
wxLogError(_("Failed to remember the encoding "
|
wxLogError(_("Failed to remember the encoding for the charset '%s'."), charset.c_str());
|
||||||
"for the charset '%s'."), charset.c_str());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
RestorePath(pathOld);
|
RestorePath(pathOld);
|
||||||
@@ -604,8 +597,7 @@ bool wxFontMapper::GetAltForEncoding(wxFontEncoding encoding,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
wxLogDebug(wxT("corrupted config data: string '%s' is not "
|
wxLogDebug(wxT("corrupted config data: string '%s' is not a valid font encoding info"), fontinfo.c_str());
|
||||||
"a valid font encoding info"), fontinfo.c_str());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//else: there is no information in config about this encoding
|
//else: there is no information in config about this encoding
|
||||||
@@ -621,11 +613,7 @@ bool wxFontMapper::GetAltForEncoding(wxFontEncoding encoding,
|
|||||||
|
|
||||||
// the message
|
// the message
|
||||||
wxString msg;
|
wxString msg;
|
||||||
msg.Printf(_("The encoding '%s' is unknown.\n"
|
msg.Printf(_("The encoding '%s' is unknown.\nWould you like to select a font to be used for this encoding\n(otherwise the text in this encoding will not be shown correctly)?"),
|
||||||
"Would you like to select a font to be used for this "
|
|
||||||
"encoding\n"
|
|
||||||
"(otherwise the text in this encoding will not be "
|
|
||||||
"shown correctly)?"),
|
|
||||||
GetEncodingDescription(encoding).c_str());
|
GetEncodingDescription(encoding).c_str());
|
||||||
|
|
||||||
wxWindow *parent = m_windowParent;
|
wxWindow *parent = m_windowParent;
|
||||||
|
@@ -180,15 +180,15 @@ void wxLogVerbose(const wxChar *szFormat, ...)
|
|||||||
|
|
||||||
wxChar *p = s_szBuf;
|
wxChar *p = s_szBuf;
|
||||||
size_t len = WXSIZEOF(s_szBuf);
|
size_t len = WXSIZEOF(s_szBuf);
|
||||||
strncpy(s_szBuf, _T("("), len);
|
wxStrncpy(s_szBuf, _T("("), len);
|
||||||
len -= 1; // strlen("(")
|
len -= 1; // strlen("(")
|
||||||
p += 1;
|
p += 1;
|
||||||
strncat(p, mask, len);
|
wxStrncat(p, mask, len);
|
||||||
size_t lenMask = wxStrlen(mask);
|
size_t lenMask = wxStrlen(mask);
|
||||||
len -= lenMask;
|
len -= lenMask;
|
||||||
p += lenMask;
|
p += lenMask;
|
||||||
|
|
||||||
strncat(p, _T(") "), len);
|
wxStrncat(p, _T(") "), len);
|
||||||
len -= 2;
|
len -= 2;
|
||||||
p += 2;
|
p += 2;
|
||||||
|
|
||||||
@@ -415,7 +415,8 @@ void wxLogStderr::DoLogString(const wxChar *szString, time_t WXUNUSED(t))
|
|||||||
// under Windows, programs usually don't have stderr at all, so show the
|
// under Windows, programs usually don't have stderr at all, so show the
|
||||||
// messages also under debugger - unless it's a console program
|
// messages also under debugger - unless it's a console program
|
||||||
#if defined(__WXMSW__) && wxUSE_GUI
|
#if defined(__WXMSW__) && wxUSE_GUI
|
||||||
OutputDebugString(str + wxT("\r\n"));
|
str += wxT("\r\n") ;
|
||||||
|
OutputDebugString(str.c_str());
|
||||||
#endif // MSW
|
#endif // MSW
|
||||||
#if defined(__WXMAC__) && wxUSE_GUI
|
#if defined(__WXMAC__) && wxUSE_GUI
|
||||||
debugstr(str + wxT("\r\n"));
|
debugstr(str + wxT("\r\n"));
|
||||||
@@ -638,12 +639,10 @@ void wxOnAssert(const wxChar *szFile, int nLine, const wxChar *szMsg)
|
|||||||
#if wxUSE_GUI || defined(__WXMSW__)
|
#if wxUSE_GUI || defined(__WXMSW__)
|
||||||
// this message is intentionally not translated - it is for
|
// this message is intentionally not translated - it is for
|
||||||
// developpers only
|
// developpers only
|
||||||
wxStrcat(szBuf, wxT("\nDo you want to stop the program?"
|
wxStrcat(szBuf, wxT("\nDo you want to stop the program?\nYou can also choose [Cancel] to suppress further warnings."));
|
||||||
"\nYou can also choose [Cancel] to suppress "
|
|
||||||
"further warnings."));
|
|
||||||
|
|
||||||
#if wxUSE_GUI
|
#if wxUSE_GUI
|
||||||
switch ( wxMessageBox(szBuf, "Debug",
|
switch ( wxMessageBox(szBuf, wxT("Debug"),
|
||||||
wxYES_NO | wxCANCEL | wxICON_STOP ) ) {
|
wxYES_NO | wxCANCEL | wxICON_STOP ) ) {
|
||||||
case wxYES:
|
case wxYES:
|
||||||
Trap();
|
Trap();
|
||||||
|
@@ -1146,6 +1146,9 @@ void wxDebugFree(void * buf, bool WXUNUSED(isVect) )
|
|||||||
// Trace: send output to the current debugging stream
|
// Trace: send output to the current debugging stream
|
||||||
void wxTrace(const wxChar *fmt ...)
|
void wxTrace(const wxChar *fmt ...)
|
||||||
{
|
{
|
||||||
|
#if 1
|
||||||
|
wxFAIL_MSG(wxT("wxTrace is now obsolete. Please use wxDebugXXX instead."));
|
||||||
|
#else
|
||||||
va_list ap;
|
va_list ap;
|
||||||
static wxChar buffer[512];
|
static wxChar buffer[512];
|
||||||
|
|
||||||
@@ -1174,11 +1177,15 @@ void wxTrace(const wxChar *fmt ...)
|
|||||||
#else
|
#else
|
||||||
fprintf(stderr, buffer);
|
fprintf(stderr, buffer);
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
// Trace with level
|
// Trace with level
|
||||||
void wxTraceLevel(int level, const wxChar *fmt ...)
|
void wxTraceLevel(int level, const wxChar *fmt ...)
|
||||||
{
|
{
|
||||||
|
#if 1
|
||||||
|
wxFAIL_MSG(wxT("wxTrace is now obsolete. Please use wxDebugXXX instead."));
|
||||||
|
#else
|
||||||
if (wxDebugContext::GetLevel() < level)
|
if (wxDebugContext::GetLevel() < level)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -1188,7 +1195,7 @@ void wxTraceLevel(int level, const wxChar *fmt ...)
|
|||||||
va_start(ap, fmt);
|
va_start(ap, fmt);
|
||||||
|
|
||||||
#ifdef __WXMSW__
|
#ifdef __WXMSW__
|
||||||
wvsprintf(buffer,fmt,ap) ;
|
wxWvsprintf(buffer,fmt,ap) ;
|
||||||
#else
|
#else
|
||||||
vsprintf(buffer,fmt,ap) ;
|
vsprintf(buffer,fmt,ap) ;
|
||||||
#endif
|
#endif
|
||||||
@@ -1210,6 +1217,7 @@ void wxTraceLevel(int level, const wxChar *fmt ...)
|
|||||||
#else
|
#else
|
||||||
fprintf(stderr, buffer);
|
fprintf(stderr, buffer);
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#else // wxUSE_MEMORY_TRACING && defined(__WXDEBUG__)
|
#else // wxUSE_MEMORY_TRACING && defined(__WXDEBUG__)
|
||||||
|
@@ -158,8 +158,7 @@ wxString wxFileType::ExpandCommand(const wxString& command,
|
|||||||
const wxChar *pEnd = wxStrchr(pc, wxT('}'));
|
const wxChar *pEnd = wxStrchr(pc, wxT('}'));
|
||||||
if ( pEnd == NULL ) {
|
if ( pEnd == NULL ) {
|
||||||
wxString mimetype;
|
wxString mimetype;
|
||||||
wxLogWarning(_("Unmatched '{' in an entry for "
|
wxLogWarning(_("Unmatched '{' in an entry for mime type %s."),
|
||||||
"mime type %s."),
|
|
||||||
params.GetMimeType().c_str());
|
params.GetMimeType().c_str());
|
||||||
str << wxT("%{");
|
str << wxT("%{");
|
||||||
}
|
}
|
||||||
|
@@ -129,7 +129,7 @@ void wxObject::operator delete (void * buf)
|
|||||||
|
|
||||||
// VC++ 6.0
|
// VC++ 6.0
|
||||||
#if defined(__VISUALC__) && (__VISUALC__ >= 1200)
|
#if defined(__VISUALC__) && (__VISUALC__ >= 1200)
|
||||||
void wxObject::operator delete(void* pData, char* /* fileName */, int /* lineNum */)
|
void wxObject::operator delete(void* pData, wxChar* /* fileName */, int /* lineNum */)
|
||||||
{
|
{
|
||||||
::operator delete(pData);
|
::operator delete(pData);
|
||||||
}
|
}
|
||||||
@@ -243,9 +243,7 @@ void wxClassInfo::InitializeClasses()
|
|||||||
if (info->m_className)
|
if (info->m_className)
|
||||||
{
|
{
|
||||||
wxASSERT_MSG( ++nClass < nMaxClasses,
|
wxASSERT_MSG( ++nClass < nMaxClasses,
|
||||||
_T("an infinite loop detected - have you used "
|
_T("an infinite loop detected - have you used IMPLEMENT_DYNAMIC_CLASS() twice (may be by linking some object module(s) twice)?") );
|
||||||
"IMPLEMENT_DYNAMIC_CLASS() twice (may be by "
|
|
||||||
"linking some object module(s) twice)?") );
|
|
||||||
|
|
||||||
sm_classTable->Put(info->m_className, (wxObject *)info);
|
sm_classTable->Put(info->m_className, (wxObject *)info);
|
||||||
}
|
}
|
||||||
|
@@ -657,9 +657,7 @@ bool wxPrintPreviewBase::RenderPage(int pageNum)
|
|||||||
|
|
||||||
if (!m_previewCanvas)
|
if (!m_previewCanvas)
|
||||||
{
|
{
|
||||||
wxFAIL_MSG(_T("wxPrintPreviewBase::RenderPage: must use "
|
wxFAIL_MSG(_T("wxPrintPreviewBase::RenderPage: must use wxPrintPreviewBase::SetCanvas to let me know about the canvas!"));
|
||||||
"wxPrintPreviewBase::SetCanvas to let me "
|
|
||||||
"know about the canvas!"));
|
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@@ -99,7 +99,7 @@ bool wxResourceParseIncludeFile(const wxString& f, wxResourceTable *table = (wxR
|
|||||||
|
|
||||||
wxResourceTable *wxDefaultResourceTable = (wxResourceTable *) NULL;
|
wxResourceTable *wxDefaultResourceTable = (wxResourceTable *) NULL;
|
||||||
|
|
||||||
char *wxResourceBuffer = (char *) NULL;
|
wxChar *wxResourceBuffer = (wxChar *) NULL;
|
||||||
long wxResourceBufferSize = 0;
|
long wxResourceBufferSize = 0;
|
||||||
long wxResourceBufferCount = 0;
|
long wxResourceBufferCount = 0;
|
||||||
int wxResourceStringPtr = 0;
|
int wxResourceStringPtr = 0;
|
||||||
@@ -786,9 +786,7 @@ wxItemResource *wxResourceInterpretControl(wxResourceTable& table, wxExpr *expr)
|
|||||||
id = wxResourceGetIdentifier(str, &table);
|
id = wxResourceGetIdentifier(str, &table);
|
||||||
if (id == 0)
|
if (id == 0)
|
||||||
{
|
{
|
||||||
wxLogWarning(_("Could not resolve control class or id '%s'. "
|
wxLogWarning(_("Could not resolve control class or id '%s'. Use (non-zero) integer instead\n or provide #define (see manual for caveats)"),
|
||||||
"Use (non-zero) integer instead\n or provide #define "
|
|
||||||
"(see manual for caveats)"),
|
|
||||||
(const wxChar*) expr1->StringValue());
|
(const wxChar*) expr1->StringValue());
|
||||||
delete controlItem;
|
delete controlItem;
|
||||||
return (wxItemResource *) NULL;
|
return (wxItemResource *) NULL;
|
||||||
@@ -1231,9 +1229,7 @@ wxItemResource *wxResourceInterpretMenuItem(wxResourceTable& table, wxExpr *expr
|
|||||||
id = wxResourceGetIdentifier(str, &table);
|
id = wxResourceGetIdentifier(str, &table);
|
||||||
if (id == 0)
|
if (id == 0)
|
||||||
{
|
{
|
||||||
wxLogWarning(_("Could not resolve menu id '%s'. "
|
wxLogWarning(_("Could not resolve menu id '%s'. Use (non-zero) integer instead\nor provide #define (see manual for caveats)"),
|
||||||
"Use (non-zero) integer instead\n"
|
|
||||||
"or provide #define (see manual for caveats)"),
|
|
||||||
(const wxChar*) idExpr->StringValue());
|
(const wxChar*) idExpr->StringValue());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1492,14 +1488,14 @@ bool wxReallocateResourceBuffer()
|
|||||||
if (!wxResourceBuffer)
|
if (!wxResourceBuffer)
|
||||||
{
|
{
|
||||||
wxResourceBufferSize = 1000;
|
wxResourceBufferSize = 1000;
|
||||||
wxResourceBuffer = new char[wxResourceBufferSize];
|
wxResourceBuffer = new wxChar[wxResourceBufferSize];
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
if (wxResourceBuffer)
|
if (wxResourceBuffer)
|
||||||
{
|
{
|
||||||
long newSize = wxResourceBufferSize + 1000;
|
long newSize = wxResourceBufferSize + 1000;
|
||||||
char *tmp = new char[(int)newSize];
|
wxChar *tmp = new wxChar[(int)newSize];
|
||||||
strncpy(tmp, wxResourceBuffer, (int)wxResourceBufferCount);
|
wxStrncpy(tmp, wxResourceBuffer, (int)wxResourceBufferCount);
|
||||||
delete[] wxResourceBuffer;
|
delete[] wxResourceBuffer;
|
||||||
wxResourceBuffer = tmp;
|
wxResourceBuffer = tmp;
|
||||||
wxResourceBufferSize = newSize;
|
wxResourceBufferSize = newSize;
|
||||||
@@ -1925,10 +1921,10 @@ bool wxResourceReadOneResource(wxInputStream *fd, wxExprDatabase& db, bool *eof,
|
|||||||
}
|
}
|
||||||
else if (strcmp(wxResourceBuffer, "static") != 0)
|
else if (strcmp(wxResourceBuffer, "static") != 0)
|
||||||
{
|
{
|
||||||
char buf[300];
|
wxChar buf[300];
|
||||||
strcpy(buf, _("Found "));
|
wxStrcpy(buf, _("Found "));
|
||||||
strncat(buf, wxResourceBuffer, 30);
|
wxStrncat(buf, wxResourceBuffer, 30);
|
||||||
strcat(buf, _(", expected static, #include or #define\nwhilst parsing resource."));
|
wxStrcat(buf, _(", expected static, #include or #define\nwhilst parsing resource."));
|
||||||
wxLogWarning(buf);
|
wxLogWarning(buf);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@@ -2462,8 +2458,7 @@ wxBitmap wxResourceCreateBitmap(const wxString& resource, wxResourceTable *table
|
|||||||
wxItemResource *item = table->FindResource(name);
|
wxItemResource *item = table->FindResource(name);
|
||||||
if (!item)
|
if (!item)
|
||||||
{
|
{
|
||||||
wxLogWarning(_("Failed to find XPM resource %s.\n"
|
wxLogWarning(_("Failed to find XPM resource %s.\nForgot to use wxResourceLoadBitmapData?"), (const wxChar*) name);
|
||||||
"Forgot to use wxResourceLoadBitmapData?"), (const wxChar*) name);
|
|
||||||
return wxNullBitmap;
|
return wxNullBitmap;
|
||||||
}
|
}
|
||||||
return wxBitmap((char **)item->GetValue1());
|
return wxBitmap((char **)item->GetValue1());
|
||||||
|
@@ -67,10 +67,10 @@ const wxChar *wxTextFile::GetEOL(wxTextFileType type)
|
|||||||
wxFAIL_MSG(wxT("bad file type in wxTextFile::GetEOL."));
|
wxFAIL_MSG(wxT("bad file type in wxTextFile::GetEOL."));
|
||||||
// fall through nevertheless - we must return something...
|
// fall through nevertheless - we must return something...
|
||||||
|
|
||||||
case wxTextFileType_None: return wxT(_T(""));
|
case wxTextFileType_None: return wxT("");
|
||||||
case wxTextFileType_Unix: return wxT(_T("\n"));
|
case wxTextFileType_Unix: return wxT("\n");
|
||||||
case wxTextFileType_Dos: return wxT(_T("\r\n"));
|
case wxTextFileType_Dos: return wxT("\r\n");
|
||||||
case wxTextFileType_Mac: return wxT(_T("\r"));
|
case wxTextFileType_Mac: return wxT("\r");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1025,7 +1025,7 @@ wxWindowDisabler::~wxWindowDisabler()
|
|||||||
{
|
{
|
||||||
if ( !::SetForegroundWindow(GetHwndOf(m_winTop)) )
|
if ( !::SetForegroundWindow(GetHwndOf(m_winTop)) )
|
||||||
{
|
{
|
||||||
wxLogLastError("SetForegroundWindow");
|
wxLogLastError(wxT("SetForegroundWindow"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
@@ -1416,9 +1416,7 @@ void wxWindowBase::OnMiddleClick( wxMouseEvent& event )
|
|||||||
|
|
||||||
wxMessageBox(wxString::Format(
|
wxMessageBox(wxString::Format(
|
||||||
_T(
|
_T(
|
||||||
" wxWindows Library (%s port)\n"
|
" wxWindows Library (%s port)\nVersion %u.%u.%u, compiled at %s %s\n Copyright (c) 1995-2000 wxWindows team"
|
||||||
"Version %u.%u.%u, compiled at %s %s\n"
|
|
||||||
" Copyright (c) 1995-2000 wxWindows team"
|
|
||||||
),
|
),
|
||||||
port.c_str(),
|
port.c_str(),
|
||||||
wxMAJOR_VERSION,
|
wxMAJOR_VERSION,
|
||||||
|
@@ -673,20 +673,20 @@ void wxExpr::WriteClause(FILE* stream) // Write this expression as a top-level
|
|||||||
if (node)
|
if (node)
|
||||||
{
|
{
|
||||||
node->WriteExpr(stream);
|
node->WriteExpr(stream);
|
||||||
fprintf( stream, "(" );
|
wxFprintf( stream, wxT("(") );
|
||||||
node = node->next;
|
node = node->next;
|
||||||
bool first = TRUE;
|
bool first = TRUE;
|
||||||
while (node)
|
while (node)
|
||||||
{
|
{
|
||||||
if (!first)
|
if (!first)
|
||||||
fprintf( stream, " " );
|
wxFprintf( stream, wxT(" ") );
|
||||||
node->WriteExpr(stream);
|
node->WriteExpr(stream);
|
||||||
node = node->next;
|
node = node->next;
|
||||||
if (node)
|
if (node)
|
||||||
fprintf( stream, ",\n" );
|
wxFprintf( stream, wxT(",\n") );
|
||||||
first = FALSE;
|
first = FALSE;
|
||||||
}
|
}
|
||||||
fprintf( stream, ").\n\n" );
|
wxFprintf( stream, wxT(").\n\n") );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -699,40 +699,40 @@ void wxExpr::WriteExpr(FILE* stream) // Write as any other subexpression
|
|||||||
// I don't want to turn optimization off since it's needed
|
// I don't want to turn optimization off since it's needed
|
||||||
// for reading in files quickly.
|
// for reading in files quickly.
|
||||||
#if defined(__WATCOMC__)
|
#if defined(__WATCOMC__)
|
||||||
char buf[2];
|
wxChar buf[2];
|
||||||
sprintf(buf, "");
|
wxSprintf(buf, wxT(""));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
switch (type)
|
switch (type)
|
||||||
{
|
{
|
||||||
case wxExprInteger:
|
case wxExprInteger:
|
||||||
{
|
{
|
||||||
fprintf( stream, "%ld", value.integer );
|
wxFprintf( stream, wxT("%ld"), value.integer );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case wxExprReal:
|
case wxExprReal:
|
||||||
{
|
{
|
||||||
double f = value.real;
|
double f = value.real;
|
||||||
fprintf( stream, "%.6g", f);
|
wxFprintf( stream, wxT("%.6g"), f);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case wxExprString:
|
case wxExprString:
|
||||||
{
|
{
|
||||||
fprintf( stream, "\"" );
|
wxFprintf( stream, wxT("\"") );
|
||||||
int i;
|
size_t i;
|
||||||
const wxWX2MBbuf val = wxConvLibc.cWX2MB(value.string);
|
const wxWX2MBbuf val = wxConvLibc.cWX2MB(value.string);
|
||||||
int len = strlen(val);
|
int len = strlen(val);
|
||||||
for (i = 0; i < len; i++)
|
for (i = 0; i < len; i++)
|
||||||
{
|
{
|
||||||
char ch = val[i];
|
wxChar ch = val[i];
|
||||||
if (ch == '"' || ch == '\\')
|
if (ch == wxT('"') || ch == wxT('\\'))
|
||||||
fprintf( stream, "\\" );
|
wxFprintf( stream, wxT("\\") );
|
||||||
char tmp[2];
|
wxChar tmp[2];
|
||||||
tmp[0] = ch;
|
tmp[0] = ch;
|
||||||
tmp[1] = 0;
|
tmp[1] = 0;
|
||||||
fprintf( stream, tmp );
|
wxFprintf( stream, tmp );
|
||||||
}
|
}
|
||||||
fprintf( stream, "\"" );
|
wxFprintf( stream, wxT("\"") );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case wxExprWord:
|
case wxExprWord:
|
||||||
@@ -740,11 +740,11 @@ void wxExpr::WriteExpr(FILE* stream) // Write as any other subexpression
|
|||||||
bool quote_it = FALSE;
|
bool quote_it = FALSE;
|
||||||
const wxWX2MBbuf val = wxConvLibc.cWX2MB(value.word);
|
const wxWX2MBbuf val = wxConvLibc.cWX2MB(value.word);
|
||||||
int len = strlen(val);
|
int len = strlen(val);
|
||||||
if ((len == 0) || (len > 0 && (val[0] > 64 && val[0] < 91)))
|
if ((len == 0) || (len > 0 && (val[(size_t) 0] > 64 && val[(size_t) 0] < 91)))
|
||||||
quote_it = TRUE;
|
quote_it = TRUE;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
int i;
|
size_t i;
|
||||||
for (i = 0; i < len; i++)
|
for (i = 0; i < len; i++)
|
||||||
if ((!isalpha(val[i])) && (!isdigit(val[i])) &&
|
if ((!isalpha(val[i])) && (!isdigit(val[i])) &&
|
||||||
(val[i] != '_'))
|
(val[i] != '_'))
|
||||||
@@ -752,12 +752,12 @@ void wxExpr::WriteExpr(FILE* stream) // Write as any other subexpression
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (quote_it)
|
if (quote_it)
|
||||||
fprintf( stream ,"'" );
|
wxFprintf( stream ,wxT("'") );
|
||||||
|
|
||||||
fprintf( stream, (const char*) val );
|
wxFprintf( stream, val.c_str() );
|
||||||
|
|
||||||
if (quote_it)
|
if (quote_it)
|
||||||
fprintf( stream, "'" );
|
wxFprintf( stream, wxT("'") );
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -774,20 +774,20 @@ void wxExpr::WriteExpr(FILE* stream) // Write as any other subexpression
|
|||||||
wxExpr *arg1 = expr->next;
|
wxExpr *arg1 = expr->next;
|
||||||
wxExpr *arg2 = arg1->next;
|
wxExpr *arg2 = arg1->next;
|
||||||
arg1->WriteExpr(stream);
|
arg1->WriteExpr(stream);
|
||||||
fprintf( stream, " = " );
|
wxFprintf( stream, wxT(" = ") );
|
||||||
arg2->WriteExpr(stream);
|
arg2->WriteExpr(stream);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
fprintf( stream, "[" );
|
wxFprintf( stream, wxT("[") );
|
||||||
while (expr)
|
while (expr)
|
||||||
{
|
{
|
||||||
expr->WriteExpr(stream);
|
expr->WriteExpr(stream);
|
||||||
expr = expr->next;
|
expr = expr->next;
|
||||||
if (expr)
|
if (expr)
|
||||||
fprintf( stream, ", " );
|
wxFprintf( stream, wxT(", ") );
|
||||||
}
|
}
|
||||||
fprintf( stream, "]" );
|
wxFprintf( stream, wxT("]") );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -1130,7 +1130,7 @@ char *wxmake_word(char *str)
|
|||||||
char *wxmake_string(char *str)
|
char *wxmake_string(char *str)
|
||||||
{
|
{
|
||||||
wxChar *s, *t;
|
wxChar *s, *t;
|
||||||
int len, i;
|
size_t len, i;
|
||||||
const wxMB2WXbuf sbuf = wxConvLibc.cMB2WX(str);
|
const wxMB2WXbuf sbuf = wxConvLibc.cMB2WX(str);
|
||||||
|
|
||||||
// str++; /* skip leading quote */
|
// str++; /* skip leading quote */
|
||||||
|
@@ -308,7 +308,7 @@ bool wxGenericDragImage::EndDrag()
|
|||||||
// is non-NULL, or in screen coordinates if NULL.
|
// is non-NULL, or in screen coordinates if NULL.
|
||||||
bool wxGenericDragImage::Move(const wxPoint& pt)
|
bool wxGenericDragImage::Move(const wxPoint& pt)
|
||||||
{
|
{
|
||||||
wxASSERT_MSG( (m_windowDC != (wxDC*) NULL), "No window DC in wxGenericDragImage::Move()" );
|
wxASSERT_MSG( (m_windowDC != (wxDC*) NULL), wxT("No window DC in wxGenericDragImage::Move()") );
|
||||||
|
|
||||||
// Erase at old position, then show at the current position
|
// Erase at old position, then show at the current position
|
||||||
wxPoint oldPos = m_position;
|
wxPoint oldPos = m_position;
|
||||||
@@ -328,7 +328,7 @@ bool wxGenericDragImage::Move(const wxPoint& pt)
|
|||||||
|
|
||||||
bool wxGenericDragImage::Show()
|
bool wxGenericDragImage::Show()
|
||||||
{
|
{
|
||||||
wxASSERT_MSG( (m_windowDC != (wxDC*) NULL), "No window DC in wxGenericDragImage::Show()" );
|
wxASSERT_MSG( (m_windowDC != (wxDC*) NULL), wxT("No window DC in wxGenericDragImage::Show()") );
|
||||||
|
|
||||||
// Show at the current position
|
// Show at the current position
|
||||||
|
|
||||||
@@ -353,7 +353,7 @@ bool wxGenericDragImage::Show()
|
|||||||
|
|
||||||
bool wxGenericDragImage::Hide()
|
bool wxGenericDragImage::Hide()
|
||||||
{
|
{
|
||||||
wxASSERT_MSG( (m_windowDC != (wxDC*) NULL), "No window DC in wxGenericDragImage::Hide()" );
|
wxASSERT_MSG( (m_windowDC != (wxDC*) NULL), wxT("No window DC in wxGenericDragImage::Hide()") );
|
||||||
|
|
||||||
// Repair the old position
|
// Repair the old position
|
||||||
|
|
||||||
|
@@ -648,8 +648,7 @@ void wxGridCellTextEditor::SetParameters(const wxString& params)
|
|||||||
long tmp;
|
long tmp;
|
||||||
if ( !params.ToLong(&tmp) )
|
if ( !params.ToLong(&tmp) )
|
||||||
{
|
{
|
||||||
wxLogDebug(_T("Invalid wxGridCellTextEditor parameter string "
|
wxLogDebug(_T("Invalid wxGridCellTextEditor parameter string '%s' ignored"), params.c_str());
|
||||||
"'%s' ignored"), params.c_str());
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -742,7 +741,7 @@ bool wxGridCellNumberEditor::EndEdit(int row, int col,
|
|||||||
if (grid->GetTable()->CanSetValueAs(row, col, wxGRID_VALUE_NUMBER))
|
if (grid->GetTable()->CanSetValueAs(row, col, wxGRID_VALUE_NUMBER))
|
||||||
grid->GetTable()->SetValueAsLong(row, col, value);
|
grid->GetTable()->SetValueAsLong(row, col, value);
|
||||||
else
|
else
|
||||||
grid->GetTable()->SetValue(row, col, wxString::Format("%ld", value));
|
grid->GetTable()->SetValue(row, col, wxString::Format(wxT("%ld"), value));
|
||||||
}
|
}
|
||||||
|
|
||||||
return changed;
|
return changed;
|
||||||
@@ -801,8 +800,7 @@ void wxGridCellNumberEditor::SetParameters(const wxString& params)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
wxLogDebug(_T("Invalid wxGridCellNumberEditor parameter string "
|
wxLogDebug(_T("Invalid wxGridCellNumberEditor parameter string '%s' ignored"), params.c_str());
|
||||||
"'%s' ignored"), params.c_str());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -851,7 +849,7 @@ bool wxGridCellFloatEditor::EndEdit(int row, int col,
|
|||||||
if (grid->GetTable()->CanSetValueAs(row, col, wxGRID_VALUE_FLOAT))
|
if (grid->GetTable()->CanSetValueAs(row, col, wxGRID_VALUE_FLOAT))
|
||||||
grid->GetTable()->SetValueAsDouble(row, col, value);
|
grid->GetTable()->SetValueAsDouble(row, col, value);
|
||||||
else
|
else
|
||||||
grid->GetTable()->SetValue(row, col, wxString::Format("%f", value));
|
grid->GetTable()->SetValue(row, col, wxString::Format(wxT("%f"), value));
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
@@ -1460,8 +1458,7 @@ void wxGridCellFloatRenderer::SetParameters(const wxString& params)
|
|||||||
|
|
||||||
if ( !ok )
|
if ( !ok )
|
||||||
{
|
{
|
||||||
wxLogDebug(_T("Invalid wxGridCellFloatRenderer parameter string "
|
wxLogDebug(_T("Invalid wxGridCellFloatRenderer parameter string '%s ignored"), params.c_str());
|
||||||
"'%s ignored"), params.c_str());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2266,16 +2263,14 @@ void wxGridTableBase::UpdateAttrCols( size_t pos, int numCols )
|
|||||||
bool wxGridTableBase::InsertRows( size_t WXUNUSED(pos),
|
bool wxGridTableBase::InsertRows( size_t WXUNUSED(pos),
|
||||||
size_t WXUNUSED(numRows) )
|
size_t WXUNUSED(numRows) )
|
||||||
{
|
{
|
||||||
wxFAIL_MSG( wxT("Called grid table class function InsertRows\n"
|
wxFAIL_MSG( wxT("Called grid table class function InsertRows\nbut your derived table class does not override this function") );
|
||||||
"but your derived table class does not override this function") );
|
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxGridTableBase::AppendRows( size_t WXUNUSED(numRows) )
|
bool wxGridTableBase::AppendRows( size_t WXUNUSED(numRows) )
|
||||||
{
|
{
|
||||||
wxFAIL_MSG( wxT("Called grid table class function AppendRows\n"
|
wxFAIL_MSG( wxT("Called grid table class function AppendRows\nbut your derived table class does not override this function"));
|
||||||
"but your derived table class does not override this function"));
|
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@@ -2283,8 +2278,7 @@ bool wxGridTableBase::AppendRows( size_t WXUNUSED(numRows) )
|
|||||||
bool wxGridTableBase::DeleteRows( size_t WXUNUSED(pos),
|
bool wxGridTableBase::DeleteRows( size_t WXUNUSED(pos),
|
||||||
size_t WXUNUSED(numRows) )
|
size_t WXUNUSED(numRows) )
|
||||||
{
|
{
|
||||||
wxFAIL_MSG( wxT("Called grid table class function DeleteRows\n"
|
wxFAIL_MSG( wxT("Called grid table class function DeleteRows\nbut your derived table class does not override this function"));
|
||||||
"but your derived table class does not override this function"));
|
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@@ -2292,16 +2286,14 @@ bool wxGridTableBase::DeleteRows( size_t WXUNUSED(pos),
|
|||||||
bool wxGridTableBase::InsertCols( size_t WXUNUSED(pos),
|
bool wxGridTableBase::InsertCols( size_t WXUNUSED(pos),
|
||||||
size_t WXUNUSED(numCols) )
|
size_t WXUNUSED(numCols) )
|
||||||
{
|
{
|
||||||
wxFAIL_MSG( wxT("Called grid table class function InsertCols\n"
|
wxFAIL_MSG( wxT("Called grid table class function InsertCols\nbut your derived table class does not override this function"));
|
||||||
"but your derived table class does not override this function"));
|
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxGridTableBase::AppendCols( size_t WXUNUSED(numCols) )
|
bool wxGridTableBase::AppendCols( size_t WXUNUSED(numCols) )
|
||||||
{
|
{
|
||||||
wxFAIL_MSG(wxT("Called grid table class function AppendCols\n"
|
wxFAIL_MSG(wxT("Called grid table class function AppendCols\nbut your derived table class does not override this function"));
|
||||||
"but your derived table class does not override this function"));
|
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@@ -2309,8 +2301,7 @@ bool wxGridTableBase::AppendCols( size_t WXUNUSED(numCols) )
|
|||||||
bool wxGridTableBase::DeleteCols( size_t WXUNUSED(pos),
|
bool wxGridTableBase::DeleteCols( size_t WXUNUSED(pos),
|
||||||
size_t WXUNUSED(numCols) )
|
size_t WXUNUSED(numCols) )
|
||||||
{
|
{
|
||||||
wxFAIL_MSG( wxT("Called grid table class function DeleteCols\n"
|
wxFAIL_MSG( wxT("Called grid table class function DeleteCols\nbut your derived table class does not override this function"));
|
||||||
"but your derived table class does not override this function"));
|
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@@ -2612,10 +2603,9 @@ bool wxGridStringTable::DeleteRows( size_t pos, size_t numRows )
|
|||||||
if ( pos >= curNumRows )
|
if ( pos >= curNumRows )
|
||||||
{
|
{
|
||||||
wxString errmsg;
|
wxString errmsg;
|
||||||
errmsg.Printf("Called wxGridStringTable::DeleteRows(pos=%d, N=%d)\n"
|
errmsg.Printf(wxT("Called wxGridStringTable::DeleteRows(pos=%d, N=%d)\nPos value is invalid for present table with %d rows"),
|
||||||
"Pos value is invalid for present table with %d rows",
|
|
||||||
pos, numRows, curNumRows );
|
pos, numRows, curNumRows );
|
||||||
wxFAIL_MSG( wxT(errmsg) );
|
wxFAIL_MSG( errmsg );
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2691,8 +2681,7 @@ bool wxGridStringTable::AppendCols( size_t numCols )
|
|||||||
{
|
{
|
||||||
// TODO: something better than this ?
|
// TODO: something better than this ?
|
||||||
//
|
//
|
||||||
wxFAIL_MSG( wxT("Unable to append cols to a grid table with no rows.\n"
|
wxFAIL_MSG( wxT("Unable to append cols to a grid table with no rows.\nCall AppendRows() first") );
|
||||||
"Call AppendRows() first") );
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2726,10 +2715,9 @@ bool wxGridStringTable::DeleteCols( size_t pos, size_t numCols )
|
|||||||
if ( pos >= curNumCols )
|
if ( pos >= curNumCols )
|
||||||
{
|
{
|
||||||
wxString errmsg;
|
wxString errmsg;
|
||||||
errmsg.Printf( "Called wxGridStringTable::DeleteCols(pos=%d, N=%d)...\n"
|
errmsg.Printf( wxT("Called wxGridStringTable::DeleteCols(pos=%d, N=%d)...\nPos value is invalid for present table with %d cols"),
|
||||||
"Pos value is invalid for present table with %d cols",
|
|
||||||
pos, numCols, curNumCols );
|
pos, numCols, curNumCols );
|
||||||
wxFAIL_MSG( wxT( errmsg ) );
|
wxFAIL_MSG( errmsg );
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -7147,8 +7135,7 @@ wxGridCellAttr *wxGrid::GetOrCreateCellAttr(int row, int col) const
|
|||||||
if ( !LookupAttr(row, col, &attr) || !attr )
|
if ( !LookupAttr(row, col, &attr) || !attr )
|
||||||
{
|
{
|
||||||
wxASSERT_MSG( m_table,
|
wxASSERT_MSG( m_table,
|
||||||
_T("we may only be called if CanHaveAttributes() "
|
_T("we may only be called if CanHaveAttributes() returned TRUE and then m_table should be !NULL") );
|
||||||
"returned TRUE and then m_table should be !NULL") );
|
|
||||||
|
|
||||||
attr = m_table->GetAttr(row, col);
|
attr = m_table->GetAttr(row, col);
|
||||||
if ( !attr )
|
if ( !attr )
|
||||||
|
@@ -89,7 +89,7 @@ wxExtHelpController::DisplayHelp(wxString const &relativeURL)
|
|||||||
#if defined(__WXMSW__)
|
#if defined(__WXMSW__)
|
||||||
wxString url;
|
wxString url;
|
||||||
url << m_MapFile << '\\' << relativeURL.BeforeFirst('#');
|
url << m_MapFile << '\\' << relativeURL.BeforeFirst('#');
|
||||||
bool bOk = (int)ShellExecute(NULL, "open", url,
|
bool bOk = (int)ShellExecute(NULL, wxT("open"), url.c_string(),
|
||||||
NULL, NULL, SW_SHOWNORMAL ) > 32;
|
NULL, NULL, SW_SHOWNORMAL ) > 32;
|
||||||
if ( !bOk )
|
if ( !bOk )
|
||||||
{
|
{
|
||||||
|
@@ -319,7 +319,7 @@ bool wxApp::RegisterWindowClasses()
|
|||||||
|
|
||||||
if ( !RegisterClass(&wndclass) )
|
if ( !RegisterClass(&wndclass) )
|
||||||
{
|
{
|
||||||
wxLogLastError("RegisterClass(frame)");
|
wxLogLastError(wxT("RegisterClass(frame)"));
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@@ -330,7 +330,7 @@ bool wxApp::RegisterWindowClasses()
|
|||||||
|
|
||||||
if ( !RegisterClass(&wndclass) )
|
if ( !RegisterClass(&wndclass) )
|
||||||
{
|
{
|
||||||
wxLogLastError("RegisterClass(no redraw frame)");
|
wxLogLastError(wxT("RegisterClass(no redraw frame)"));
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@@ -342,7 +342,7 @@ bool wxApp::RegisterWindowClasses()
|
|||||||
|
|
||||||
if ( !RegisterClass(&wndclass) )
|
if ( !RegisterClass(&wndclass) )
|
||||||
{
|
{
|
||||||
wxLogLastError("RegisterClass(MDI parent)");
|
wxLogLastError(wxT("RegisterClass(MDI parent)"));
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@@ -353,7 +353,7 @@ bool wxApp::RegisterWindowClasses()
|
|||||||
|
|
||||||
if ( !RegisterClass(&wndclass) )
|
if ( !RegisterClass(&wndclass) )
|
||||||
{
|
{
|
||||||
wxLogLastError("RegisterClass(no redraw MDI parent frame)");
|
wxLogLastError(wxT("RegisterClass(no redraw MDI parent frame)"));
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@@ -365,7 +365,7 @@ bool wxApp::RegisterWindowClasses()
|
|||||||
|
|
||||||
if ( !RegisterClass(&wndclass) )
|
if ( !RegisterClass(&wndclass) )
|
||||||
{
|
{
|
||||||
wxLogLastError("RegisterClass(MDI child)");
|
wxLogLastError(wxT("RegisterClass(MDI child)"));
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@@ -376,7 +376,7 @@ bool wxApp::RegisterWindowClasses()
|
|||||||
|
|
||||||
if ( !RegisterClass(&wndclass) )
|
if ( !RegisterClass(&wndclass) )
|
||||||
{
|
{
|
||||||
wxLogLastError("RegisterClass(no redraw MDI child)");
|
wxLogLastError(wxT("RegisterClass(no redraw MDI child)"));
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@@ -388,7 +388,7 @@ bool wxApp::RegisterWindowClasses()
|
|||||||
|
|
||||||
if ( !RegisterClass(&wndclass) )
|
if ( !RegisterClass(&wndclass) )
|
||||||
{
|
{
|
||||||
wxLogLastError("RegisterClass(panel)");
|
wxLogLastError(wxT("RegisterClass(panel)"));
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@@ -399,7 +399,7 @@ bool wxApp::RegisterWindowClasses()
|
|||||||
|
|
||||||
if ( !RegisterClass(&wndclass) )
|
if ( !RegisterClass(&wndclass) )
|
||||||
{
|
{
|
||||||
wxLogLastError("RegisterClass(no redraw panel)");
|
wxLogLastError(wxT("RegisterClass(no redraw panel)"));
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@@ -410,7 +410,7 @@ bool wxApp::RegisterWindowClasses()
|
|||||||
|
|
||||||
if ( !RegisterClass(&wndclass) )
|
if ( !RegisterClass(&wndclass) )
|
||||||
{
|
{
|
||||||
wxLogLastError("RegisterClass(canvas)");
|
wxLogLastError(wxT("RegisterClass(canvas)"));
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@@ -419,7 +419,7 @@ bool wxApp::RegisterWindowClasses()
|
|||||||
wndclass.style = styleNoRedraw;
|
wndclass.style = styleNoRedraw;
|
||||||
if ( !RegisterClass(&wndclass) )
|
if ( !RegisterClass(&wndclass) )
|
||||||
{
|
{
|
||||||
wxLogLastError("RegisterClass(no redraw canvas)");
|
wxLogLastError(wxT("RegisterClass(no redraw canvas)"));
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@@ -750,8 +750,7 @@ int wxEntry(WXHINSTANCE hInstance,
|
|||||||
|
|
||||||
// using wxLog would be unsafe here
|
// using wxLog would be unsafe here
|
||||||
::MessageBox(NULL,
|
::MessageBox(NULL,
|
||||||
_("Unrecoverable program error detected: "
|
_("Unrecoverable program error detected: the application will terminate."),
|
||||||
" the application will terminate."),
|
|
||||||
_("Fatal Error"),
|
_("Fatal Error"),
|
||||||
MB_APPLMODAL | MB_ICONSTOP | MB_OK);
|
MB_APPLMODAL | MB_ICONSTOP | MB_OK);
|
||||||
|
|
||||||
@@ -866,7 +865,7 @@ bool wxApp::DoMessage()
|
|||||||
else if ( rc == -1 )
|
else if ( rc == -1 )
|
||||||
{
|
{
|
||||||
// should never happen, but let's test for it nevertheless
|
// should never happen, but let's test for it nevertheless
|
||||||
wxLogLastError("GetMessage");
|
wxLogLastError(wxT("GetMessage"));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -1315,7 +1314,7 @@ void wxWakeUpIdle()
|
|||||||
if ( !::PostMessage(GetHwndOf(topWindow), WM_NULL, 0, 0) )
|
if ( !::PostMessage(GetHwndOf(topWindow), WM_NULL, 0, 0) )
|
||||||
{
|
{
|
||||||
// should never happen
|
// should never happen
|
||||||
wxLogLastError("PostMessage(WM_NULL)");
|
wxLogLastError(wxT("PostMessage(WM_NULL)"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -86,7 +86,7 @@ void wxBitmapRefData::Free()
|
|||||||
{
|
{
|
||||||
if ( !::DeleteObject((HBITMAP)m_hBitmap) )
|
if ( !::DeleteObject((HBITMAP)m_hBitmap) )
|
||||||
{
|
{
|
||||||
wxLogLastError("DeleteObject(hbitmap)");
|
wxLogLastError(wxT("DeleteObject(hbitmap)"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -117,7 +117,7 @@ bool wxBitmap::CopyFromIconOrCursor(const wxGDIImage& icon)
|
|||||||
ICONINFO iconInfo;
|
ICONINFO iconInfo;
|
||||||
if ( !::GetIconInfo(hicon, &iconInfo) )
|
if ( !::GetIconInfo(hicon, &iconInfo) )
|
||||||
{
|
{
|
||||||
wxLogLastError("GetIconInfo");
|
wxLogLastError(wxT("GetIconInfo"));
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@@ -269,7 +269,7 @@ wxBitmap::wxBitmap(const char bits[], int width, int height, int depth)
|
|||||||
HBITMAP hbmp = ::CreateBitmap(width, height, 1, depth, data);
|
HBITMAP hbmp = ::CreateBitmap(width, height, 1, depth, data);
|
||||||
if ( !hbmp )
|
if ( !hbmp )
|
||||||
{
|
{
|
||||||
wxLogLastError("CreateBitmap");
|
wxLogLastError(wxT("CreateBitmap"));
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( data != bits )
|
if ( data != bits )
|
||||||
@@ -326,7 +326,7 @@ bool wxBitmap::Create(int w, int h, int d)
|
|||||||
hbmp = ::CreateBitmap(w, h, 1, d, NULL);
|
hbmp = ::CreateBitmap(w, h, 1, d, NULL);
|
||||||
if ( !hbmp )
|
if ( !hbmp )
|
||||||
{
|
{
|
||||||
wxLogLastError("CreateBitmap");
|
wxLogLastError(wxT("CreateBitmap"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -335,7 +335,7 @@ bool wxBitmap::Create(int w, int h, int d)
|
|||||||
hbmp = ::CreateCompatibleBitmap(dc, w, h);
|
hbmp = ::CreateCompatibleBitmap(dc, w, h);
|
||||||
if ( !hbmp )
|
if ( !hbmp )
|
||||||
{
|
{
|
||||||
wxLogLastError("CreateCompatibleBitmap");
|
wxLogLastError(wxT("CreateCompatibleBitmap"));
|
||||||
}
|
}
|
||||||
|
|
||||||
GetBitmapData()->m_depth = wxDisplayDepth();
|
GetBitmapData()->m_depth = wxDisplayDepth();
|
||||||
@@ -382,8 +382,7 @@ bool wxBitmap::Create(void *data, long type, int width, int height, int depth)
|
|||||||
|
|
||||||
if ( !handler )
|
if ( !handler )
|
||||||
{
|
{
|
||||||
wxLogDebug(wxT("Failed to create bitmap: no bitmap handler for "
|
wxLogDebug(wxT("Failed to create bitmap: no bitmap handler for type %d defined."), type);
|
||||||
"type %d defined."), type);
|
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@@ -653,7 +652,7 @@ bool wxMask::Create(const wxBitmap& bitmap, const wxColour& colour)
|
|||||||
HDC destDC = ::CreateCompatibleDC(NULL);
|
HDC destDC = ::CreateCompatibleDC(NULL);
|
||||||
if ( !srcDC || !destDC )
|
if ( !srcDC || !destDC )
|
||||||
{
|
{
|
||||||
wxLogLastError("CreateCompatibleDC");
|
wxLogLastError(wxT("CreateCompatibleDC"));
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ok = TRUE;
|
bool ok = TRUE;
|
||||||
@@ -661,7 +660,7 @@ bool wxMask::Create(const wxBitmap& bitmap, const wxColour& colour)
|
|||||||
HGDIOBJ hbmpSrcOld = ::SelectObject(srcDC, GetHbitmapOf(bitmap));
|
HGDIOBJ hbmpSrcOld = ::SelectObject(srcDC, GetHbitmapOf(bitmap));
|
||||||
if ( !hbmpSrcOld )
|
if ( !hbmpSrcOld )
|
||||||
{
|
{
|
||||||
wxLogLastError("SelectObject");
|
wxLogLastError(wxT("SelectObject"));
|
||||||
|
|
||||||
ok = FALSE;
|
ok = FALSE;
|
||||||
}
|
}
|
||||||
@@ -669,7 +668,7 @@ bool wxMask::Create(const wxBitmap& bitmap, const wxColour& colour)
|
|||||||
HGDIOBJ hbmpDstOld = ::SelectObject(destDC, (HBITMAP)m_maskBitmap);
|
HGDIOBJ hbmpDstOld = ::SelectObject(destDC, (HBITMAP)m_maskBitmap);
|
||||||
if ( !hbmpDstOld )
|
if ( !hbmpDstOld )
|
||||||
{
|
{
|
||||||
wxLogLastError("SelectObject");
|
wxLogLastError(wxT("SelectObject"));
|
||||||
|
|
||||||
ok = FALSE;
|
ok = FALSE;
|
||||||
}
|
}
|
||||||
@@ -683,7 +682,7 @@ bool wxMask::Create(const wxBitmap& bitmap, const wxColour& colour)
|
|||||||
COLORREF col = GetPixel(srcDC, w, h);
|
COLORREF col = GetPixel(srcDC, w, h);
|
||||||
if ( col == CLR_INVALID )
|
if ( col == CLR_INVALID )
|
||||||
{
|
{
|
||||||
wxLogLastError("GetPixel");
|
wxLogLastError(wxT("GetPixel"));
|
||||||
|
|
||||||
// doesn't make sense to continue
|
// doesn't make sense to continue
|
||||||
ok = FALSE;
|
ok = FALSE;
|
||||||
@@ -843,13 +842,13 @@ extern HBITMAP wxInvertMask(HBITMAP hbmpMask, int w, int h)
|
|||||||
HDC hdcDst = ::CreateCompatibleDC(NULL);
|
HDC hdcDst = ::CreateCompatibleDC(NULL);
|
||||||
if ( !hdcSrc || !hdcDst )
|
if ( !hdcSrc || !hdcDst )
|
||||||
{
|
{
|
||||||
wxLogLastError("CreateCompatibleDC");
|
wxLogLastError(wxT("CreateCompatibleDC"));
|
||||||
}
|
}
|
||||||
|
|
||||||
HBITMAP hbmpInvMask = ::CreateBitmap(w, h, 1, 1, 0);
|
HBITMAP hbmpInvMask = ::CreateBitmap(w, h, 1, 1, 0);
|
||||||
if ( !hbmpInvMask )
|
if ( !hbmpInvMask )
|
||||||
{
|
{
|
||||||
wxLogLastError("CreateBitmap");
|
wxLogLastError(wxT("CreateBitmap"));
|
||||||
}
|
}
|
||||||
|
|
||||||
::SelectObject(hdcSrc, hbmpMask);
|
::SelectObject(hdcSrc, hbmpMask);
|
||||||
@@ -858,7 +857,7 @@ extern HBITMAP wxInvertMask(HBITMAP hbmpMask, int w, int h)
|
|||||||
hdcSrc, 0, 0,
|
hdcSrc, 0, 0,
|
||||||
NOTSRCCOPY) )
|
NOTSRCCOPY) )
|
||||||
{
|
{
|
||||||
wxLogLastError("BitBlt");
|
wxLogLastError(wxT("BitBlt"));
|
||||||
}
|
}
|
||||||
|
|
||||||
::DeleteDC(hdcSrc);
|
::DeleteDC(hdcSrc);
|
||||||
|
@@ -46,7 +46,11 @@
|
|||||||
#ifdef __WIN16__
|
#ifdef __WIN16__
|
||||||
#define CALL_CARET_API(api, args) api args
|
#define CALL_CARET_API(api, args) api args
|
||||||
#else // Win32
|
#else // Win32
|
||||||
|
#ifdef _UNICODE
|
||||||
#define CALL_CARET_API(api, args) if ( !api args ) wxLogLastError(#api)
|
#define CALL_CARET_API(api, args) if ( !api args ) wxLogLastError(#api)
|
||||||
|
#else
|
||||||
|
#define CALL_CARET_API(api, args)
|
||||||
|
#endif
|
||||||
#endif // Win16/32
|
#endif // Win16/32
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
@@ -63,7 +67,7 @@ int wxCaretBase::GetBlinkTime()
|
|||||||
int blinkTime = ::GetCaretBlinkTime();
|
int blinkTime = ::GetCaretBlinkTime();
|
||||||
if ( !blinkTime )
|
if ( !blinkTime )
|
||||||
{
|
{
|
||||||
wxLogLastError("GetCaretBlinkTime");
|
wxLogLastError(wxT("GetCaretBlinkTime"));
|
||||||
}
|
}
|
||||||
|
|
||||||
return blinkTime;
|
return blinkTime;
|
||||||
|
@@ -102,7 +102,7 @@ int wxChoice::DoAppend(const wxString& item)
|
|||||||
int n = (int)SendMessage(GetHwnd(), CB_ADDSTRING, 0, (LONG)item.c_str());
|
int n = (int)SendMessage(GetHwnd(), CB_ADDSTRING, 0, (LONG)item.c_str());
|
||||||
if ( n == CB_ERR )
|
if ( n == CB_ERR )
|
||||||
{
|
{
|
||||||
wxLogLastError("SendMessage(CB_ADDSTRING)");
|
wxLogLastError(wxT("SendMessage(CB_ADDSTRING)"));
|
||||||
}
|
}
|
||||||
|
|
||||||
return n;
|
return n;
|
||||||
@@ -201,7 +201,7 @@ wxString wxChoice::GetString(int n) const
|
|||||||
if (len) {
|
if (len) {
|
||||||
if ( ::SendMessage(GetHwnd(), CB_GETLBTEXT, n,
|
if ( ::SendMessage(GetHwnd(), CB_GETLBTEXT, n,
|
||||||
(LPARAM)str.GetWriteBuf(len)) == CB_ERR ) {
|
(LPARAM)str.GetWriteBuf(len)) == CB_ERR ) {
|
||||||
wxLogLastError("SendMessage(CB_GETLBTEXT)");
|
wxLogLastError(wxT("SendMessage(CB_GETLBTEXT)"));
|
||||||
}
|
}
|
||||||
str.UngetWriteBuf();
|
str.UngetWriteBuf();
|
||||||
}
|
}
|
||||||
|
@@ -472,7 +472,7 @@ void wxClipboard::Clear()
|
|||||||
#if wxUSE_OLE_CLIPBOARD
|
#if wxUSE_OLE_CLIPBOARD
|
||||||
if ( FAILED(OleSetClipboard(NULL)) )
|
if ( FAILED(OleSetClipboard(NULL)) )
|
||||||
{
|
{
|
||||||
wxLogLastError("OleSetClipboard(NULL)");
|
wxLogLastError(wxT("OleSetClipboard(NULL)"));
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@@ -482,7 +482,7 @@ bool wxClipboard::Flush()
|
|||||||
#if wxUSE_OLE_CLIPBOARD
|
#if wxUSE_OLE_CLIPBOARD
|
||||||
if ( FAILED(OleFlushClipboard()) )
|
if ( FAILED(OleFlushClipboard()) )
|
||||||
{
|
{
|
||||||
wxLogLastError("OleFlushClipboard");
|
wxLogLastError(wxT("OleFlushClipboard"));
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@@ -303,7 +303,7 @@ void wxDC::DoFloodFill(wxCoord x, wxCoord y, const wxColour& col, int style)
|
|||||||
// * The point is outside the clipping region that is, it is not
|
// * The point is outside the clipping region that is, it is not
|
||||||
// visible on the device.
|
// visible on the device.
|
||||||
//
|
//
|
||||||
wxLogLastError("ExtFloodFill");
|
wxLogLastError(wxT("ExtFloodFill"));
|
||||||
}
|
}
|
||||||
|
|
||||||
CalcBoundingBox(x, y);
|
CalcBoundingBox(x, y);
|
||||||
@@ -958,7 +958,7 @@ void wxDC::DrawAnyText(const wxString& text, wxCoord x, wxCoord y)
|
|||||||
if ( ::TextOut(GetHdc(), XLOG2DEV(x), YLOG2DEV(y),
|
if ( ::TextOut(GetHdc(), XLOG2DEV(x), YLOG2DEV(y),
|
||||||
text.c_str(), text.length()) == 0 )
|
text.c_str(), text.length()) == 0 )
|
||||||
{
|
{
|
||||||
wxLogLastError("TextOut");
|
wxLogLastError(wxT("TextOut"));
|
||||||
}
|
}
|
||||||
|
|
||||||
// restore the old parameters (text foreground colour may be left because
|
// restore the old parameters (text foreground colour may be left because
|
||||||
@@ -991,7 +991,7 @@ void wxDC::DoDrawRotatedText(const wxString& text,
|
|||||||
LOGFONT lf;
|
LOGFONT lf;
|
||||||
if ( ::GetObject(hfont, sizeof(lf), &lf) == 0 )
|
if ( ::GetObject(hfont, sizeof(lf), &lf) == 0 )
|
||||||
{
|
{
|
||||||
wxLogLastError("GetObject(hfont)");
|
wxLogLastError(wxT("GetObject(hfont)"));
|
||||||
}
|
}
|
||||||
|
|
||||||
// GDI wants the angle in tenth of degree
|
// GDI wants the angle in tenth of degree
|
||||||
@@ -1002,7 +1002,7 @@ void wxDC::DoDrawRotatedText(const wxString& text,
|
|||||||
hfont = ::CreateFontIndirect(&lf);
|
hfont = ::CreateFontIndirect(&lf);
|
||||||
if ( !hfont )
|
if ( !hfont )
|
||||||
{
|
{
|
||||||
wxLogLastError("CreateFont");
|
wxLogLastError(wxT("CreateFont"));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -1578,14 +1578,14 @@ bool wxDC::DoBlit(wxCoord xdest, wxCoord ydest,
|
|||||||
if ( !::BitBlt(dc_buffer, 0, 0, (int)width, (int)height,
|
if ( !::BitBlt(dc_buffer, 0, 0, (int)width, (int)height,
|
||||||
GetHdc(), xdest, ydest, SRCCOPY) )
|
GetHdc(), xdest, ydest, SRCCOPY) )
|
||||||
{
|
{
|
||||||
wxLogLastError("BitBlt");
|
wxLogLastError(wxT("BitBlt"));
|
||||||
}
|
}
|
||||||
|
|
||||||
// copy src to buffer using selected raster op
|
// copy src to buffer using selected raster op
|
||||||
if ( !::BitBlt(dc_buffer, 0, 0, (int)width, (int)height,
|
if ( !::BitBlt(dc_buffer, 0, 0, (int)width, (int)height,
|
||||||
GetHdcOf(*source), xsrc, ysrc, dwRop) )
|
GetHdcOf(*source), xsrc, ysrc, dwRop) )
|
||||||
{
|
{
|
||||||
wxLogLastError("BitBlt");
|
wxLogLastError(wxT("BitBlt"));
|
||||||
}
|
}
|
||||||
|
|
||||||
// set masked area in buffer to BLACK (pixel value 0)
|
// set masked area in buffer to BLACK (pixel value 0)
|
||||||
@@ -1594,7 +1594,7 @@ bool wxDC::DoBlit(wxCoord xdest, wxCoord ydest,
|
|||||||
if ( !::BitBlt(dc_buffer, 0, 0, (int)width, (int)height,
|
if ( !::BitBlt(dc_buffer, 0, 0, (int)width, (int)height,
|
||||||
dc_mask, xsrc, ysrc, SRCAND) )
|
dc_mask, xsrc, ysrc, SRCAND) )
|
||||||
{
|
{
|
||||||
wxLogLastError("BitBlt");
|
wxLogLastError(wxT("BitBlt"));
|
||||||
}
|
}
|
||||||
|
|
||||||
// set unmasked area in dest to BLACK
|
// set unmasked area in dest to BLACK
|
||||||
@@ -1603,7 +1603,7 @@ bool wxDC::DoBlit(wxCoord xdest, wxCoord ydest,
|
|||||||
if ( !::BitBlt(GetHdc(), xdest, ydest, (int)width, (int)height,
|
if ( !::BitBlt(GetHdc(), xdest, ydest, (int)width, (int)height,
|
||||||
dc_mask, xsrc, ysrc, SRCAND) )
|
dc_mask, xsrc, ysrc, SRCAND) )
|
||||||
{
|
{
|
||||||
wxLogLastError("BitBlt");
|
wxLogLastError(wxT("BitBlt"));
|
||||||
}
|
}
|
||||||
::SetBkColor(GetHdc(), prevBkCol); // restore colours to original values
|
::SetBkColor(GetHdc(), prevBkCol); // restore colours to original values
|
||||||
::SetTextColor(GetHdc(), prevCol);
|
::SetTextColor(GetHdc(), prevCol);
|
||||||
@@ -1614,7 +1614,7 @@ bool wxDC::DoBlit(wxCoord xdest, wxCoord ydest,
|
|||||||
dc_buffer, 0, 0, SRCPAINT) != 0;
|
dc_buffer, 0, 0, SRCPAINT) != 0;
|
||||||
if ( !success )
|
if ( !success )
|
||||||
{
|
{
|
||||||
wxLogLastError("BitBlt");
|
wxLogLastError(wxT("BitBlt"));
|
||||||
}
|
}
|
||||||
|
|
||||||
// tidy up temporary DCs and bitmap
|
// tidy up temporary DCs and bitmap
|
||||||
@@ -1632,7 +1632,7 @@ bool wxDC::DoBlit(wxCoord xdest, wxCoord ydest,
|
|||||||
GetHdcOf(*source), xsrc, ysrc, dwRop) != 0;
|
GetHdcOf(*source), xsrc, ysrc, dwRop) != 0;
|
||||||
if ( !success )
|
if ( !success )
|
||||||
{
|
{
|
||||||
wxLogLastError("BitBlt");
|
wxLogLastError(wxT("BitBlt"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
::SetTextColor(GetHdc(), old_textground);
|
::SetTextColor(GetHdc(), old_textground);
|
||||||
|
@@ -110,7 +110,7 @@ wxWindowDC::~wxWindowDC()
|
|||||||
|
|
||||||
if ( !::ReleaseDC(GetWinHwnd(m_canvas), GetHdc()) )
|
if ( !::ReleaseDC(GetWinHwnd(m_canvas), GetHdc()) )
|
||||||
{
|
{
|
||||||
wxLogLastError("ReleaseDC");
|
wxLogLastError(wxT("ReleaseDC"));
|
||||||
}
|
}
|
||||||
|
|
||||||
m_hDC = 0;
|
m_hDC = 0;
|
||||||
|
@@ -102,8 +102,7 @@ void wxMemoryDC::SelectObject(const wxBitmap& bitmap)
|
|||||||
// check for whether the bitmap is already selected into a device context
|
// check for whether the bitmap is already selected into a device context
|
||||||
wxCHECK_RET( !bitmap.GetSelectedInto() ||
|
wxCHECK_RET( !bitmap.GetSelectedInto() ||
|
||||||
(bitmap.GetSelectedInto() == this),
|
(bitmap.GetSelectedInto() == this),
|
||||||
wxT("Bitmap is selected in another wxMemoryDC, delete the "
|
wxT("Bitmap is selected in another wxMemoryDC, delete the first wxMemoryDC or use SelectObject(NULL)") );
|
||||||
"first wxMemoryDC or use SelectObject(NULL)") );
|
|
||||||
|
|
||||||
m_selectedBitmap = bitmap;
|
m_selectedBitmap = bitmap;
|
||||||
WXHBITMAP hBmp = m_selectedBitmap.GetHBITMAP();
|
WXHBITMAP hBmp = m_selectedBitmap.GetHBITMAP();
|
||||||
@@ -115,7 +114,7 @@ void wxMemoryDC::SelectObject(const wxBitmap& bitmap)
|
|||||||
|
|
||||||
if ( !hBmp )
|
if ( !hBmp )
|
||||||
{
|
{
|
||||||
wxLogLastError("SelectObject(memDC, bitmap)");
|
wxLogLastError(wxT("SelectObject(memDC, bitmap)"));
|
||||||
|
|
||||||
wxFAIL_MSG(wxT("Couldn't select a bitmap into wxMemoryDC"));
|
wxFAIL_MSG(wxT("Couldn't select a bitmap into wxMemoryDC"));
|
||||||
}
|
}
|
||||||
|
@@ -458,7 +458,7 @@ void wxPrinterDC::DoDrawBitmap(const wxBitmap &bmp,
|
|||||||
bits, info,
|
bits, info,
|
||||||
DIB_RGB_COLORS, SRCCOPY) == GDI_ERROR )
|
DIB_RGB_COLORS, SRCCOPY) == GDI_ERROR )
|
||||||
{
|
{
|
||||||
wxLogLastError("StretchDIBits");
|
wxLogLastError(wxT("StretchDIBits"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -540,7 +540,7 @@ bool wxPrinterDC::DoBlit(wxCoord xdest, wxCoord ydest,
|
|||||||
if ( !::GetDIBits(display, GetHbitmapOf(bmp), 0,
|
if ( !::GetDIBits(display, GetHbitmapOf(bmp), 0,
|
||||||
height, bits, info, DIB_RGB_COLORS) )
|
height, bits, info, DIB_RGB_COLORS) )
|
||||||
{
|
{
|
||||||
wxLogLastError("GetDIBits");
|
wxLogLastError(wxT("GetDIBits"));
|
||||||
|
|
||||||
success = FALSE;
|
success = FALSE;
|
||||||
}
|
}
|
||||||
@@ -556,7 +556,7 @@ bool wxPrinterDC::DoBlit(wxCoord xdest, wxCoord ydest,
|
|||||||
SRCCOPY) != GDI_ERROR;
|
SRCCOPY) != GDI_ERROR;
|
||||||
if ( !success )
|
if ( !success )
|
||||||
{
|
{
|
||||||
wxLogLastError("StretchDIBits");
|
wxLogLastError(wxT("StretchDIBits"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -398,8 +398,7 @@ wxConnectionBase *wxDDEClient::MakeConnection(const wxString& WXUNUSED(host),
|
|||||||
(PCONVCONTEXT)NULL);
|
(PCONVCONTEXT)NULL);
|
||||||
if ( !hConv )
|
if ( !hConv )
|
||||||
{
|
{
|
||||||
DDELogError(wxString::Format(_("Failed to create connection to "
|
DDELogError(wxString::Format(_("Failed to create connection to server '%s' on topic '%s'"),
|
||||||
"server '%s' on topic '%s'"),
|
|
||||||
server.c_str(), topic.c_str()));
|
server.c_str(), topic.c_str()));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@@ -564,7 +564,7 @@ long wxDialog::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lParam)
|
|||||||
SWP_NOSIZE
|
SWP_NOSIZE
|
||||||
) )
|
) )
|
||||||
{
|
{
|
||||||
wxLogLastError("SetWindowPos(SWP_NOACTIVATE)");
|
wxLogLastError(wxT("SetWindowPos(SWP_NOACTIVATE)"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// fall through to process it normally as well
|
// fall through to process it normally as well
|
||||||
|
@@ -347,9 +347,7 @@ wxDialUpManagerMSW::wxDialUpManagerMSW()
|
|||||||
ms_dllRas = wxDllLoader::LoadLibrary("RASAPI32");
|
ms_dllRas = wxDllLoader::LoadLibrary("RASAPI32");
|
||||||
if ( !ms_dllRas )
|
if ( !ms_dllRas )
|
||||||
{
|
{
|
||||||
wxLogError(_("Dial up functions are unavailable because the "
|
wxLogError(_("Dial up functions are unavailable because the remote access service (RAS) is not installed on this machine. Please install it."));
|
||||||
"remote access service (RAS) is not installed "
|
|
||||||
"on this machine. Please install it."));
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -1047,7 +1045,7 @@ bool wxDialUpManagerMSW::EnableAutoCheckOnlineStatus(size_t nSeconds)
|
|||||||
dwSuspendCount = ResumeThread(m_hThread);
|
dwSuspendCount = ResumeThread(m_hThread);
|
||||||
if ( dwSuspendCount == (DWORD)-1 )
|
if ( dwSuspendCount == (DWORD)-1 )
|
||||||
{
|
{
|
||||||
wxLogLastError("ResumeThread(RasThread)");
|
wxLogLastError(wxT("ResumeThread(RasThread)"));
|
||||||
|
|
||||||
ok = FALSE;
|
ok = FALSE;
|
||||||
}
|
}
|
||||||
@@ -1075,7 +1073,7 @@ bool wxDialUpManagerMSW::EnableAutoCheckOnlineStatus(size_t nSeconds)
|
|||||||
);
|
);
|
||||||
if ( !m_data.hEventRas )
|
if ( !m_data.hEventRas )
|
||||||
{
|
{
|
||||||
wxLogLastError("CreateEvent(RasStatus)");
|
wxLogLastError(wxT("CreateEvent(RasStatus)"));
|
||||||
|
|
||||||
ok = FALSE;
|
ok = FALSE;
|
||||||
}
|
}
|
||||||
@@ -1087,7 +1085,7 @@ bool wxDialUpManagerMSW::EnableAutoCheckOnlineStatus(size_t nSeconds)
|
|||||||
m_data.hEventQuit = CreateEvent(NULL, FALSE, FALSE, NULL);
|
m_data.hEventQuit = CreateEvent(NULL, FALSE, FALSE, NULL);
|
||||||
if ( !m_data.hEventQuit )
|
if ( !m_data.hEventQuit )
|
||||||
{
|
{
|
||||||
wxLogLastError("CreateEvent(RasThreadQuit)");
|
wxLogLastError(wxT("CreateEvent(RasThreadQuit)"));
|
||||||
|
|
||||||
CleanUpThreadData();
|
CleanUpThreadData();
|
||||||
|
|
||||||
@@ -1106,7 +1104,7 @@ bool wxDialUpManagerMSW::EnableAutoCheckOnlineStatus(size_t nSeconds)
|
|||||||
(HMENU)NULL, wxGetInstance(), 0);
|
(HMENU)NULL, wxGetInstance(), 0);
|
||||||
if ( !ms_hwndRas )
|
if ( !ms_hwndRas )
|
||||||
{
|
{
|
||||||
wxLogLastError("CreateWindow(RasHiddenWindow)");
|
wxLogLastError(wxT("CreateWindow(RasHiddenWindow)"));
|
||||||
|
|
||||||
CleanUpThreadData();
|
CleanUpThreadData();
|
||||||
|
|
||||||
@@ -1143,7 +1141,7 @@ bool wxDialUpManagerMSW::EnableAutoCheckOnlineStatus(size_t nSeconds)
|
|||||||
|
|
||||||
if ( !m_hThread )
|
if ( !m_hThread )
|
||||||
{
|
{
|
||||||
wxLogLastError("CreateThread(RasStatusThread)");
|
wxLogLastError(wxT("CreateThread(RasStatusThread)"));
|
||||||
|
|
||||||
CleanUpThreadData();
|
CleanUpThreadData();
|
||||||
}
|
}
|
||||||
@@ -1194,7 +1192,7 @@ void wxDialUpManagerMSW::DisableAutoCheckOnlineStatus()
|
|||||||
// we have running secondary thread, it's just enough to suspend it
|
// we have running secondary thread, it's just enough to suspend it
|
||||||
if ( SuspendThread(m_hThread) == (DWORD)-1 )
|
if ( SuspendThread(m_hThread) == (DWORD)-1 )
|
||||||
{
|
{
|
||||||
wxLogLastError("SuspendThread(RasThread)");
|
wxLogLastError(wxT("SuspendThread(RasThread)"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -1252,7 +1250,7 @@ static DWORD wxRasMonitorThread(wxRasThreadData *data)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case WAIT_FAILED:
|
case WAIT_FAILED:
|
||||||
wxLogLastError("WaitForMultipleObjects(RasMonitor)");
|
wxLogLastError(wxT("WaitForMultipleObjects(RasMonitor)"));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -117,7 +117,7 @@ int wxDirDialog::ShowModal()
|
|||||||
|
|
||||||
if ( !ok )
|
if ( !ok )
|
||||||
{
|
{
|
||||||
wxLogLastError("SHGetPathFromIDList");
|
wxLogLastError(wxT("SHGetPathFromIDList"));
|
||||||
|
|
||||||
return wxID_CANCEL;
|
return wxID_CANCEL;
|
||||||
}
|
}
|
||||||
@@ -174,7 +174,7 @@ static void ItemListFree(LPITEMIDLIST pidl)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
wxLogLastError("SHGetMalloc");
|
wxLogLastError(wxT("SHGetMalloc"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -324,7 +324,7 @@ bool wxDragImage::EndDrag()
|
|||||||
|
|
||||||
if ( !::ReleaseCapture() )
|
if ( !::ReleaseCapture() )
|
||||||
{
|
{
|
||||||
wxLogLastError("ReleaseCapture");
|
wxLogLastError(wxT("ReleaseCapture"));
|
||||||
}
|
}
|
||||||
|
|
||||||
::ShowCursor(TRUE);
|
::ShowCursor(TRUE);
|
||||||
|
@@ -143,7 +143,7 @@ wxFontRefData::~wxFontRefData()
|
|||||||
{
|
{
|
||||||
if ( !::DeleteObject((HFONT) m_hFont) )
|
if ( !::DeleteObject((HFONT) m_hFont) )
|
||||||
{
|
{
|
||||||
wxLogLastError("DeleteObject(font)");
|
wxLogLastError(wxT("DeleteObject(font)"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -203,7 +203,7 @@ bool wxFont::RealizeResource()
|
|||||||
M_FONTDATA->m_faceName = lf.lfFaceName;
|
M_FONTDATA->m_faceName = lf.lfFaceName;
|
||||||
if ( !M_FONTDATA->m_hFont )
|
if ( !M_FONTDATA->m_hFont )
|
||||||
{
|
{
|
||||||
wxLogLastError("CreateFont");
|
wxLogLastError(wxT("CreateFont"));
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@@ -217,7 +217,7 @@ bool wxFont::FreeResource(bool force)
|
|||||||
{
|
{
|
||||||
if ( !::DeleteObject((HFONT) M_FONTDATA->m_hFont) )
|
if ( !::DeleteObject((HFONT) M_FONTDATA->m_hFont) )
|
||||||
{
|
{
|
||||||
wxLogLastError("DeleteObject(font)");
|
wxLogLastError(wxT("DeleteObject(font)"));
|
||||||
}
|
}
|
||||||
|
|
||||||
M_FONTDATA->m_hFont = 0;
|
M_FONTDATA->m_hFont = 0;
|
||||||
|
@@ -472,7 +472,7 @@ void wxFrame::InternalSetMenuBar()
|
|||||||
{
|
{
|
||||||
if ( !::SetMenu(GetHwnd(), (HMENU)m_hMenu) )
|
if ( !::SetMenu(GetHwnd(), (HMENU)m_hMenu) )
|
||||||
{
|
{
|
||||||
wxLogLastError("SetMenu");
|
wxLogLastError(wxT("SetMenu"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -330,7 +330,7 @@ bool wxBMPResourceHandler::LoadFile(wxBitmap *bitmap,
|
|||||||
BITMAP bm;
|
BITMAP bm;
|
||||||
if ( !::GetObject(GetHbitmapOf(*bitmap), sizeof(BITMAP), (LPSTR) &bm) )
|
if ( !::GetObject(GetHbitmapOf(*bitmap), sizeof(BITMAP), (LPSTR) &bm) )
|
||||||
{
|
{
|
||||||
wxLogLastError("GetObject(HBITMAP)");
|
wxLogLastError(wxT("GetObject(HBITMAP)"));
|
||||||
}
|
}
|
||||||
|
|
||||||
data->m_width = bm.bmWidth;
|
data->m_width = bm.bmWidth;
|
||||||
@@ -419,9 +419,7 @@ bool wxICOFileHandler::LoadIcon(wxIcon *icon,
|
|||||||
if ( (desiredWidth != -1 && desiredWidth != size.x) ||
|
if ( (desiredWidth != -1 && desiredWidth != size.x) ||
|
||||||
(desiredHeight != -1 && desiredHeight != size.y) )
|
(desiredHeight != -1 && desiredHeight != size.y) )
|
||||||
{
|
{
|
||||||
wxLogDebug(_T("Returning FALSE from wxICOFileHandler::Load because "
|
wxLogDebug(_T("Returning FALSE from wxICOFileHandler::Load because of the size mismatch: actual (%d, %d), requested (%d, %d)"),
|
||||||
"of the size mismatch: actual (%d, %d), "
|
|
||||||
"requested (%d, %d)"),
|
|
||||||
size.x, size.y,
|
size.x, size.y,
|
||||||
desiredWidth, desiredHeight);
|
desiredWidth, desiredHeight);
|
||||||
|
|
||||||
@@ -488,7 +486,7 @@ static wxSize GetHiconSize(HICON hicon)
|
|||||||
ICONINFO info;
|
ICONINFO info;
|
||||||
if ( !::GetIconInfo(hicon, &info) )
|
if ( !::GetIconInfo(hicon, &info) )
|
||||||
{
|
{
|
||||||
wxLogLastError("GetIconInfo");
|
wxLogLastError(wxT("GetIconInfo"));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@@ -49,7 +49,7 @@ wxGLContext::wxGLContext(bool isRGB, wxGLCanvas *win, const wxPalette& palette)
|
|||||||
m_hDC = win->GetHDC();
|
m_hDC = win->GetHDC();
|
||||||
|
|
||||||
m_glContext = wglCreateContext((HDC) m_hDC);
|
m_glContext = wglCreateContext((HDC) m_hDC);
|
||||||
wxCHECK_RET( m_glContext, "Couldn't create OpenGl context" );
|
wxCHECK_RET( m_glContext, wxT("Couldn't create OpenGl context") );
|
||||||
|
|
||||||
wglMakeCurrent((HDC) m_hDC, m_glContext);
|
wglMakeCurrent((HDC) m_hDC, m_glContext);
|
||||||
}
|
}
|
||||||
@@ -65,7 +65,7 @@ wxGLContext::wxGLContext(
|
|||||||
m_hDC = win->GetHDC();
|
m_hDC = win->GetHDC();
|
||||||
|
|
||||||
m_glContext = wglCreateContext((HDC) m_hDC);
|
m_glContext = wglCreateContext((HDC) m_hDC);
|
||||||
wxCHECK_RET( m_glContext, "Couldn't create OpenGl context" );
|
wxCHECK_RET( m_glContext, wxT("Couldn't create OpenGl context") );
|
||||||
|
|
||||||
if( other != 0 )
|
if( other != 0 )
|
||||||
wglShareLists( other->m_glContext, m_glContext );
|
wglShareLists( other->m_glContext, m_glContext );
|
||||||
@@ -262,7 +262,7 @@ bool wxGLCanvas::Create(wxWindow *parent, wxWindowID id,
|
|||||||
|
|
||||||
if ( !RegisterClass(&wndclass) )
|
if ( !RegisterClass(&wndclass) )
|
||||||
{
|
{
|
||||||
wxLogLastError("RegisterClass(wxGLCanvasClass)");
|
wxLogLastError(wxT("RegisterClass(wxGLCanvasClass)"));
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@@ -340,13 +340,13 @@ void wxGLCanvas::SetupPixelFormat() // (HDC hDC)
|
|||||||
|
|
||||||
pixelFormat = ChoosePixelFormat((HDC) m_hDC, &pfd);
|
pixelFormat = ChoosePixelFormat((HDC) m_hDC, &pfd);
|
||||||
if (pixelFormat == 0) {
|
if (pixelFormat == 0) {
|
||||||
MessageBox(WindowFromDC((HDC) m_hDC), "ChoosePixelFormat failed.", "Error",
|
MessageBox(WindowFromDC((HDC) m_hDC), wxT("ChoosePixelFormat failed."), wxT("Error"),
|
||||||
MB_ICONERROR | MB_OK);
|
MB_ICONERROR | MB_OK);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (SetPixelFormat((HDC) m_hDC, pixelFormat, &pfd) != TRUE) {
|
if (SetPixelFormat((HDC) m_hDC, pixelFormat, &pfd) != TRUE) {
|
||||||
MessageBox(WindowFromDC((HDC) m_hDC), "SetPixelFormat failed.", "Error",
|
MessageBox(WindowFromDC((HDC) m_hDC), wxT("SetPixelFormat failed."), wxT("Error"),
|
||||||
MB_ICONERROR | MB_OK);
|
MB_ICONERROR | MB_OK);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
@@ -126,7 +126,7 @@ void wxIcon::CopyFromBitmap(const wxBitmap& bmp)
|
|||||||
HICON hicon = ::CreateIconIndirect(&iconInfo);
|
HICON hicon = ::CreateIconIndirect(&iconInfo);
|
||||||
if ( !hicon )
|
if ( !hicon )
|
||||||
{
|
{
|
||||||
wxLogLastError("CreateIconIndirect");
|
wxLogLastError(wxT("CreateIconIndirect"));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@@ -100,7 +100,7 @@ bool wxImageList::Create(int width, int height, bool mask, int initial)
|
|||||||
initial, 1);
|
initial, 1);
|
||||||
if ( !m_hImageList )
|
if ( !m_hImageList )
|
||||||
{
|
{
|
||||||
wxLogLastError("ImageList_Create()");
|
wxLogLastError(wxT("ImageList_Create()"));
|
||||||
}
|
}
|
||||||
|
|
||||||
return m_hImageList != 0;
|
return m_hImageList != 0;
|
||||||
@@ -200,7 +200,7 @@ bool wxImageList::Replace(int index,
|
|||||||
GetHbitmapOf(bitmap), hbmpMask) != 0;
|
GetHbitmapOf(bitmap), hbmpMask) != 0;
|
||||||
if ( !ok )
|
if ( !ok )
|
||||||
{
|
{
|
||||||
wxLogLastError("ImageList_Add()");
|
wxLogLastError(wxT("ImageList_Add()"));
|
||||||
}
|
}
|
||||||
|
|
||||||
::DeleteObject(hbmpMask);
|
::DeleteObject(hbmpMask);
|
||||||
@@ -215,7 +215,7 @@ bool wxImageList::Replace(int i, const wxIcon& icon)
|
|||||||
bool ok = ImageList_ReplaceIcon(GetHImageList(), i, GetHiconOf(icon)) != 0;
|
bool ok = ImageList_ReplaceIcon(GetHImageList(), i, GetHiconOf(icon)) != 0;
|
||||||
if ( !ok )
|
if ( !ok )
|
||||||
{
|
{
|
||||||
wxLogLastError("ImageList_ReplaceIcon()");
|
wxLogLastError(wxT("ImageList_ReplaceIcon()"));
|
||||||
}
|
}
|
||||||
|
|
||||||
return ok;
|
return ok;
|
||||||
@@ -231,7 +231,7 @@ bool wxImageList::Remove(int index)
|
|||||||
bool ok = ImageList_Remove(GetHImageList(), index) != 0;
|
bool ok = ImageList_Remove(GetHImageList(), index) != 0;
|
||||||
if ( !ok )
|
if ( !ok )
|
||||||
{
|
{
|
||||||
wxLogLastError("ImageList_Remove()");
|
wxLogLastError(wxT("ImageList_Remove()"));
|
||||||
}
|
}
|
||||||
|
|
||||||
return ok;
|
return ok;
|
||||||
@@ -295,7 +295,7 @@ bool wxImageList::Draw(int index,
|
|||||||
bool ok = ImageList_Draw(GetHImageList(), index, hDC, x, y, style) != 0;
|
bool ok = ImageList_Draw(GetHImageList(), index, hDC, x, y, style) != 0;
|
||||||
if ( !ok )
|
if ( !ok )
|
||||||
{
|
{
|
||||||
wxLogLastError("ImageList_Draw()");
|
wxLogLastError(wxT("ImageList_Draw()"));
|
||||||
}
|
}
|
||||||
|
|
||||||
return ok;
|
return ok;
|
||||||
|
@@ -382,7 +382,7 @@ bool wxIniConfig::Write(const wxString& szKey, const wxString& szValue)
|
|||||||
szValue, m_strLocalFilename) != 0;
|
szValue, m_strLocalFilename) != 0;
|
||||||
|
|
||||||
if ( !bOk )
|
if ( !bOk )
|
||||||
wxLogLastError("WritePrivateProfileString");
|
wxLogLastError(wxT("WritePrivateProfileString"));
|
||||||
|
|
||||||
return bOk;
|
return bOk;
|
||||||
}
|
}
|
||||||
@@ -426,7 +426,7 @@ bool wxIniConfig::DeleteEntry(const wxString& szKey, bool bGroupIfEmptyAlso)
|
|||||||
NULL, m_strLocalFilename) != 0;
|
NULL, m_strLocalFilename) != 0;
|
||||||
|
|
||||||
if ( !bOk )
|
if ( !bOk )
|
||||||
wxLogLastError("WritePrivateProfileString");
|
wxLogLastError(wxT("WritePrivateProfileString"));
|
||||||
|
|
||||||
return bOk;
|
return bOk;
|
||||||
}
|
}
|
||||||
@@ -441,7 +441,7 @@ bool wxIniConfig::DeleteGroup(const wxString& szKey)
|
|||||||
NULL, m_strLocalFilename) != 0;
|
NULL, m_strLocalFilename) != 0;
|
||||||
|
|
||||||
if ( !bOk )
|
if ( !bOk )
|
||||||
wxLogLastError("WritePrivateProfileString");
|
wxLogLastError(wxT("WritePrivateProfileString"));
|
||||||
|
|
||||||
return bOk;
|
return bOk;
|
||||||
}
|
}
|
||||||
@@ -460,11 +460,11 @@ bool wxIniConfig::DeleteAll()
|
|||||||
size_t nRc = GetWindowsDirectory(szBuf, WXSIZEOF(szBuf));
|
size_t nRc = GetWindowsDirectory(szBuf, WXSIZEOF(szBuf));
|
||||||
if ( nRc == 0 )
|
if ( nRc == 0 )
|
||||||
{
|
{
|
||||||
wxLogLastError("GetWindowsDirectory");
|
wxLogLastError(wxT("GetWindowsDirectory"));
|
||||||
}
|
}
|
||||||
else if ( nRc > WXSIZEOF(szBuf) )
|
else if ( nRc > WXSIZEOF(szBuf) )
|
||||||
{
|
{
|
||||||
wxFAIL_MSG("buffer is too small for Windows directory.");
|
wxFAIL_MSG(wxT("buffer is too small for Windows directory."));
|
||||||
}
|
}
|
||||||
|
|
||||||
wxString strFile = szBuf;
|
wxString strFile = szBuf;
|
||||||
|
@@ -478,8 +478,7 @@ int wxListBox::GetSelection() const
|
|||||||
{
|
{
|
||||||
wxCHECK_MSG( !HasMultipleSelection(),
|
wxCHECK_MSG( !HasMultipleSelection(),
|
||||||
-1,
|
-1,
|
||||||
wxT("GetSelection() can't be used with multiple-selection "
|
wxT("GetSelection() can't be used with multiple-selection listboxes, use GetSelections() instead.") );
|
||||||
"listboxes, use GetSelections() instead.") );
|
|
||||||
|
|
||||||
return ListBox_GetCurSel(GetHwnd());
|
return ListBox_GetCurSel(GetHwnd());
|
||||||
}
|
}
|
||||||
|
@@ -209,8 +209,7 @@ bool wxListCtrl::DoCreateControl(int x, int y, int w, int h)
|
|||||||
|
|
||||||
if ( !m_hWnd )
|
if ( !m_hWnd )
|
||||||
{
|
{
|
||||||
wxLogError(_("Can't create list control window, check "
|
wxLogError(_("Can't create list control window, check that comctl32.dll is installed."));
|
||||||
"that comctl32.dll is installed."));
|
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@@ -952,7 +951,7 @@ bool wxListCtrl::DeleteAllColumns()
|
|||||||
{
|
{
|
||||||
if ( ListView_DeleteColumn(GetHwnd(), 0) == 0 )
|
if ( ListView_DeleteColumn(GetHwnd(), 0) == 0 )
|
||||||
{
|
{
|
||||||
wxLogLastError("ListView_DeleteColumn");
|
wxLogLastError(wxT("ListView_DeleteColumn"));
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@@ -559,8 +559,7 @@ bool wxMDIParentFrame::HandleCommand(WXWORD id, WXWORD cmd, WXHWND hwnd)
|
|||||||
{
|
{
|
||||||
// this shouldn't happen because it means that our messages are being
|
// this shouldn't happen because it means that our messages are being
|
||||||
// lost (they're not sent to the parent frame nor to the children)
|
// lost (they're not sent to the parent frame nor to the children)
|
||||||
wxFAIL_MSG(wxT("MDI parent frame is not active, "
|
wxFAIL_MSG(wxT("MDI parent frame is not active, yet there is no active MDI child?"));
|
||||||
"yet there is no active MDI child?"));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@@ -1136,7 +1135,7 @@ bool wxMDIClientWindow::CreateClient(wxMDIParentFrame *parent, long style)
|
|||||||
(LPSTR)(LPCLIENTCREATESTRUCT)&ccs);
|
(LPSTR)(LPCLIENTCREATESTRUCT)&ccs);
|
||||||
if ( !m_hWnd )
|
if ( !m_hWnd )
|
||||||
{
|
{
|
||||||
wxLogLastError("CreateWindowEx(MDI client)");
|
wxLogLastError(wxT("CreateWindowEx(MDI client)"));
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@@ -82,7 +82,7 @@ void wxMenu::Init()
|
|||||||
m_hMenu = (WXHMENU)CreatePopupMenu();
|
m_hMenu = (WXHMENU)CreatePopupMenu();
|
||||||
if ( !m_hMenu )
|
if ( !m_hMenu )
|
||||||
{
|
{
|
||||||
wxLogLastError("CreatePopupMenu");
|
wxLogLastError(wxT("CreatePopupMenu"));
|
||||||
}
|
}
|
||||||
|
|
||||||
// if we have a title, insert it in the beginning of the menu
|
// if we have a title, insert it in the beginning of the menu
|
||||||
@@ -103,7 +103,7 @@ wxMenu::~wxMenu()
|
|||||||
{
|
{
|
||||||
if ( !::DestroyMenu(GetHmenu()) )
|
if ( !::DestroyMenu(GetHmenu()) )
|
||||||
{
|
{
|
||||||
wxLogLastError("DestroyMenu");
|
wxLogLastError(wxT("DestroyMenu"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -234,7 +234,7 @@ bool wxMenu::DoInsertOrAppend(wxMenuItem *pItem, size_t pos)
|
|||||||
|
|
||||||
if ( !ok )
|
if ( !ok )
|
||||||
{
|
{
|
||||||
wxLogLastError("Insert or AppendMenu");
|
wxLogLastError(wxT("Insert or AppendMenu"));
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@@ -308,7 +308,7 @@ wxMenuItem *wxMenu::DoRemove(wxMenuItem *item)
|
|||||||
// remove the item from the menu
|
// remove the item from the menu
|
||||||
if ( !::RemoveMenu(GetHmenu(), (UINT)pos, MF_BYPOSITION) )
|
if ( !::RemoveMenu(GetHmenu(), (UINT)pos, MF_BYPOSITION) )
|
||||||
{
|
{
|
||||||
wxLogLastError("RemoveMenu");
|
wxLogLastError(wxT("RemoveMenu"));
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( IsAttached() )
|
if ( IsAttached() )
|
||||||
@@ -361,7 +361,7 @@ void wxMenu::SetTitle(const wxString& label)
|
|||||||
(unsigned)idMenuTitle, m_title) ||
|
(unsigned)idMenuTitle, m_title) ||
|
||||||
!::InsertMenu(hMenu, 1u, MF_BYPOSITION, (unsigned)-1, NULL) )
|
!::InsertMenu(hMenu, 1u, MF_BYPOSITION, (unsigned)-1, NULL) )
|
||||||
{
|
{
|
||||||
wxLogLastError("InsertMenu");
|
wxLogLastError(wxT("InsertMenu"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -373,7 +373,7 @@ void wxMenu::SetTitle(const wxString& label)
|
|||||||
if ( !RemoveMenu(hMenu, 0, MF_BYPOSITION) ||
|
if ( !RemoveMenu(hMenu, 0, MF_BYPOSITION) ||
|
||||||
!RemoveMenu(hMenu, 0, MF_BYPOSITION) )
|
!RemoveMenu(hMenu, 0, MF_BYPOSITION) )
|
||||||
{
|
{
|
||||||
wxLogLastError("RemoveMenu");
|
wxLogLastError(wxT("RemoveMenu"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -383,7 +383,7 @@ void wxMenu::SetTitle(const wxString& label)
|
|||||||
MF_BYPOSITION | MF_STRING,
|
MF_BYPOSITION | MF_STRING,
|
||||||
(unsigned)idMenuTitle, m_title) )
|
(unsigned)idMenuTitle, m_title) )
|
||||||
{
|
{
|
||||||
wxLogLastError("ModifyMenu");
|
wxLogLastError(wxT("ModifyMenu"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -399,7 +399,7 @@ void wxMenu::SetTitle(const wxString& label)
|
|||||||
|
|
||||||
if ( !SetMenuItemInfo(hMenu, (unsigned)idMenuTitle, FALSE, &mii) )
|
if ( !SetMenuItemInfo(hMenu, (unsigned)idMenuTitle, FALSE, &mii) )
|
||||||
{
|
{
|
||||||
wxLogLastError("SetMenuItemInfo");
|
wxLogLastError(wxT("SetMenuItemInfo"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif // Win32
|
#endif // Win32
|
||||||
@@ -546,7 +546,7 @@ WXHMENU wxMenuBar::Create()
|
|||||||
|
|
||||||
if ( !m_hMenu )
|
if ( !m_hMenu )
|
||||||
{
|
{
|
||||||
wxLogLastError("CreateMenu");
|
wxLogLastError(wxT("CreateMenu"));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -557,7 +557,7 @@ WXHMENU wxMenuBar::Create()
|
|||||||
(UINT)m_menus[i]->GetHMenu(),
|
(UINT)m_menus[i]->GetHMenu(),
|
||||||
m_titles[i]) )
|
m_titles[i]) )
|
||||||
{
|
{
|
||||||
wxLogLastError("AppendMenu");
|
wxLogLastError(wxT("AppendMenu"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -618,7 +618,7 @@ void wxMenuBar::SetLabelTop(size_t pos, const wxString& label)
|
|||||||
if ( ::ModifyMenu(GetHmenu(), pos, MF_BYPOSITION | MF_STRING | flagsOld,
|
if ( ::ModifyMenu(GetHmenu(), pos, MF_BYPOSITION | MF_STRING | flagsOld,
|
||||||
id, label) == (int)0xFFFFFFFF )
|
id, label) == (int)0xFFFFFFFF )
|
||||||
{
|
{
|
||||||
wxLogLastError("ModifyMenu");
|
wxLogLastError(wxT("ModifyMenu"));
|
||||||
}
|
}
|
||||||
|
|
||||||
Refresh();
|
Refresh();
|
||||||
@@ -648,14 +648,14 @@ wxMenu *wxMenuBar::Replace(size_t pos, wxMenu *menu, const wxString& title)
|
|||||||
// can't use ModifyMenu() because it deletes the submenu it replaces
|
// can't use ModifyMenu() because it deletes the submenu it replaces
|
||||||
if ( !::RemoveMenu(GetHmenu(), (UINT)pos, MF_BYPOSITION) )
|
if ( !::RemoveMenu(GetHmenu(), (UINT)pos, MF_BYPOSITION) )
|
||||||
{
|
{
|
||||||
wxLogLastError("RemoveMenu");
|
wxLogLastError(wxT("RemoveMenu"));
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( !::InsertMenu(GetHmenu(), (UINT)pos,
|
if ( !::InsertMenu(GetHmenu(), (UINT)pos,
|
||||||
MF_BYPOSITION | MF_POPUP | MF_STRING,
|
MF_BYPOSITION | MF_POPUP | MF_STRING,
|
||||||
(UINT)GetHmenuOf(menu), title) )
|
(UINT)GetHmenuOf(menu), title) )
|
||||||
{
|
{
|
||||||
wxLogLastError("InsertMenu");
|
wxLogLastError(wxT("InsertMenu"));
|
||||||
}
|
}
|
||||||
|
|
||||||
#if wxUSE_ACCEL
|
#if wxUSE_ACCEL
|
||||||
@@ -687,7 +687,7 @@ bool wxMenuBar::Insert(size_t pos, wxMenu *menu, const wxString& title)
|
|||||||
MF_BYPOSITION | MF_POPUP | MF_STRING,
|
MF_BYPOSITION | MF_POPUP | MF_STRING,
|
||||||
(UINT)GetHmenuOf(menu), title) )
|
(UINT)GetHmenuOf(menu), title) )
|
||||||
{
|
{
|
||||||
wxLogLastError("InsertMenu");
|
wxLogLastError(wxT("InsertMenu"));
|
||||||
}
|
}
|
||||||
|
|
||||||
#if wxUSE_ACCEL
|
#if wxUSE_ACCEL
|
||||||
@@ -748,7 +748,7 @@ wxMenu *wxMenuBar::Remove(size_t pos)
|
|||||||
{
|
{
|
||||||
if ( !::RemoveMenu(GetHmenu(), (UINT)pos, MF_BYPOSITION) )
|
if ( !::RemoveMenu(GetHmenu(), (UINT)pos, MF_BYPOSITION) )
|
||||||
{
|
{
|
||||||
wxLogLastError("RemoveMenu");
|
wxLogLastError(wxT("RemoveMenu"));
|
||||||
}
|
}
|
||||||
|
|
||||||
menu->Detach();
|
menu->Detach();
|
||||||
|
@@ -173,7 +173,7 @@ void wxMenuItem::Enable(bool enable)
|
|||||||
(enable ? MF_ENABLED : MF_GRAYED));
|
(enable ? MF_ENABLED : MF_GRAYED));
|
||||||
|
|
||||||
if ( rc == -1 ) {
|
if ( rc == -1 ) {
|
||||||
wxLogLastError("EnableMenuItem");
|
wxLogLastError(wxT("EnableMenuItem"));
|
||||||
}
|
}
|
||||||
|
|
||||||
wxMenuItemBase::Enable(enable);
|
wxMenuItemBase::Enable(enable);
|
||||||
@@ -192,7 +192,7 @@ void wxMenuItem::Check(bool check)
|
|||||||
(check ? MF_CHECKED : MF_UNCHECKED));
|
(check ? MF_CHECKED : MF_UNCHECKED));
|
||||||
|
|
||||||
if ( rc == -1 ) {
|
if ( rc == -1 ) {
|
||||||
wxLogLastError("CheckMenuItem");
|
wxLogLastError(wxT("CheckMenuItem"));
|
||||||
}
|
}
|
||||||
|
|
||||||
wxMenuItemBase::Check(check);
|
wxMenuItemBase::Check(check);
|
||||||
@@ -218,7 +218,7 @@ void wxMenuItem::SetText(const wxString& text)
|
|||||||
UINT flagsOld = ::GetMenuState(hMenu, id, MF_BYCOMMAND);
|
UINT flagsOld = ::GetMenuState(hMenu, id, MF_BYCOMMAND);
|
||||||
if ( flagsOld == 0xFFFFFFFF )
|
if ( flagsOld == 0xFFFFFFFF )
|
||||||
{
|
{
|
||||||
wxLogLastError("GetMenuState");
|
wxLogLastError(wxT("GetMenuState"));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@@ -317,7 +317,7 @@ STDMETHODIMP wxIDataObject::GetData(FORMATETC *pformatetcIn, STGMEDIUM *pmedium)
|
|||||||
pmedium->hGlobal = GlobalAlloc(GMEM_MOVEABLE | GMEM_SHARE,
|
pmedium->hGlobal = GlobalAlloc(GMEM_MOVEABLE | GMEM_SHARE,
|
||||||
sizeof(METAFILEPICT));
|
sizeof(METAFILEPICT));
|
||||||
if ( !pmedium->hGlobal ) {
|
if ( !pmedium->hGlobal ) {
|
||||||
wxLogLastError("GlobalAlloc");
|
wxLogLastError(wxT("GlobalAlloc"));
|
||||||
return E_OUTOFMEMORY;
|
return E_OUTOFMEMORY;
|
||||||
}
|
}
|
||||||
pmedium->tymed = TYMED_MFPICT;
|
pmedium->tymed = TYMED_MFPICT;
|
||||||
@@ -341,7 +341,7 @@ STDMETHODIMP wxIDataObject::GetData(FORMATETC *pformatetcIn, STGMEDIUM *pmedium)
|
|||||||
|
|
||||||
HGLOBAL hGlobal = GlobalAlloc(GMEM_MOVEABLE | GMEM_SHARE, size);
|
HGLOBAL hGlobal = GlobalAlloc(GMEM_MOVEABLE | GMEM_SHARE, size);
|
||||||
if ( hGlobal == NULL ) {
|
if ( hGlobal == NULL ) {
|
||||||
wxLogLastError("GlobalAlloc");
|
wxLogLastError(wxT("GlobalAlloc"));
|
||||||
return E_OUTOFMEMORY;
|
return E_OUTOFMEMORY;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -457,7 +457,7 @@ STDMETHODIMP wxIDataObject::SetData(FORMATETC *pformatetc,
|
|||||||
// copy data
|
// copy data
|
||||||
void *pBuf = GlobalLock(pmedium->hGlobal);
|
void *pBuf = GlobalLock(pmedium->hGlobal);
|
||||||
if ( pBuf == NULL ) {
|
if ( pBuf == NULL ) {
|
||||||
wxLogLastError("GlobalLock");
|
wxLogLastError(wxT("GlobalLock"));
|
||||||
|
|
||||||
return E_OUTOFMEMORY;
|
return E_OUTOFMEMORY;
|
||||||
}
|
}
|
||||||
@@ -691,31 +691,31 @@ void wxDataObject::SetAutoDelete()
|
|||||||
|
|
||||||
#ifdef __WXDEBUG__
|
#ifdef __WXDEBUG__
|
||||||
|
|
||||||
const char *wxDataObject::GetFormatName(wxDataFormat format)
|
const wxChar *wxDataObject::GetFormatName(wxDataFormat format)
|
||||||
{
|
{
|
||||||
// case 'xxx' is not a valid value for switch of enum 'wxDataFormat'
|
// case 'xxx' is not a valid value for switch of enum 'wxDataFormat'
|
||||||
#ifdef __VISUALC__
|
#ifdef __VISUALC__
|
||||||
#pragma warning(disable:4063)
|
#pragma warning(disable:4063)
|
||||||
#endif // VC++
|
#endif // VC++
|
||||||
|
|
||||||
static char s_szBuf[256];
|
static wxChar s_szBuf[256];
|
||||||
switch ( format ) {
|
switch ( format ) {
|
||||||
case CF_TEXT: return "CF_TEXT";
|
case CF_TEXT: return wxT("CF_TEXT");
|
||||||
case CF_BITMAP: return "CF_BITMAP";
|
case CF_BITMAP: return wxT("CF_BITMAP");
|
||||||
case CF_METAFILEPICT: return "CF_METAFILEPICT";
|
case CF_METAFILEPICT: return wxT("CF_METAFILEPICT");
|
||||||
case CF_SYLK: return "CF_SYLK";
|
case CF_SYLK: return wxT("CF_SYLK");
|
||||||
case CF_DIF: return "CF_DIF";
|
case CF_DIF: return wxT("CF_DIF");
|
||||||
case CF_TIFF: return "CF_TIFF";
|
case CF_TIFF: return wxT("CF_TIFF");
|
||||||
case CF_OEMTEXT: return "CF_OEMTEXT";
|
case CF_OEMTEXT: return wxT("CF_OEMTEXT");
|
||||||
case CF_DIB: return "CF_DIB";
|
case CF_DIB: return wxT("CF_DIB");
|
||||||
case CF_PALETTE: return "CF_PALETTE";
|
case CF_PALETTE: return wxT("CF_PALETTE");
|
||||||
case CF_PENDATA: return "CF_PENDATA";
|
case CF_PENDATA: return wxT("CF_PENDATA");
|
||||||
case CF_RIFF: return "CF_RIFF";
|
case CF_RIFF: return wxT("CF_RIFF");
|
||||||
case CF_WAVE: return "CF_WAVE";
|
case CF_WAVE: return wxT("CF_WAVE");
|
||||||
case CF_UNICODETEXT: return "CF_UNICODETEXT";
|
case CF_UNICODETEXT: return wxT("CF_UNICODETEXT");
|
||||||
case CF_ENHMETAFILE: return "CF_ENHMETAFILE";
|
case CF_ENHMETAFILE: return wxT("CF_ENHMETAFILE");
|
||||||
case CF_HDROP: return "CF_HDROP";
|
case CF_HDROP: return wxT("CF_HDROP");
|
||||||
case CF_LOCALE: return "CF_LOCALE";
|
case CF_LOCALE: return wxT("CF_LOCALE");
|
||||||
|
|
||||||
default:
|
default:
|
||||||
if ( !::GetClipboardFormatName(format, s_szBuf, WXSIZEOF(s_szBuf)) )
|
if ( !::GetClipboardFormatName(format, s_szBuf, WXSIZEOF(s_szBuf)) )
|
||||||
@@ -792,7 +792,7 @@ bool wxBitmapDataObject2::SetData(size_t WXUNUSED(len), const void *pBuf)
|
|||||||
BITMAP bmp;
|
BITMAP bmp;
|
||||||
if ( !GetObject(hbmp, sizeof(BITMAP), &bmp) )
|
if ( !GetObject(hbmp, sizeof(BITMAP), &bmp) )
|
||||||
{
|
{
|
||||||
wxLogLastError("GetObject(HBITMAP)");
|
wxLogLastError(wxT("GetObject(HBITMAP)"));
|
||||||
}
|
}
|
||||||
|
|
||||||
wxBitmap bitmap(bmp.bmWidth, bmp.bmHeight, bmp.bmPlanes);
|
wxBitmap bitmap(bmp.bmWidth, bmp.bmHeight, bmp.bmPlanes);
|
||||||
@@ -827,7 +827,7 @@ size_t wxBitmapDataObject::GetDataSize(const wxDataFormat& format) const
|
|||||||
if ( !GetDIBits(hdc, (HBITMAP)m_bitmap.GetHBITMAP(), 0, 0,
|
if ( !GetDIBits(hdc, (HBITMAP)m_bitmap.GetHBITMAP(), 0, 0,
|
||||||
NULL, &bi, DIB_RGB_COLORS) )
|
NULL, &bi, DIB_RGB_COLORS) )
|
||||||
{
|
{
|
||||||
wxLogLastError("GetDIBits(NULL)");
|
wxLogLastError(wxT("GetDIBits(NULL)"));
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -860,7 +860,7 @@ bool wxBitmapDataObject::GetDataHere(const wxDataFormat& format,
|
|||||||
BITMAPINFO *pbi = (BITMAPINFO *)pBuf;
|
BITMAPINFO *pbi = (BITMAPINFO *)pBuf;
|
||||||
if ( !GetDIBits(hdc, hbmp, 0, 0, NULL, pbi, DIB_RGB_COLORS) )
|
if ( !GetDIBits(hdc, hbmp, 0, 0, NULL, pbi, DIB_RGB_COLORS) )
|
||||||
{
|
{
|
||||||
wxLogLastError("GetDIBits(NULL)");
|
wxLogLastError(wxT("GetDIBits(NULL)"));
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -869,7 +869,7 @@ bool wxBitmapDataObject::GetDataHere(const wxDataFormat& format,
|
|||||||
if ( !GetDIBits(hdc, hbmp, 0, pbi->bmiHeader.biHeight, pbi + 1,
|
if ( !GetDIBits(hdc, hbmp, 0, pbi->bmiHeader.biHeight, pbi + 1,
|
||||||
pbi, DIB_RGB_COLORS) )
|
pbi, DIB_RGB_COLORS) )
|
||||||
{
|
{
|
||||||
wxLogLastError("GetDIBits");
|
wxLogLastError(wxT("GetDIBits"));
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@@ -899,7 +899,7 @@ bool wxBitmapDataObject::SetData(const wxDataFormat& format,
|
|||||||
pbmi + 1, pbmi, DIB_RGB_COLORS);
|
pbmi + 1, pbmi, DIB_RGB_COLORS);
|
||||||
if ( !hbmp )
|
if ( !hbmp )
|
||||||
{
|
{
|
||||||
wxLogLastError("CreateDIBitmap");
|
wxLogLastError(wxT("CreateDIBitmap"));
|
||||||
}
|
}
|
||||||
|
|
||||||
m_bitmap.SetWidth(pbmih->biWidth);
|
m_bitmap.SetWidth(pbmih->biWidth);
|
||||||
@@ -913,7 +913,7 @@ bool wxBitmapDataObject::SetData(const wxDataFormat& format,
|
|||||||
BITMAP bmp;
|
BITMAP bmp;
|
||||||
if ( !GetObject(hbmp, sizeof(BITMAP), &bmp) )
|
if ( !GetObject(hbmp, sizeof(BITMAP), &bmp) )
|
||||||
{
|
{
|
||||||
wxLogLastError("GetObject(HBITMAP)");
|
wxLogLastError(wxT("GetObject(HBITMAP)"));
|
||||||
}
|
}
|
||||||
|
|
||||||
m_bitmap.SetWidth(bmp.bmWidth);
|
m_bitmap.SetWidth(bmp.bmWidth);
|
||||||
@@ -1087,7 +1087,7 @@ size_t wxConvertBitmapToDIB(LPBITMAPINFO pbi, const wxBitmap& bitmap)
|
|||||||
HBITMAP hbmp = (HBITMAP)bitmap.GetHBITMAP();
|
HBITMAP hbmp = (HBITMAP)bitmap.GetHBITMAP();
|
||||||
if ( !GetObject(hbmp, sizeof(bm), &bm) )
|
if ( !GetObject(hbmp, sizeof(bm), &bm) )
|
||||||
{
|
{
|
||||||
wxLogLastError("GetObject(bitmap)");
|
wxLogLastError(wxT("GetObject(bitmap)"));
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -1125,7 +1125,7 @@ size_t wxConvertBitmapToDIB(LPBITMAPINFO pbi, const wxBitmap& bitmap)
|
|||||||
ScreenHDC hdc;
|
ScreenHDC hdc;
|
||||||
if ( !GetDIBits(hdc, hbmp, 0, bi.biHeight, NULL, pbi, DIB_RGB_COLORS) )
|
if ( !GetDIBits(hdc, hbmp, 0, bi.biHeight, NULL, pbi, DIB_RGB_COLORS) )
|
||||||
{
|
{
|
||||||
wxLogLastError("GetDIBits(NULL)");
|
wxLogLastError(wxT("GetDIBits(NULL)"));
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -1140,7 +1140,7 @@ size_t wxConvertBitmapToDIB(LPBITMAPINFO pbi, const wxBitmap& bitmap)
|
|||||||
void *image = (char *)pbi + dwLen;
|
void *image = (char *)pbi + dwLen;
|
||||||
if ( !GetDIBits(hdc, hbmp, 0, bi.biHeight, image, pbi, DIB_RGB_COLORS) )
|
if ( !GetDIBits(hdc, hbmp, 0, bi.biHeight, image, pbi, DIB_RGB_COLORS) )
|
||||||
{
|
{
|
||||||
wxLogLastError("GetDIBits");
|
wxLogLastError(wxT("GetDIBits"));
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -1163,7 +1163,7 @@ wxBitmap wxConvertDIBToBitmap(const LPBITMAPINFO pbmi)
|
|||||||
image, pbmi, DIB_RGB_COLORS);
|
image, pbmi, DIB_RGB_COLORS);
|
||||||
if ( !hbmp )
|
if ( !hbmp )
|
||||||
{
|
{
|
||||||
wxLogLastError("CreateDIBitmap");
|
wxLogLastError(wxT("CreateDIBitmap"));
|
||||||
}
|
}
|
||||||
|
|
||||||
wxBitmap bitmap(pbmih->biWidth, pbmih->biHeight, pbmih->biBitCount);
|
wxBitmap bitmap(pbmih->biWidth, pbmih->biHeight, pbmih->biBitCount);
|
||||||
|
@@ -161,7 +161,7 @@ STDMETHODIMP wxIDropTarget::DragEnter(IDataObject *pIDataSource,
|
|||||||
// we need client coordinates to pass to wxWin functions
|
// we need client coordinates to pass to wxWin functions
|
||||||
if ( !ScreenToClient(m_hwnd, (POINT *)&pt) )
|
if ( !ScreenToClient(m_hwnd, (POINT *)&pt) )
|
||||||
{
|
{
|
||||||
wxLogLastError("ScreenToClient");
|
wxLogLastError(wxT("ScreenToClient"));
|
||||||
}
|
}
|
||||||
|
|
||||||
// give some visual feedback
|
// give some visual feedback
|
||||||
@@ -201,7 +201,7 @@ STDMETHODIMP wxIDropTarget::DragOver(DWORD grfKeyState,
|
|||||||
// we need client coordinates to pass to wxWin functions
|
// we need client coordinates to pass to wxWin functions
|
||||||
if ( !ScreenToClient(m_hwnd, (POINT *)&pt) )
|
if ( !ScreenToClient(m_hwnd, (POINT *)&pt) )
|
||||||
{
|
{
|
||||||
wxLogLastError("ScreenToClient");
|
wxLogLastError(wxT("ScreenToClient"));
|
||||||
}
|
}
|
||||||
|
|
||||||
*pdwEffect = ConvertDragResultToEffect(
|
*pdwEffect = ConvertDragResultToEffect(
|
||||||
@@ -254,7 +254,7 @@ STDMETHODIMP wxIDropTarget::Drop(IDataObject *pIDataSource,
|
|||||||
// we need client coordinates to pass to wxWin functions
|
// we need client coordinates to pass to wxWin functions
|
||||||
if ( !ScreenToClient(m_hwnd, (POINT *)&pt) )
|
if ( !ScreenToClient(m_hwnd, (POINT *)&pt) )
|
||||||
{
|
{
|
||||||
wxLogLastError("ScreenToClient");
|
wxLogLastError(wxT("ScreenToClient"));
|
||||||
}
|
}
|
||||||
|
|
||||||
// first ask the drop target if it wants data
|
// first ask the drop target if it wants data
|
||||||
@@ -381,11 +381,11 @@ bool wxDropTarget::GetData()
|
|||||||
rc = TRUE;
|
rc = TRUE;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
wxLogLastError("IDataObject::SetData()");
|
wxLogLastError(wxT("IDataObject::SetData()"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
wxLogLastError("IDataObject::GetData()");
|
wxLogLastError(wxT("IDataObject::GetData()"));
|
||||||
}
|
}
|
||||||
|
|
||||||
return rc;
|
return rc;
|
||||||
|
@@ -171,19 +171,19 @@ const char *GetIidName(REFIID riid)
|
|||||||
return s_uuid;
|
return s_uuid;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxLogQueryInterface(const char *szInterface, REFIID riid)
|
void wxLogQueryInterface(const wxChar *szInterface, REFIID riid)
|
||||||
{
|
{
|
||||||
wxLogTrace("%s::QueryInterface (iid = %s)", szInterface, GetIidName(riid));
|
wxLogTrace(wxT("%s::QueryInterface (iid = %s)"), szInterface, GetIidName(riid));
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxLogAddRef(const char *szInterface, ULONG cRef)
|
void wxLogAddRef(const wxChar *szInterface, ULONG cRef)
|
||||||
{
|
{
|
||||||
wxLogTrace("After %s::AddRef: m_cRef = %d", szInterface, cRef + 1);
|
wxLogTrace(wxT("After %s::AddRef: m_cRef = %d"), szInterface, cRef + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxLogRelease(const char *szInterface, ULONG cRef)
|
void wxLogRelease(const wxChar *szInterface, ULONG cRef)
|
||||||
{
|
{
|
||||||
wxLogTrace("After %s::Release: m_cRef = %d", szInterface, cRef - 1);
|
wxLogTrace(wxT("After %s::Release: m_cRef = %d"), szInterface, cRef - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
#elif defined(__WXDEBUG__) && defined(__VISUALC__) && (__VISUALC__ <= 1000)
|
#elif defined(__WXDEBUG__) && defined(__VISUALC__) && (__VISUALC__ <= 1000)
|
||||||
|
@@ -165,8 +165,7 @@ void Uuid::UuidToCForm()
|
|||||||
if ( m_pszCForm == NULL )
|
if ( m_pszCForm == NULL )
|
||||||
m_pszCForm = new wxChar[UUID_CSTRLEN];
|
m_pszCForm = new wxChar[UUID_CSTRLEN];
|
||||||
|
|
||||||
wsprintf(m_pszCForm, wxT("0x%8.8X,0x%4.4X,0x%4.4X,0x%2.2X,0x2.2%X,"
|
wsprintf(m_pszCForm, wxT("0x%8.8X,0x%4.4X,0x%4.4X,0x%2.2X,0x2.2%X,0x2.2%X,0x2.2%X,0x2.2%X,0x2.2%X,0x2.2%X,0x2.2%X"),
|
||||||
"0x2.2%X,0x2.2%X,0x2.2%X,0x2.2%X,0x2.2%X,0x2.2%X"),
|
|
||||||
m_uuid.Data1, m_uuid.Data2, m_uuid.Data3,
|
m_uuid.Data1, m_uuid.Data2, m_uuid.Data3,
|
||||||
m_uuid.Data4[1], m_uuid.Data4[2], m_uuid.Data4[3], m_uuid.Data4[4],
|
m_uuid.Data4[1], m_uuid.Data4[2], m_uuid.Data4[3], m_uuid.Data4[4],
|
||||||
m_uuid.Data4[5], m_uuid.Data4[6], m_uuid.Data4[7], m_uuid.Data4[8]);
|
m_uuid.Data4[5], m_uuid.Data4[6], m_uuid.Data4[7], m_uuid.Data4[8]);
|
||||||
|
@@ -251,7 +251,7 @@ bool wxRadioBox::Create(wxWindow *parent,
|
|||||||
|
|
||||||
if ( !hwndBtn )
|
if ( !hwndBtn )
|
||||||
{
|
{
|
||||||
wxLogLastError("CreateWindow(radio btn)");
|
wxLogLastError(wxT("CreateWindow(radio btn)"));
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@@ -596,8 +596,7 @@ bool wxRegKey::Copy(wxRegKey& keyDst)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ( !ok ) {
|
if ( !ok ) {
|
||||||
wxLogError(_("Failed to copy the contents of registry key '%s' to "
|
wxLogError(_("Failed to copy the contents of registry key '%s' to '%s'."), GetFullName(this), GetFullName(&keyDst));
|
||||||
"'%s'."), GetFullName(this), GetFullName(&keyDst));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return ok;
|
return ok;
|
||||||
@@ -621,9 +620,7 @@ bool wxRegKey::DeleteSelf()
|
|||||||
// key except HKCR (HKCR has some "deleteable" subkeys)
|
// key except HKCR (HKCR has some "deleteable" subkeys)
|
||||||
if ( m_strKey.IsEmpty() || (m_hRootKey != HKCR &&
|
if ( m_strKey.IsEmpty() || (m_hRootKey != HKCR &&
|
||||||
m_strKey.Find(REG_SEPARATOR) == wxNOT_FOUND) ) {
|
m_strKey.Find(REG_SEPARATOR) == wxNOT_FOUND) ) {
|
||||||
wxLogError(_("Registry key '%s' is needed for normal system operation,\n"
|
wxLogError(_("Registry key '%s' is needed for normal system operation,\ndeleting it will leave your system in unusable state:\noperation aborted."), GetFullName(this));
|
||||||
"deleting it will leave your system in unusable state:\n"
|
|
||||||
"operation aborted."), GetFullName(this));
|
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@@ -132,7 +132,7 @@ bool wxSpinButton::Create(wxWindow *parent,
|
|||||||
|
|
||||||
if ( !m_hWnd )
|
if ( !m_hWnd )
|
||||||
{
|
{
|
||||||
wxLogLastError("CreateUpDownControl");
|
wxLogLastError(wxT("CreateUpDownControl"));
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@@ -133,7 +133,7 @@ bool wxSpinCtrl::Create(wxWindow *parent,
|
|||||||
|
|
||||||
if ( !m_hwndBuddy )
|
if ( !m_hwndBuddy )
|
||||||
{
|
{
|
||||||
wxLogLastError("CreateWindow(buddy text window)");
|
wxLogLastError(wxT("CreateWindow(buddy text window)"));
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@@ -175,7 +175,7 @@ void wxSpinCtrl::SetValue(const wxString& text)
|
|||||||
{
|
{
|
||||||
if ( !::SetWindowText((HWND)m_hwndBuddy, text.c_str()) )
|
if ( !::SetWindowText((HWND)m_hwndBuddy, text.c_str()) )
|
||||||
{
|
{
|
||||||
wxLogLastError("SetWindowText(buddy)");
|
wxLogLastError(wxT("SetWindowText(buddy)"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -288,13 +288,13 @@ void wxSpinCtrl::DoMoveWindow(int x, int y, int width, int height)
|
|||||||
|
|
||||||
if ( !::MoveWindow((HWND)m_hwndBuddy, x, y, widthText, height, TRUE) )
|
if ( !::MoveWindow((HWND)m_hwndBuddy, x, y, widthText, height, TRUE) )
|
||||||
{
|
{
|
||||||
wxLogLastError("MoveWindow(buddy)");
|
wxLogLastError(wxT("MoveWindow(buddy)"));
|
||||||
}
|
}
|
||||||
|
|
||||||
x += widthText + MARGIN_BETWEEN;
|
x += widthText + MARGIN_BETWEEN;
|
||||||
if ( !::MoveWindow(GetHwnd(), x, y, widthBtn, height, TRUE) )
|
if ( !::MoveWindow(GetHwnd(), x, y, widthBtn, height, TRUE) )
|
||||||
{
|
{
|
||||||
wxLogLastError("MoveWindow");
|
wxLogLastError(wxT("MoveWindow"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -319,7 +319,7 @@ bool wxStatusBar95::GetFieldRect(int i, wxRect& rect) const
|
|||||||
RECT r;
|
RECT r;
|
||||||
if ( !::SendMessage(GetHwnd(), SB_GETRECT, i, (LPARAM)&r) )
|
if ( !::SendMessage(GetHwnd(), SB_GETRECT, i, (LPARAM)&r) )
|
||||||
{
|
{
|
||||||
wxLogLastError("SendMessage(SB_GETRECT)");
|
wxLogLastError(wxT("SendMessage(SB_GETRECT)"));
|
||||||
}
|
}
|
||||||
|
|
||||||
wxCopyRECTToRect(r, rect);
|
wxCopyRECTToRect(r, rect);
|
||||||
|
@@ -291,7 +291,7 @@ bool wxToolBar::DoDeleteTool(size_t pos, wxToolBarToolBase *tool)
|
|||||||
{
|
{
|
||||||
if ( !::SendMessage(GetHwnd(), TB_DELETEBUTTON, pos, 0) )
|
if ( !::SendMessage(GetHwnd(), TB_DELETEBUTTON, pos, 0) )
|
||||||
{
|
{
|
||||||
wxLogLastError("TB_DELETEBUTTON");
|
wxLogLastError(wxT("TB_DELETEBUTTON"));
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@@ -377,7 +377,7 @@ bool wxToolBar::Realize()
|
|||||||
if ( !BitBlt(memoryDC, x, 0, m_defaultWidth, m_defaultHeight,
|
if ( !BitBlt(memoryDC, x, 0, m_defaultWidth, m_defaultHeight,
|
||||||
memoryDC2, 0, 0, SRCCOPY) )
|
memoryDC2, 0, 0, SRCCOPY) )
|
||||||
{
|
{
|
||||||
wxLogLastError("BitBlt");
|
wxLogLastError(wxT("BitBlt"));
|
||||||
}
|
}
|
||||||
|
|
||||||
::SelectObject(memoryDC2, oldBitmap2);
|
::SelectObject(memoryDC2, oldBitmap2);
|
||||||
@@ -446,7 +446,7 @@ bool wxToolBar::Realize()
|
|||||||
{
|
{
|
||||||
if ( !::SendMessage(GetHwnd(), TB_DELETEBUTTON, 0, 0) )
|
if ( !::SendMessage(GetHwnd(), TB_DELETEBUTTON, 0, 0) )
|
||||||
{
|
{
|
||||||
wxLogLastError("TB_DELETEBUTTON");
|
wxLogLastError(wxT("TB_DELETEBUTTON"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -518,7 +518,7 @@ bool wxToolBar::Realize()
|
|||||||
if ( !::SendMessage(GetHwnd(), TB_ADDBUTTONS,
|
if ( !::SendMessage(GetHwnd(), TB_ADDBUTTONS,
|
||||||
(WPARAM)i, (LPARAM)buttons) )
|
(WPARAM)i, (LPARAM)buttons) )
|
||||||
{
|
{
|
||||||
wxLogLastError("TB_ADDBUTTONS");
|
wxLogLastError(wxT("TB_ADDBUTTONS"));
|
||||||
}
|
}
|
||||||
|
|
||||||
delete [] buttons;
|
delete [] buttons;
|
||||||
@@ -547,7 +547,7 @@ bool wxToolBar::Realize()
|
|||||||
if ( !SendMessage(GetHwnd(), TB_GETITEMRECT,
|
if ( !SendMessage(GetHwnd(), TB_GETITEMRECT,
|
||||||
index, (LPARAM)(LPRECT)&r) )
|
index, (LPARAM)(LPRECT)&r) )
|
||||||
{
|
{
|
||||||
wxLogLastError("TB_GETITEMRECT");
|
wxLogLastError(wxT("TB_GETITEMRECT"));
|
||||||
}
|
}
|
||||||
|
|
||||||
// TB_SETBUTTONINFO message is only supported by comctl32.dll 4.71+
|
// TB_SETBUTTONINFO message is only supported by comctl32.dll 4.71+
|
||||||
@@ -566,7 +566,7 @@ bool wxToolBar::Realize()
|
|||||||
tool->GetId(), (LPARAM)&tbbi) )
|
tool->GetId(), (LPARAM)&tbbi) )
|
||||||
{
|
{
|
||||||
// the id is probably invalid?
|
// the id is probably invalid?
|
||||||
wxLogLastError("TB_SETBUTTONINFO");
|
wxLogLastError(wxT("TB_SETBUTTONINFO"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -589,7 +589,7 @@ bool wxToolBar::Realize()
|
|||||||
if ( !SendMessage(GetHwnd(), TB_INSERTBUTTON,
|
if ( !SendMessage(GetHwnd(), TB_INSERTBUTTON,
|
||||||
index, (LPARAM)&tbb) )
|
index, (LPARAM)&tbb) )
|
||||||
{
|
{
|
||||||
wxLogLastError("TB_INSERTBUTTON");
|
wxLogLastError(wxT("TB_INSERTBUTTON"));
|
||||||
}
|
}
|
||||||
|
|
||||||
index++;
|
index++;
|
||||||
|
@@ -160,8 +160,7 @@ bool wxTextCtrl::Create(wxWindow *parent, wxWindowID id,
|
|||||||
if ( m_windowStyle & wxTE_MULTILINE )
|
if ( m_windowStyle & wxTE_MULTILINE )
|
||||||
{
|
{
|
||||||
wxASSERT_MSG( !(m_windowStyle & wxTE_PROCESS_ENTER),
|
wxASSERT_MSG( !(m_windowStyle & wxTE_PROCESS_ENTER),
|
||||||
wxT("wxTE_PROCESS_ENTER style is ignored for multiline "
|
wxT("wxTE_PROCESS_ENTER style is ignored for multiline text controls (they always process it)") );
|
||||||
"text controls (they always process it)") );
|
|
||||||
|
|
||||||
msStyle |= ES_MULTILINE | ES_WANTRETURN;
|
msStyle |= ES_MULTILINE | ES_WANTRETURN;
|
||||||
if ((m_windowStyle & wxTE_NO_VSCROLL) == 0)
|
if ((m_windowStyle & wxTE_NO_VSCROLL) == 0)
|
||||||
@@ -214,9 +213,7 @@ bool wxTextCtrl::Create(wxWindow *parent, wxWindowID id,
|
|||||||
// done)
|
// done)
|
||||||
if ( !wxRichEditModule::Load() )
|
if ( !wxRichEditModule::Load() )
|
||||||
{
|
{
|
||||||
wxLogError(_("Impossible to create a rich edit control, "
|
wxLogError(_("Impossible to create a rich edit control, using simple text control instead. Please reinstall riched32.dll"));
|
||||||
"using simple text control instead. Please "
|
|
||||||
"reinstall riched32.dll"));
|
|
||||||
|
|
||||||
s_errorGiven = TRUE;
|
s_errorGiven = TRUE;
|
||||||
}
|
}
|
||||||
|
@@ -242,7 +242,7 @@ public:
|
|||||||
{
|
{
|
||||||
if ( !::CloseHandle(event) )
|
if ( !::CloseHandle(event) )
|
||||||
{
|
{
|
||||||
wxLogLastError("CloseHandle(event)");
|
wxLogLastError(wxT("CloseHandle(event)"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -281,7 +281,7 @@ void wxCondition::Signal()
|
|||||||
// will be woken up.
|
// will be woken up.
|
||||||
if ( !::SetEvent(m_internal->event) )
|
if ( !::SetEvent(m_internal->event) )
|
||||||
{
|
{
|
||||||
wxLogLastError("SetEvent");
|
wxLogLastError(wxT("SetEvent"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -351,7 +351,7 @@ public:
|
|||||||
{
|
{
|
||||||
if ( !::CloseHandle(m_hThread) )
|
if ( !::CloseHandle(m_hThread) )
|
||||||
{
|
{
|
||||||
wxLogLastError("CloseHandle(thread)");
|
wxLogLastError(wxT("CloseHandle(thread)"));
|
||||||
}
|
}
|
||||||
|
|
||||||
m_hThread = 0;
|
m_hThread = 0;
|
||||||
@@ -655,8 +655,7 @@ bool wxThread::SetConcurrency(size_t level)
|
|||||||
|
|
||||||
// we've discovered a MT version of Win9x!
|
// we've discovered a MT version of Win9x!
|
||||||
wxASSERT_MSG( pfnSetProcessAffinityMask,
|
wxASSERT_MSG( pfnSetProcessAffinityMask,
|
||||||
_T("this system has several CPUs but no "
|
_T("this system has several CPUs but no SetProcessAffinityMask function?") );
|
||||||
"SetProcessAffinityMask function?") );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( !pfnSetProcessAffinityMask )
|
if ( !pfnSetProcessAffinityMask )
|
||||||
@@ -877,7 +876,7 @@ wxThreadError wxThread::Delete(ExitCode *pRc)
|
|||||||
|
|
||||||
if ( !::GetExitCodeThread(hThread, (LPDWORD)&rc) )
|
if ( !::GetExitCodeThread(hThread, (LPDWORD)&rc) )
|
||||||
{
|
{
|
||||||
wxLogLastError("GetExitCodeThread");
|
wxLogLastError(wxT("GetExitCodeThread"));
|
||||||
|
|
||||||
rc = (ExitCode)-1;
|
rc = (ExitCode)-1;
|
||||||
}
|
}
|
||||||
@@ -1020,9 +1019,7 @@ bool wxThreadModule::OnInit()
|
|||||||
// in normal circumstances it will only happen if all other
|
// in normal circumstances it will only happen if all other
|
||||||
// TLS_MINIMUM_AVAILABLE (>= 64) indices are already taken - in other
|
// TLS_MINIMUM_AVAILABLE (>= 64) indices are already taken - in other
|
||||||
// words, this should never happen
|
// words, this should never happen
|
||||||
wxLogSysError(_("Thread module initialization failed: "
|
wxLogSysError(_("Thread module initialization failed: impossible to allocate index in thread local storage"));
|
||||||
"impossible to allocate index in thread "
|
|
||||||
"local storage"));
|
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@@ -1034,8 +1031,7 @@ bool wxThreadModule::OnInit()
|
|||||||
::TlsFree(gs_tlsThisThread);
|
::TlsFree(gs_tlsThisThread);
|
||||||
gs_tlsThisThread = 0xFFFFFFFF;
|
gs_tlsThisThread = 0xFFFFFFFF;
|
||||||
|
|
||||||
wxLogSysError(_("Thread module initialization failed: "
|
wxLogSysError(_("Thread module initialization failed: can not store value in thread local storage"));
|
||||||
"can not store value in thread local storage"));
|
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@@ -1055,7 +1051,7 @@ void wxThreadModule::OnExit()
|
|||||||
{
|
{
|
||||||
if ( !::TlsFree(gs_tlsThisThread) )
|
if ( !::TlsFree(gs_tlsThisThread) )
|
||||||
{
|
{
|
||||||
wxLogLastError("TlsFree failed.");
|
wxLogLastError(wxT("TlsFree failed."));
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( gs_critsectGui )
|
if ( gs_critsectGui )
|
||||||
@@ -1160,7 +1156,7 @@ void WXDLLEXPORT wxWakeUpMainThread()
|
|||||||
if ( !::PostThreadMessage(gs_idMainThread, WM_NULL, 0, 0) )
|
if ( !::PostThreadMessage(gs_idMainThread, WM_NULL, 0, 0) )
|
||||||
{
|
{
|
||||||
// should never happen
|
// should never happen
|
||||||
wxLogLastError("PostThreadMessage(WM_NULL)");
|
wxLogLastError(wxT("PostThreadMessage(WM_NULL)"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -303,25 +303,25 @@ void wxToolTip::Add(WXHWND hWnd)
|
|||||||
hfont = (HFONT)GetStockObject(DEFAULT_GUI_FONT);
|
hfont = (HFONT)GetStockObject(DEFAULT_GUI_FONT);
|
||||||
if ( !hfont )
|
if ( !hfont )
|
||||||
{
|
{
|
||||||
wxLogLastError("GetStockObject(DEFAULT_GUI_FONT)");
|
wxLogLastError(wxT("GetStockObject(DEFAULT_GUI_FONT)"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
HDC hdc = CreateCompatibleDC(NULL);
|
HDC hdc = CreateCompatibleDC(NULL);
|
||||||
if ( !hdc )
|
if ( !hdc )
|
||||||
{
|
{
|
||||||
wxLogLastError("CreateCompatibleDC(NULL)");
|
wxLogLastError(wxT("CreateCompatibleDC(NULL)"));
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( !SelectObject(hdc, hfont) )
|
if ( !SelectObject(hdc, hfont) )
|
||||||
{
|
{
|
||||||
wxLogLastError("SelectObject(hfont)");
|
wxLogLastError(wxT("SelectObject(hfont)"));
|
||||||
}
|
}
|
||||||
|
|
||||||
SIZE sz;
|
SIZE sz;
|
||||||
if ( !GetTextExtentPoint(hdc, m_text, index, &sz) )
|
if ( !GetTextExtentPoint(hdc, m_text, index, &sz) )
|
||||||
{
|
{
|
||||||
wxLogLastError("GetTextExtentPoint");
|
wxLogLastError(wxT("GetTextExtentPoint"));
|
||||||
}
|
}
|
||||||
|
|
||||||
DeleteDC(hdc);
|
DeleteDC(hdc);
|
||||||
|
@@ -112,7 +112,7 @@ static bool IsItemSelected(HWND hwndTV, HTREEITEM hItem)
|
|||||||
|
|
||||||
if ( !TreeView_GetItem(hwndTV, &tvi) )
|
if ( !TreeView_GetItem(hwndTV, &tvi) )
|
||||||
{
|
{
|
||||||
wxLogLastError("TreeView_GetItem");
|
wxLogLastError(wxT("TreeView_GetItem"));
|
||||||
}
|
}
|
||||||
|
|
||||||
return (tvi.state & TVIS_SELECTED) != 0;
|
return (tvi.state & TVIS_SELECTED) != 0;
|
||||||
@@ -128,7 +128,7 @@ static void SelectItem(HWND hwndTV, HTREEITEM hItem, bool select = TRUE)
|
|||||||
|
|
||||||
if ( TreeView_SetItem(hwndTV, &tvi) == -1 )
|
if ( TreeView_SetItem(hwndTV, &tvi) == -1 )
|
||||||
{
|
{
|
||||||
wxLogLastError("TreeView_SetItem");
|
wxLogLastError(wxT("TreeView_SetItem"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -643,7 +643,7 @@ bool wxTreeCtrl::DoGetItem(wxTreeViewItem* tvItem) const
|
|||||||
{
|
{
|
||||||
if ( !TreeView_GetItem(GetHwnd(), tvItem) )
|
if ( !TreeView_GetItem(GetHwnd(), tvItem) )
|
||||||
{
|
{
|
||||||
wxLogLastError("TreeView_GetItem");
|
wxLogLastError(wxT("TreeView_GetItem"));
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@@ -655,7 +655,7 @@ void wxTreeCtrl::DoSetItem(wxTreeViewItem* tvItem)
|
|||||||
{
|
{
|
||||||
if ( TreeView_SetItem(GetHwnd(), tvItem) == -1 )
|
if ( TreeView_SetItem(GetHwnd(), tvItem) == -1 )
|
||||||
{
|
{
|
||||||
wxLogLastError("TreeView_SetItem");
|
wxLogLastError(wxT("TreeView_SetItem"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1151,16 +1151,14 @@ wxTreeItemId wxTreeCtrl::GetFirstVisibleItem() const
|
|||||||
|
|
||||||
wxTreeItemId wxTreeCtrl::GetNextVisible(const wxTreeItemId& item) const
|
wxTreeItemId wxTreeCtrl::GetNextVisible(const wxTreeItemId& item) const
|
||||||
{
|
{
|
||||||
wxASSERT_MSG( IsVisible(item), wxT("The item you call GetNextVisible() "
|
wxASSERT_MSG( IsVisible(item), wxT("The item you call GetNextVisible() for must be visible itself!"));
|
||||||
"for must be visible itself!"));
|
|
||||||
|
|
||||||
return wxTreeItemId((WXHTREEITEM) TreeView_GetNextVisible(GetHwnd(), HITEM(item)));
|
return wxTreeItemId((WXHTREEITEM) TreeView_GetNextVisible(GetHwnd(), HITEM(item)));
|
||||||
}
|
}
|
||||||
|
|
||||||
wxTreeItemId wxTreeCtrl::GetPrevVisible(const wxTreeItemId& item) const
|
wxTreeItemId wxTreeCtrl::GetPrevVisible(const wxTreeItemId& item) const
|
||||||
{
|
{
|
||||||
wxASSERT_MSG( IsVisible(item), wxT("The item you call GetPrevVisible() "
|
wxASSERT_MSG( IsVisible(item), wxT("The item you call GetPrevVisible() for must be visible itself!"));
|
||||||
"for must be visible itself!"));
|
|
||||||
|
|
||||||
return wxTreeItemId((WXHTREEITEM) TreeView_GetPrevVisible(GetHwnd(), HITEM(item)));
|
return wxTreeItemId((WXHTREEITEM) TreeView_GetPrevVisible(GetHwnd(), HITEM(item)));
|
||||||
}
|
}
|
||||||
@@ -1258,7 +1256,7 @@ wxTreeItemId wxTreeCtrl::DoInsertItem(const wxTreeItemId& parent,
|
|||||||
HTREEITEM id = (HTREEITEM) TreeView_InsertItem(GetHwnd(), &tvIns);
|
HTREEITEM id = (HTREEITEM) TreeView_InsertItem(GetHwnd(), &tvIns);
|
||||||
if ( id == 0 )
|
if ( id == 0 )
|
||||||
{
|
{
|
||||||
wxLogLastError("TreeView_InsertItem");
|
wxLogLastError(wxT("TreeView_InsertItem"));
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( data != NULL )
|
if ( data != NULL )
|
||||||
@@ -1343,7 +1341,7 @@ void wxTreeCtrl::Delete(const wxTreeItemId& item)
|
|||||||
{
|
{
|
||||||
if ( !TreeView_DeleteItem(GetHwnd(), HITEM(item)) )
|
if ( !TreeView_DeleteItem(GetHwnd(), HITEM(item)) )
|
||||||
{
|
{
|
||||||
wxLogLastError("TreeView_DeleteItem");
|
wxLogLastError(wxT("TreeView_DeleteItem"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1366,7 +1364,7 @@ void wxTreeCtrl::DeleteChildren(const wxTreeItemId& item)
|
|||||||
{
|
{
|
||||||
if ( !TreeView_DeleteItem(GetHwnd(), (HTREEITEM)children[n]) )
|
if ( !TreeView_DeleteItem(GetHwnd(), (HTREEITEM)children[n]) )
|
||||||
{
|
{
|
||||||
wxLogLastError("TreeView_DeleteItem");
|
wxLogLastError(wxT("TreeView_DeleteItem"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1375,7 +1373,7 @@ void wxTreeCtrl::DeleteAllItems()
|
|||||||
{
|
{
|
||||||
if ( !TreeView_DeleteAllItems(GetHwnd()) )
|
if ( !TreeView_DeleteAllItems(GetHwnd()) )
|
||||||
{
|
{
|
||||||
wxLogLastError("TreeView_DeleteAllItems");
|
wxLogLastError(wxT("TreeView_DeleteAllItems"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1500,7 +1498,7 @@ void wxTreeCtrl::SelectItem(const wxTreeItemId& item)
|
|||||||
{
|
{
|
||||||
if ( !TreeView_SelectItem(GetHwnd(), HITEM(item)) )
|
if ( !TreeView_SelectItem(GetHwnd(), HITEM(item)) )
|
||||||
{
|
{
|
||||||
wxLogLastError("TreeView_SelectItem");
|
wxLogLastError(wxT("TreeView_SelectItem"));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -1522,7 +1520,7 @@ void wxTreeCtrl::ScrollTo(const wxTreeItemId& item)
|
|||||||
{
|
{
|
||||||
if ( !TreeView_SelectSetFirstVisible(GetHwnd(), HITEM(item)) )
|
if ( !TreeView_SelectSetFirstVisible(GetHwnd(), HITEM(item)) )
|
||||||
{
|
{
|
||||||
wxLogLastError("TreeView_SelectSetFirstVisible");
|
wxLogLastError(wxT("TreeView_SelectSetFirstVisible"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2038,8 +2036,7 @@ bool wxTreeCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
wxLogDebug(wxT("unexpected code %d in TVN_ITEMEXPAND "
|
wxLogDebug(wxT("unexpected code %d in TVN_ITEMEXPAND message"), tv->action);
|
||||||
"message"), tv->action);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ing = ((int)hdr->code == TVN_ITEMEXPANDING);
|
bool ing = ((int)hdr->code == TVN_ITEMEXPANDING);
|
||||||
|
@@ -163,7 +163,7 @@ bool wxGetHostName(wxChar *buf, int maxSize)
|
|||||||
DWORD nSize = maxSize;
|
DWORD nSize = maxSize;
|
||||||
if ( !::GetComputerName(buf, &nSize) )
|
if ( !::GetComputerName(buf, &nSize) )
|
||||||
{
|
{
|
||||||
wxLogLastError("GetComputerName");
|
wxLogLastError(wxT("GetComputerName"));
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@@ -450,7 +450,7 @@ bool wxDirExists(const wxString& dir)
|
|||||||
|
|
||||||
if ( h == INVALID_HANDLE_VALUE )
|
if ( h == INVALID_HANDLE_VALUE )
|
||||||
{
|
{
|
||||||
wxLogLastError("FindFirstFile");
|
wxLogLastError(wxT("FindFirstFile"));
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@@ -108,7 +108,7 @@ public:
|
|||||||
#ifndef __WIN16__
|
#ifndef __WIN16__
|
||||||
if ( !::CloseHandle(hProcess) )
|
if ( !::CloseHandle(hProcess) )
|
||||||
{
|
{
|
||||||
wxLogLastError("CloseHandle(hProcess)");
|
wxLogLastError(wxT("CloseHandle(hProcess)"));
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@@ -221,7 +221,7 @@ static DWORD wxExecuteThread(wxExecuteData *data)
|
|||||||
// get the exit code
|
// get the exit code
|
||||||
if ( !GetExitCodeProcess(data->hProcess, &data->dwExitCode) )
|
if ( !GetExitCodeProcess(data->hProcess, &data->dwExitCode) )
|
||||||
{
|
{
|
||||||
wxLogLastError("GetExitCodeProcess");
|
wxLogLastError(wxT("GetExitCodeProcess"));
|
||||||
}
|
}
|
||||||
|
|
||||||
wxASSERT_MSG( data->dwExitCode != STILL_ACTIVE,
|
wxASSERT_MSG( data->dwExitCode != STILL_ACTIVE,
|
||||||
@@ -521,7 +521,7 @@ long wxExecute(const wxString& cmd, bool sync, wxProcess *handler)
|
|||||||
|
|
||||||
if ( !::RegisterClass(&wndclass) )
|
if ( !::RegisterClass(&wndclass) )
|
||||||
{
|
{
|
||||||
wxLogLastError("RegisterClass(hidden window)");
|
wxLogLastError(wxT("RegisterClass(hidden window)"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -564,16 +564,16 @@ long wxExecute(const wxString& cmd, bool sync, wxProcess *handler)
|
|||||||
if ( ::ResumeThread(pi.hThread) == (DWORD)-1 )
|
if ( ::ResumeThread(pi.hThread) == (DWORD)-1 )
|
||||||
{
|
{
|
||||||
// ignore it - what can we do?
|
// ignore it - what can we do?
|
||||||
wxLogLastError("ResumeThread in wxExecute");
|
wxLogLastError(wxT("ResumeThread in wxExecute"));
|
||||||
}
|
}
|
||||||
|
|
||||||
// close unneeded handle
|
// close unneeded handle
|
||||||
if ( !::CloseHandle(pi.hThread) )
|
if ( !::CloseHandle(pi.hThread) )
|
||||||
wxLogLastError("CloseHandle(hThread)");
|
wxLogLastError(wxT("CloseHandle(hThread)"));
|
||||||
|
|
||||||
if ( !hThread )
|
if ( !hThread )
|
||||||
{
|
{
|
||||||
wxLogLastError("CreateThread in wxExecute");
|
wxLogLastError(wxT("CreateThread in wxExecute"));
|
||||||
|
|
||||||
DestroyWindow(hwnd);
|
DestroyWindow(hwnd);
|
||||||
delete data;
|
delete data;
|
||||||
|
@@ -274,7 +274,7 @@ wxWindow::~wxWindow()
|
|||||||
//if (::IsWindow(GetHwnd()))
|
//if (::IsWindow(GetHwnd()))
|
||||||
{
|
{
|
||||||
if ( !::DestroyWindow(GetHwnd()) )
|
if ( !::DestroyWindow(GetHwnd()) )
|
||||||
wxLogLastError("DestroyWindow");
|
wxLogLastError(wxT("DestroyWindow"));
|
||||||
}
|
}
|
||||||
|
|
||||||
// remove hWnd <-> wxWindow association
|
// remove hWnd <-> wxWindow association
|
||||||
@@ -1185,7 +1185,7 @@ void wxWindow::DoMoveWindow(int x, int y, int width, int height)
|
|||||||
{
|
{
|
||||||
if ( !::MoveWindow(GetHwnd(), x, y, width, height, TRUE) )
|
if ( !::MoveWindow(GetHwnd(), x, y, width, height, TRUE) )
|
||||||
{
|
{
|
||||||
wxLogLastError("MoveWindow");
|
wxLogLastError(wxT("MoveWindow"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2328,8 +2328,7 @@ bool wxWindow::MSWCreate(int id,
|
|||||||
|
|
||||||
if ( m_hWnd == 0 )
|
if ( m_hWnd == 0 )
|
||||||
{
|
{
|
||||||
wxLogError(_("Can't find dummy dialog template!\n"
|
wxLogError(_("Can't find dummy dialog template!\nCheck resource include path for finding wx.rc."));
|
||||||
"Check resource include path for finding wx.rc."));
|
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@@ -2379,8 +2378,7 @@ bool wxWindow::MSWCreate(int id,
|
|||||||
|
|
||||||
if ( !m_hWnd )
|
if ( !m_hWnd )
|
||||||
{
|
{
|
||||||
wxLogError(_("Can't create window of class %s!\n"
|
wxLogError(_("Can't create window of class %s!\nPossible Windows 3.x compatibility problem?"),
|
||||||
"Possible Windows 3.x compatibility problem?"),
|
|
||||||
wclass);
|
wclass);
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@@ -2692,7 +2690,7 @@ bool wxWindow::HandleSetCursor(WXHWND hWnd,
|
|||||||
#ifdef __WIN32__
|
#ifdef __WIN32__
|
||||||
if ( !::GetCursorPos(&pt) )
|
if ( !::GetCursorPos(&pt) )
|
||||||
{
|
{
|
||||||
wxLogLastError("GetCursorPos");
|
wxLogLastError(wxT("GetCursorPos"));
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
// In WIN16 it doesn't return a value.
|
// In WIN16 it doesn't return a value.
|
||||||
@@ -2913,9 +2911,9 @@ bool wxWindow::HandlePaint()
|
|||||||
#ifdef __WIN32__
|
#ifdef __WIN32__
|
||||||
HRGN hRegion = ::CreateRectRgn(0, 0, 0, 0); // Dummy call to get a handle
|
HRGN hRegion = ::CreateRectRgn(0, 0, 0, 0); // Dummy call to get a handle
|
||||||
if ( !hRegion )
|
if ( !hRegion )
|
||||||
wxLogLastError("CreateRectRgn");
|
wxLogLastError(wxT("CreateRectRgn"));
|
||||||
if ( ::GetUpdateRgn(GetHwnd(), hRegion, FALSE) == ERROR )
|
if ( ::GetUpdateRgn(GetHwnd(), hRegion, FALSE) == ERROR )
|
||||||
wxLogLastError("GetUpdateRgn");
|
wxLogLastError(wxT("GetUpdateRgn"));
|
||||||
|
|
||||||
m_updateRegion = wxRegion((WXHRGN) hRegion);
|
m_updateRegion = wxRegion((WXHRGN) hRegion);
|
||||||
#else
|
#else
|
||||||
@@ -2966,7 +2964,7 @@ void wxWindow::OnEraseBackground(wxEraseEvent& event)
|
|||||||
m_backgroundColour.Blue());
|
m_backgroundColour.Blue());
|
||||||
HBRUSH hBrush = ::CreateSolidBrush(ref);
|
HBRUSH hBrush = ::CreateSolidBrush(ref);
|
||||||
if ( !hBrush )
|
if ( !hBrush )
|
||||||
wxLogLastError("CreateSolidBrush");
|
wxLogLastError(wxT("CreateSolidBrush"));
|
||||||
|
|
||||||
HDC hdc = (HDC)event.GetDC()->GetHDC();
|
HDC hdc = (HDC)event.GetDC()->GetHDC();
|
||||||
|
|
||||||
|
@@ -55,7 +55,7 @@ static void XpmToBitmap(wxBitmap *bitmap,
|
|||||||
BITMAP bm;
|
BITMAP bm;
|
||||||
if ( !::GetObject(GetHbitmapOf(*bitmap), sizeof(bm), (LPSTR) & bm) )
|
if ( !::GetObject(GetHbitmapOf(*bitmap), sizeof(bm), (LPSTR) & bm) )
|
||||||
{
|
{
|
||||||
wxLogLastError("GetObject(bitmap)");
|
wxLogLastError(wxT("GetObject(bitmap)"));
|
||||||
}
|
}
|
||||||
|
|
||||||
refData->m_width = bm.bmWidth;
|
refData->m_width = bm.bmWidth;
|
||||||
|
Reference in New Issue
Block a user