Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
A

AkiraOne

@AkiraOne
About
Posts
22
Topics
9
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • CSocket OnReceive Problem....
    A AkiraOne

    Yes..is the same...:doh:

    Too many plans make the health badly!!

    C / C++ / MFC help c++

  • CSocket OnReceive Problem....
    A AkiraOne

    I have not still been able to try... Today I will make some tests with the CAsynSocket...

    Too many plans make the health badly!!

    C / C++ / MFC help c++

  • CSocket OnReceive Problem....
    A AkiraOne

    Thank you for the link....and for the help!

    Too many plans make the health badly!!

    C / C++ / MFC help c++

  • CSocket OnReceive Problem....
    A AkiraOne

    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!!

    C / C++ / MFC help c++

  • CSocket OnReceive Problem....
    A AkiraOne

    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!!

    C / C++ / MFC help c++

  • Track other processes in the computer
    A AkiraOne

    See http://msdn2.microsoft.com/en-us/library/ms682629.aspx[^]is helpfuls?

    Too many plans make the health badly!!

    C / C++ / MFC c++ question

  • Thread and PostMessage and Pointer
    A AkiraOne

    Good idea… It seems to work… I will make other tests....:suss: Thanks :-D

    Too many plans make the health badly!!

    C / C++ / MFC help

  • Thread and PostMessage and Pointer
    A AkiraOne

    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!!

    C / C++ / MFC help

  • Thread and PostMessage and Pointer
    A AkiraOne

    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!!

    C / C++ / MFC help

  • Crystal report 10 ( Modify database location at runtime using CrystalRuntime.Application.10 )
    A AkiraOne

    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++ ) {
    
    C / C++ / MFC database help

  • ADO OpenTable database ACCESS cause memory problem !!
    A AkiraOne

    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!!

    C / C++ / MFC

  • Sockets
    A AkiraOne

    http://support.microsoft.com/kb/138692/en-us[^]

    Too many plans make the health badly!!

    C / C++ / MFC regex question

  • Unregister same registering with 'regsvr32.exe' ?
    A AkiraOne

    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

    C / C++ / MFC tutorial question

  • Menu in a MDI app (MFC 7.1)
    A AkiraOne

    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!!

    C / C++ / MFC c++ tutorial

  • Menu in a MDI app (MFC 7.1)
    A AkiraOne

    How to hide (or not to create) the menu of an MDI project ...Thanks! Too many plans make the health badly!!

    C / C++ / MFC c++ tutorial

  • CListCtrl: subitem edit problem
    A AkiraOne

    You have tried with: BOOL SetItemText( int nItem, int nSubItem, LPCTSTR lpszText ); Too many plans make the health badly!!

    C / C++ / MFC help question

  • MDI without menu bar
    A AkiraOne

    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 !!

    C / C++ / MFC tutorial question

  • COleDateTime problem !
    A AkiraOne

    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!!

    C / C++ / MFC database sql-server sysadmin help question

  • how we can convert CWnd* to HWND
    A AkiraOne

    CWnd* pMyCwnd = new CWnd(); pMyCwnd->m_hWnd // This is the HWND of CWnd class Too many plans make the health badly!!

    C / C++ / MFC

  • Window MDI problem
    A AkiraOne

    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!!

    C / C++ / MFC question help
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups