Yes..is the same...:doh:
Too many plans make the health badly!!
Yes..is the same...:doh:
Too many plans make the health badly!!
I have not still been able to try... Today I will make some tests with the CAsynSocket...
Too many plans make the health badly!!
Thank you for the link....and for the help!
Too many plans make the health badly!!
Yes.. I have implemented a Client\Server application, the communication is created through the class CSocket MFC... The server side send to client the information to visualize...and the client side visualize it on a display..( CDialog ) When server side send information to Client an OnReceive event is performe...and thats work fine.. But same times the event OnReceive not being called...because the underlying socket system did not give any notifications...i suppose Excuse for my bad english...
Too many plans make the health badly!!
Hi All! I have a problem with MFC class CSocket, same times the OnReceive method is not called ... Any idea for fix this issue...:confused:
Too many plans make the health badly!!
See http://msdn2.microsoft.com/en-us/library/ms682629.aspx[^]is helpfuls?
Too many plans make the health badly!!
Good idea… It seems to work… I will make other tests....:suss: Thanks :-D
Too many plans make the health badly!!
I cannot use the SendMessage but thanks same... I read the article that you have subordinate to me…
Too many plans make the health badly!!
Hi All! I have a Working Thread that send a message to the application by ::PostMessage, in parameter WPARAM a put it a pointer to a new class instace: SEND CODE
UINT CServerSocket::ThreadPipe(LPVOID pParam)
{
.
.
.
while(*bContinue) {
EnterCriticalSection(&m_csPipeMsg);
.
.
.
pManageEventCommandData = new CGeneralData();
pManageEventCommandData->SetSocketAddress(*pSocketAddress);
pManageEventCommandData->SetEvent(EventQCDReceiveSocketACK);
::PostMessage(aHwnd,WM_USER_MANAGE_EVENT_COMMAND,(WPARAM)pManageEventCommandData,(LPARAM)0);
.
.
.
LeaveCriticalSection(&m_csPipeMsg);
::Sleep(200);
}
.
.
.
}
RECEIVE CODE When I receive message the class instance is delete
LRESULT CMainFrame::OnManageEventCommand(WPARAM wParam, LPARAM lParam)
{
int nManageEventResult;
CString sMessage;
// Puntatore dati generali
CGeneralData* pManageEventCommandData= reinterpret_cast(wParam);
if( pManageEventCommandData == NULL )
return 0;
//<< Do somethings >>
if( pManageEventCommandData != NULL ) {
delete pManageEventCommandData;
pManageEventCommandData = NULL;
}
return 0;
}
This work fine, but the problem is......sometimes when I close the application I see memoryleaks, I think that the problem is legacy to the fact that the PostMessage does not come received and the class remains allotted...but I not sure... Any Idea :doh: Thanks in advance :)
Too many plans make the health badly!!
Hi All. With Crystal report 10 I go to generate the report file and through the DLL to runtime I go to modify the logon parameters.... With this code I go to set up the parameters of logon of the report...but there is a problem when I set password ConnectionProperty has not been set..only password connection property....:mad:
void CDlgRptConnectionProperty::OnBnClickedOk()
{
_bstr_t bstParameterName,
bstParameterValue;
_variant_t vtValue;
IConnectionPropertyPtr pConnectionProperty = NULL;
IDatabaseTablesPtr pDatabaseTables = NULL;
INameValuePairsPtr pNameValuePairs = NULL;
IDatabasePtr pDatabase = NULL;
\_bstr\_t bstConnection;
HRESULT hr;
try {
// Puntatore interfaccia tabelle
pDatabaseTables = m\_pReport->GetDatabase()->GetTables();
// Puntatore parametri di connessione tabella
IDatabaseTablePtr pDatabaseTable = pDatabaseTables->GetItem(1);
pNameValuePairs = pDatabaseTable->GetConnectionProperties();
if( (m\_typeRptConnection == ModifyConnectionADO) || (m\_typeRptConnection == ModifyConnectionDAO) ) {
// Ciclo sui parametri del report
for( int nIndexParam = 0; nIndexParam < m\_lstParameterConnection.GetItemCount(); nIndexParam++ ) {
// Nome e Valore parametro
bstParameterName = m\_lstParameterConnection.GetItemText(nIndexParam,COL\_0);
CString sParameterName(bstParameterName.GetBSTR());
if( sParameterName.Compare(ADO\_PARAMETER\_5) != 0 ) {
// Valore parametro
bstParameterValue = m\_lstParameterConnection.GetItemText(nIndexParam,COL\_1);
}else {
// Password utente
bstParameterValue = GetUserPassword(nIndexParam,COL\_1);
}
// Modifica parametro connessione
IConnectionPropertyPtr pConnectionProperty = pNameValuePairs->GetItem(bstParameterName);
pConnectionProperty->PutValue(bstParameterValue);
}//:End for parametri report
}else if( (m\_typeRptConnection == ReplaceConnectionADO) || (m\_typeRptConnection == ReplaceConnectionDAO) ) {
// Cancellazione parametri esistenti
pNameValuePairs->DeleteAll();
// Nome dll da utilizzare
\_bstr\_t bstDllName;
if( m\_typeRptConnection == ReplaceConnectionADO )
bstDllName = DLL\_ADO;
else if( m\_typeRptConnection == ReplaceConnectionDAO )
bstDllName = DLL\_DAO;
m\_pReport->GetDatabase()->GetTables()->GetItem(1)->DllName = bstDllName;
// Ciclo sui parametri
for( int nIndexParam = 0; nIndexParam < m\_lstParameterConnection.GetItemCount(); nIndexParam++ ) {
Hello! I open an ACCESS table, this is a very big table, for open this table I use a OLE DB with ADO Classes wrapping...but...memory problem! I open a big table with this istruction: m_pRecordset->Open(m_strQuery.GetBuffer(), _variant_t((IDispatch*)mpdb, TRUE), adOpenKeyset, adLockOptimistic, adCmdTable); m_strQuery.ReleaseBuffer(); <\endcode> Where m_pRecordset is a _RecordsetPtr. When I performe the open istruction the memory comes literally eaten. The program in order to execute the table begins to have use of of all the RAM memory. Ther'is a BUG in the ADO Provider or other FIXED ? Any Idea ??:( Thanks in advance Too many plans make the health badly!!
http://support.microsoft.com/kb/138692/en-us[^]
Too many plans make the health badly!!
Start->Execute type regsvr32 and then Enter..... you can visualize a dialog options. regsvr32 "file path" /u Too many plans make the health badly!! -- modified at 2:52 Tuesday 18th July, 2006
I use already: SetMenu(NULL); ::DestroyMenu(GetMenu()->GetSafeHmenu()); Every time that I create child “window” I use the code over but the result is not appreciable..... Any idea ? Too many plans make the health badly!!
How to hide (or not to create) the menu of an MDI project ...Thanks! Too many plans make the health badly!!
You have tried with: BOOL SetItemText( int nItem, int nSubItem, LPCTSTR lpszText ); Too many plans make the health badly!!
Hi, How to create a new ChildFrame without menu bar ?? In the InitInstance in my App. I add this code for delete menu bar: pMainFrame->SetMenu(NULL); ::DestroyMenu(pMainFrame->GetMenu()->GetSafeHmenu()); and this work fine. But I create at runtime new windows attached to mainframe and when i create this windows the menu already appears. I add the code over in many points of windows creation but the visual effect is not very good :mad::mad:!! Any idea :confused:?? Thanks in advance :) Too many plans make the health badly !!
hi all, I set a COledateTime object: // DateRec COleDateTime oleDateRec; oleDateRec.SetDateTime(anno, mese, giorno, pMonitor->ore, pMonitor->minuti, pMonitor->secondi); with current datetime Ex.(2006,6,20,16,50,23) When i save oleDateRec.m_dt in a db table field with this insruction: // Comando SQL sSqlCommand.Format(_T("INSERT INTO STOPS_MONITOR (StopCode,DateRec,PlantCode,RoomCode,GroupCode,MachCode,CyclePos,OrderCode,StyleCode,StSize,StColor,StLot,Shift)") _T(" VALUES(%ld,%f,'%s','%s','%s',%ld,%ld,'%s','%s','%s','%s','%s',%d)"), lStopCode, ---> oleDateRec.m_dt, sAffiliationPlant, sAffiliationRoom, sAffiliationGroup, DbTfr.addr, pMonitor->step, sOrderCode, sStyleCode, sStSize, sStColor, sStLot, atoi(tmp_Turno)); in the table STOPS_MONITOR in the field DateRec I see this: 2006, 6, 22 the day is change from 20 to 22!!!!:(:(:( Database is a MSSQL Server the field DateRec is a datetime type. lenght 8 Any idea?? thanks in advanced!!:-D Too many plans make the health badly!!
CWnd* pMyCwnd = new CWnd(); pMyCwnd->m_hWnd // This is the HWND of CWnd class Too many plans make the health badly!!
1°) Question In the InitInstance(): .... // Parse command line for standard shell commands, DDE, file open CCommandLine cmdInfo; ParseCommandLine(cmdInfo); ...... ..... // DON'T display a new MDI child window during startup!!! cmdInfo.m_nShellCommand = CCommandLineInfo::FileNothing; /// This is 2°) Question In the InitInstance(): Replace the line pMainFrame->ShowWindow(m_nCmdShow); with pMainFrame->ShowWindow(SW_SHOWMAXIMIZED); :) Too many plans make the health badly!!