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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
C

CHYGO

@CHYGO
About
Posts
22
Topics
8
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Asserion Failed:file wincore.cpp, Line 1047
    C CHYGO

    i entered the GetPane(), CWnd* CSplitterWnd::GetPane(int row, int col) const { ASSERT_VALID(this); ... } the app stopped at here

    i 've tried ,then i have no regret

    C / C++ / MFC c++ help debugging tutorial

  • Asserion Failed:file wincore.cpp, Line 1047
    C CHYGO

    i wrote the code in EVC++ 4.0, MFC,when i debug the code, the error occur at: CDisplayData* pDisplayData=(CDisplayData*)pMainFrame->m_wndSplitter.GetPane(1,0); i don't know how to solve it, please help :(( void CReadWriteData::DisplayAxisInfo() { ... CMainFrame* pMainFrame=((CMainFrame*)AfxGetApp()->m_pMainWnd); CDisplayData* pDisplayData=(CDisplayData*)pMainFrame->m_wndSplitter.GetPane(1,0); pDisplayData->m_xAxisCor.Format(_T("%f"),fValue); pDisplayData->UpdateData(FALSE); }

    i 've tried ,then i have no regret

    C / C++ / MFC c++ help debugging tutorial

  • CString convert error in Embedded Visual C++
    C CHYGO

    it is an good day :-D

    i 've tried ,then i have no regret

    C / C++ / MFC c++ question hardware help tutorial

  • CString convert error in Embedded Visual C++
    C CHYGO

    CString::Format maybe a good choice,i'll try it tomorrow:)

    i 've tried ,then i have no regret

    C / C++ / MFC c++ question hardware help tutorial

  • CString convert error in Embedded Visual C++
    C CHYGO

    i want to convert the interger to a binary string in EVC.so i use the '_itot'. UINT16 high16data = dwReadValue; CString high16string = _itot(high16data, high16string, 2); the error is:error C2664:'_itow':cannot convert parameter 2 from 'const unsigned short *' how can i convert the parameter?(i do want to use the CString type not the char[] as showed in MSDN). so how to do it? thanks for helping.

    i 've tried ,then i have no regret

    C / C++ / MFC c++ question hardware help tutorial

  • a fscanf error in MFC SDI
    C CHYGO

    :) it works.it takes me about three hours to try to solve it. thank u very mnuch.

    i 've tried ,then i have no regret

    C / C++ / MFC help c++ debugging

  • a fscanf error in MFC SDI
    C CHYGO

    thank u, i've tried the Bram van Kampen's method,it works:)

    i 've tried ,then i have no regret

    C / C++ / MFC help c++ debugging

  • a fscanf error in MFC SDI
    C CHYGO

    my code:

    #include "stdafx.h"
    #include <stdio.h>
    #include <fstream>

    void CParamDisplay::OnParamOpen()
    {
    // TODO: Add your control notification handler code here
    CFileDialog cfiledlg(TRUE, NULL, NULL, OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT
    , "Text Files (*.txt)|*.txt|All Files (*.*)|*.*||", this);

    if (IDOK == cfiledlg.DoModal())
    {
    	m\_filename = cfiledlg.GetPathName();
    	UpdateData(FALSE);
    	DisplayParam(m\_filename);
    }	
    

    }

    BOOL CParamDisplay::DisplayParam(CString filename)
    {
    UINT sNum = 0;
    CHAR paramId[MAX_BUF_SIZE] = _T("");
    CHAR paramUnit[MAX_BUF_SIZE] = _T("");
    FLOAT paramValue = 0;

    FILE\* pFile = fopen (filename, "r");
    
    if(pFile == NULL)
    	return FALSE;
    
    while(fscanf(pFile, "%d %s %s %f", sNum, paramId, paramUnit, paramValue) != EOF)
    {
         ...
    }
    
    fclose(pFile);
    
    return TRUE;
    

    }

    when i debug it, the app stopped at fscanf().and displayed:"Uhandled exception in XX.exe (MSVCRTD.DLL):0XC00000005:access violation".i can't fix it...(T_T)

    i 've tried ,then i have no regret

    C / C++ / MFC help c++ debugging

  • error C2664:'load':cannot convert parameter 1 from 'unsigned short *' to 'struct tagVARIANT'
    C CHYGO

    IXMLDOMDocument *pDoc = NULL; BSTR bstr = NULL; ... bstr = filename.AllocSysString(); hr = pDoc->load (bstr, b_load); filename is a CString type,how can i slove this problem?

    i 've tried ,then i have no regret

    C / C++ / MFC help question

  • convert parameter from 'const int' to 'void *'
    C CHYGO

    i difine a custom message(i want to post it to a driver) #define WM_INTERRUPT WM_USER+100 then i use it as a parameter in the function DeviceIoControl ... ULONG nBytesRead; if (! DeviceIoControl( m_hPCI9054, IOCTL_SET_NOTIFICATION_EVENT, &WM_INTERRUPT, sizeof(WM_INTERRUPT), NULL, 0, &nBytesRead, NULL ) ... it makes an error: ...'DeviceIoControl' : cannot convert parameter 3 from 'const int' to 'void *' how to fix it?

    i 've tried ,then i have no regret

    C / C++ / MFC help tutorial question

  • string class help needed
    C CHYGO

    thanks for ue help nave, but yr code still have a little problem:)

    if(lstrcmp(szProcessName, "smss.exe"))
    _tprintf( TEXT("%s (PID: %u)\n"), szProcessName, processID );

    that is: function lstrcmp(lpstring1, lpstring2),when lpstring1 equals lpstring2,the return value is zero.so if i need only see "smss.exe" on the screen,i should change it like this

    if(!lstrcmp(szProcessName, "smss.exe"))
    _tprintf( TEXT("%s (PID: %u)\n"), szProcessName, processID );

    i 've tried ,then i have no regret

    C / C++ / MFC help question c++

  • string class help needed
    C CHYGO

    oh yea.. haha i must be looking like a fool now... i fix it thanks for yr help :)

    i 've tried ,then i have no regret

    C / C++ / MFC help question c++

  • string class help needed
    C CHYGO

    Thank u,Naveen.I did as u told me ,but comes a new error: ...:error C2664: 'GetModuleBaseNameA' : cannot convert parameter 3 from 'const char *' to 'char *' how to do?

    i 've tried ,then i have no regret

    C / C++ / MFC help question c++

  • string class help needed
    C CHYGO

    i ues string class in a Win32 Console Application(build by VC++ 6),here is the code and errors, how can i fix it?

    #include "stdafx.h"

    //add
    #include <windows.h>
    #include <stdio.h>
    #include <tchar.h>
    #include "Psapi.h"
    #include <iostream.h>
    #include <string>
    using namespace std;

    void PrintProcessNameAndID( DWORD processID )
    {
    string szProcessName;

    // Get a handle to the process.
    
    HANDLE hProcess = OpenProcess( PROCESS\_QUERY\_INFORMATION |
                                   PROCESS\_VM\_READ,
                                   FALSE, processID );
    
    // Get the process name.
    
    if (NULL != hProcess )
    {
        HMODULE hMod;
        DWORD cbNeeded;
    
        if ( EnumProcessModules( hProcess, &hMod, sizeof(hMod), 
             &cbNeeded) )
        {
    		int len = lstrlen(szProcessName);
            GetModuleBaseName( hProcess, hMod, szProcessName, 
                               len);
    		//theProName = szProcessName;
        }
    
    if(lstrcmp(szProcessName, "smss.exe"))
    	\_tprintf( TEXT("%s  (PID: %u)\\n"), szProcessName, processID );
    }
    
    CloseHandle( hProcess );
    

    }

    int main(int argc, char* argv[])
    {
    ...
    return 0;
    }

    errors: ... : error C2664: 'lstrlenA' : cannot convert parameter 1 from 'class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >' to 'const char *' No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called ... : error C2664: 'GetModuleBaseNameA' : cannot convert parameter 3 from 'class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >' to 'char *' No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called ... : error C2664: 'lstrcmpA' : cannot convert parameter 1 from 'class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >' to 'const char *' No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called

    i 've tried ,then i have no regret

    C / C++ / MFC help question c++

  • about 101 errors when i run default MFC dialog app in VC++ 2005
    C CHYGO

    i've tried to create Dialog/SDI/MDI,and the errors are the same

    i 've tried ,then i have no regret

    C / C++ / MFC c++ visual-studio help question csharp

  • about 101 errors when i run default MFC dialog app in VC++ 2005
    C CHYGO

    e,i mean it was created with the VS 2005 wizard, the project type is MFC application

    i 've tried ,then i have no regret

    C / C++ / MFC c++ visual-studio help question csharp

  • about 101 errors when i run default MFC dialog app in VC++ 2005
    C CHYGO

    when i run a default MFC dialog app in VC++ 2005(i don't add any code),there are 101 errors in the afxwin.h, what is the problem? :( PS:parts of errors: 1>e:\programming ide\microsoft\visual studio 2005\vc\atlmfc\include\afxwin.h(2100) : error C2061: syntax error : identifier 'message' 1>e:\programming ide\microsoft\visual studio 2005\vc\atlmfc\include\afxwin.h(2100) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>e:\programming ide\microsoft\visual studio 2005\vc\atlmfc\include\afxwin.h(2100) : warning C4183: 'ON_MESSAGE': missing return type; assumed to be a member function returning 'int' 1>e:\programming ide\microsoft\visual studio 2005\vc\atlmfc\include\afxwin.h(2100) : error C2059: syntax error : ',' 1>e:\programming ide\microsoft\visual studio 2005\vc\atlmfc\include\afxwin.h(2100) : error C2238: unexpected token(s) preceding ';' 1>e:\programming ide\microsoft\visual studio 2005\vc\atlmfc\include\afxwin.h(2101) : error C2061: syntax error : identifier 'message' 1>e:\programming ide\microsoft\visual studio 2005\vc\atlmfc\include\afxwin.h(2101) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int

    i 've tried ,then i have no regret

    C / C++ / MFC c++ visual-studio help question csharp

  • i have a erro in vc6
    C CHYGO

    thank u:)

    C / C++ / MFC help tutorial question

  • i have a erro in vc6
    C CHYGO

    thx, i need another mothes:) i'll try it

    C / C++ / MFC help tutorial question

  • i have a erro in vc6
    C CHYGO

    i've tried ,and the error is the same

    C / C++ / MFC help tutorial question
  • Login

  • Don't have an account? Register

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