Click here to Skip to main content
15,887,585 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: SetCheck on click in CListCtrl Pin
_Flaviu15-May-13 20:53
_Flaviu15-May-13 20:53 
GeneralRe: SetCheck on click in CListCtrl Pin
Jochen Arndt15-May-13 21:05
professionalJochen Arndt15-May-13 21:05 
GeneralRe: SetCheck on click in CListCtrl Pin
_Flaviu15-May-13 21:26
_Flaviu15-May-13 21:26 
GeneralRe: SetCheck on click in CListCtrl Pin
Jochen Arndt15-May-13 21:36
professionalJochen Arndt15-May-13 21:36 
GeneralRe: SetCheck on click in CListCtrl Pin
_Flaviu15-May-13 23:07
_Flaviu15-May-13 23:07 
GeneralRe: SetCheck on click in CListCtrl Pin
Jochen Arndt15-May-13 23:20
professionalJochen Arndt15-May-13 23:20 
GeneralRe: SetCheck on click in CListCtrl Pin
_Flaviu15-May-13 23:24
_Flaviu15-May-13 23:24 
QuestionWriting on BitMap by DC does not work Pin
Member 989133414-May-13 21:17
Member 989133414-May-13 21:17 
Look the fragment of this code. I wanted to ask, why Draw text to static bitmap does not work.

m_bmpModulation.CreateBitmap(xOrder, yOrder, 1, 24, (void *)lpBits);
if (!::IsWindow(m_staModulation.m_hWnd))
    m_staModulation.Create(_T("A bitmap static control (A)"), SS_CENTERIMAGE | SS_BITMAP | WS_VISIBLE, CRect(20, 20, 20 + xOrder, 20 + yOrder), this);
m_staModulation.SetBitmap((HBITMAP)m_bmpModulation);
delete [] lpBits;

CDC *pDC = m_staModulation.GetDC();
if (pDC)
{
    int nIldMin, nIldMax;
    swscanf(set.m_strModulationIldMin, L"%d", &nIldMin);
    swscanf(set.m_strModulationIldMax, L"%d", &nIldMax);

    int x, y;
    x = 218 - (int)(nIldMin * (float)197 / (float)295);
    y = 0;
    pDC -> DrawText(L"Min", 3, CRect(y, x, y + 20, x + 13), 0);
    x = 218 - (int)(nIldMax * (float)197 / (float)295);
    pDC -> DrawText(L"Max", 3, CRect(y, x - 13, y + 21, x), 0);

    float fFrequency;
    CString str;
    str = set.m_strModulationFrequency;
    str.Replace(L",", L".");
    swscanf(str, L"%f", &fFrequency);
    str.Format(L"%.02f", (double)1 / fFrequency);
    pDC -> DrawText(str, str.GetLength(), CRect(290, 224, 330, 236), 0);
}
else
    AfxMessageBox(L"No Device Context.");
}


I think, problem is, that drawed text is under the bitmap. Any suggestion how to fix it?

modified 15-May-13 3:37am.

AnswerRe: Writing on BitMap by DC does not work Pin
dusty_dex17-May-13 6:26
dusty_dex17-May-13 6:26 
QuestionHow to read-write Excel using MFC, without MS Office? Pin
Caesarea14-May-13 20:03
Caesarea14-May-13 20:03 
AnswerRe: How to read-write Excel using MFC, without MS Office? Pin
Richard MacCutchan14-May-13 21:09
mveRichard MacCutchan14-May-13 21:09 
AnswerRe: How to read-write Excel using MFC, without MS Office? Pin
Member 989133414-May-13 21:14
Member 989133414-May-13 21:14 
AnswerRe: How to read-write Excel using MFC, without MS Office? Pin
Jochen Arndt14-May-13 21:14
professionalJochen Arndt14-May-13 21:14 
AnswerRe: How to read-write Excel using MFC, without MS Office? Pin
Erudite_Eric16-May-13 7:12
Erudite_Eric16-May-13 7:12 
AnswerRe: How to read-write Excel using MFC, without MS Office? Pin
Caesarea16-May-13 19:47
Caesarea16-May-13 19:47 
Questionscrollview issue on win7 environment Pin
Ghost Employee14-May-13 16:54
Ghost Employee14-May-13 16:54 
AnswerRe: scrollview issue on win7 environment Pin
Newbie0017-May-13 8:21
Newbie0017-May-13 8:21 
GeneralRe: scrollview issue on win7 environment Pin
Ghost Employee21-May-13 0:50
Ghost Employee21-May-13 0:50 
GeneralRe: scrollview issue on win7 environment Pin
Newbie0022-May-13 9:39
Newbie0022-May-13 9:39 
GeneralRe: scrollview issue on win7 environment Pin
Ghost Employee22-May-13 16:36
Ghost Employee22-May-13 16:36 
GeneralRe: scrollview issue on win7 environment Pin
Ghost Employee24-May-13 21:02
Ghost Employee24-May-13 21:02 
GeneralRe: scrollview issue on win7 environment Pin
Newbie0025-May-13 0:05
Newbie0025-May-13 0:05 
GeneralRe: scrollview issue on win7 environment Pin
Ghost Employee27-May-13 16:19
Ghost Employee27-May-13 16:19 
QuestionCurrent line of a CRichEditCtrl Pin
ForNow14-May-13 8:53
ForNow14-May-13 8:53 
AnswerRe: Current line of a CRichEditCtrl Pin
David Crow15-May-13 5:44
David Crow15-May-13 5:44 

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.