The wxWindows framework does display unrequested error
boxes on failures.
In my program, I have to check if another DDE server is
already running because then that server will not
notice the changes I made to his config file. So
basically I just shut him down.
But every time the server is NOT running, I get an
error box, which is an excellent example for bad
programming style. The program simply should alert this
failure to the caller only.
Issue migrated from trac ticket # 1776
priority: normal
2004-07-28 13:32:04: comp3333 created the issue
wxWindows 2.4.2
The wxWindows framework does display unrequested error boxes on failures.
In my program, I have to check if another DDE server is already running because then that server will not notice the changes I made to his config file. So basically I just shut him down.
But every time the server is NOT running, I get an error box, which is an excellent example for bad programming style. The program simply should alert this failure to the caller only.
src/msw/dde.cpp:404 and following:
#################### wxConnectionBase wxDDEClient::MakeConnection(const wxString& WXUNUSED(host), const wxString& server, const wxString& topic) { HCONV hConv = DdeConnect(DDEIdInst, DDEAtomFromString(server), DDEAtomFromString(topic), (PCONVCONTEXT)NULL); if ( !hConv ) { DDELogError(wxString::Format(_("Failed to create connection to server '%s' on topic '%s'"), server.c_str(), topic.c_str())); } else { wxDDEConnection connection = (wxDDEConnection*) OnMakeConnection(); if (connection) { connection->m_hConv = (WXHCONV) hConv; connection->m_topicName = topic; connection->m_client = this; m_connections.Append(connection); return connection; } }
} ####################
BTW, why is the DDE Stuff no longer documented ? It was documented in 2.2 and is no longer in 2.4.