Click here to Skip to main content
15,889,281 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Does this way to clear all item from std::map have problem? Pin
yu-jian12-Nov-12 3:06
yu-jian12-Nov-12 3:06 
QuestionGetting pasted test Pin
Hadi Dayvary10-Nov-12 4:20
professionalHadi Dayvary10-Nov-12 4:20 
AnswerRe: Getting pasted test Pin
Richard MacCutchan10-Nov-12 6:05
mveRichard MacCutchan10-Nov-12 6:05 
GeneralRe: Getting pasted test Pin
Hadi Dayvary10-Nov-12 20:29
professionalHadi Dayvary10-Nov-12 20:29 
GeneralRe: Getting pasted test Pin
Richard MacCutchan10-Nov-12 21:27
mveRichard MacCutchan10-Nov-12 21:27 
Questionhow can get a disk number of a logical drive? Pin
Le@rner9-Nov-12 19:42
Le@rner9-Nov-12 19:42 
AnswerRe: how can get a disk number of a logical drive? Pin
Richard MacCutchan9-Nov-12 23:28
mveRichard MacCutchan9-Nov-12 23:28 
GeneralRe: how can get a disk number of a logical drive? Pin
Le@rner10-Nov-12 0:05
Le@rner10-Nov-12 0:05 
GeneralRe: how can get a disk number of a logical drive? Pin
Richard MacCutchan10-Nov-12 0:11
mveRichard MacCutchan10-Nov-12 0:11 
AnswerRe: how can get a disk number of a logical drive? Pin
André Kraak10-Nov-12 0:18
André Kraak10-Nov-12 0:18 
QuestionInfix to Postfix Converter Pin
ShayanTanwir9-Nov-12 17:52
ShayanTanwir9-Nov-12 17:52 
AnswerRe: Infix to Postfix Converter Pin
Richard MacCutchan9-Nov-12 23:27
mveRichard MacCutchan9-Nov-12 23:27 
AnswerRe: Infix to Postfix Converter Pin
David Crow11-Nov-12 15:59
David Crow11-Nov-12 15:59 
QuestionHow to stop typing in CDateTimeCtrl in MFC Pin
rahul.kulshreshtha7-Nov-12 16:47
rahul.kulshreshtha7-Nov-12 16:47 
AnswerRe: How to stop typing in CDateTimeCtrl in MFC Pin
Jochen Arndt7-Nov-12 23:32
professionalJochen Arndt7-Nov-12 23:32 
GeneralRe: How to stop typing in CDateTimeCtrl in MFC Pin
rahul.kulshreshtha8-Nov-12 5:52
rahul.kulshreshtha8-Nov-12 5:52 
GeneralRe: How to stop typing in CDateTimeCtrl in MFC Pin
Jochen Arndt8-Nov-12 6:32
professionalJochen Arndt8-Nov-12 6:32 
Question[MFC] How to save three ini files as zip file? Pin
yu-jian7-Nov-12 5:20
yu-jian7-Nov-12 5:20 
AnswerRe: [MFC] How to save three ini files as zip file? Pin
jeron17-Nov-12 6:17
jeron17-Nov-12 6:17 
AnswerRe: [MFC] How to save three ini files as zip file? Pin
Thomas Daniels7-Nov-12 7:35
mentorThomas Daniels7-Nov-12 7:35 
QuestionWhy new Image failed? Pin
yu-jian7-Nov-12 4:06
yu-jian7-Nov-12 4:06 
XML
<pre lang="c++">
        Image*  m_pImage;
    CString  strTempIMGPath = m_strCurrentImagePath;
    wchar_t szFile[256] = {0};

    char *pStr = strTempIMGPath.GetBuffer(0);
    int size = MultiByteToWideChar(GetACP(), 0, pStr, -1, NULL, 0);
    MultiByteToWideChar(GetACP(), 0, pStr, -1, szFile, size);
    strTempIMGPath.ReleaseBuffer();
    if (m_pImage != NULL)
    {
        delete m_pImage;
        m_pImage = NULL;
    }
<b> m_pImage = new Image(szFile, FALSE);</b>
    if(m_pImage->GetLastStatus() == Gdiplus::Status::Ok)
    {
...
    }


After this statement,m_pImage = new Image(szFile, FALSE)
the m_pImage is NULL, I do not know why create Image failed, after debug that I find that the szFile is a right PNG image file path.

The last code used in a CDialog form, I use the CDialog::DoModel() to show this dialog in the
CMyApp::InitInstance()
I do not know whether I use this class Image too early, or I need use some code to initialize the GDI+ library?
AnswerRe: Why new Image failed? Pin
chaau7-Nov-12 12:12
chaau7-Nov-12 12:12 
AnswerRe: Why new Image failed? Pin
Santhosh G_7-Nov-12 12:59
Santhosh G_7-Nov-12 12:59 
GeneralRe: Why new Image failed? Pin
yu-jian15-Nov-12 16:41
yu-jian15-Nov-12 16:41 
QuestionDialogBox fail in XP Pin
William Engberts7-Nov-12 3:32
William Engberts7-Nov-12 3:32 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.