Click here to Skip to main content
15,903,030 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Parsing US date/time using COleDateTime ??? Pin
Anonymous15-Feb-03 23:41
Anonymous15-Feb-03 23:41 
GeneralCreating structure for XML data Pin
15-Feb-03 10:31
suss15-Feb-03 10:31 
GeneralLinked List HELP!. Pin
Sal R.15-Feb-03 8:55
Sal R.15-Feb-03 8:55 
GeneralRe: Linked List HELP!. Pin
AlexO15-Feb-03 9:14
AlexO15-Feb-03 9:14 
GeneralLPSTREAM and CString Pin
Member 9615-Feb-03 8:52
Member 9615-Feb-03 8:52 
GeneralRe: LPSTREAM and CString Pin
AlexO15-Feb-03 9:09
AlexO15-Feb-03 9:09 
GeneralRe: LPSTREAM and CString Pin
peterchen15-Feb-03 10:25
peterchen15-Feb-03 10:25 
QuestionHow to Kill Fliker on CDialog? Pin
Michael_Russia15-Feb-03 7:52
sussMichael_Russia15-Feb-03 7:52 
I have some terrible problem Frown | :(
I use following code, but buttons and toolbars sometimes flick. To solve flick's problem with Line/Rectangle/etc. Painting i use m_Context, but this causes another problem ;_(
After of the calling BitBlt function, Buttons and Toolbars repaint.
May be i need to paint buttons to m_Context, but how?

void CMy123Dlg::OnPaint()
{
if (IsIconic())
{
CPaintDC dc(this); // device context for painting

SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0);

// Center icon in client rectangle
int cxIcon = GetSystemMetrics(SM_CXICON);
int cyIcon = GetSystemMetrics(SM_CYICON);
CRect rect;
GetClientRect(&rect);
int x = (rect.Width() - cxIcon + 1) / 2;
int y = (rect.Height() - cyIcon + 1) / 2;

// Draw the icon
dc.DrawIcon(x, y, m_hIcon);
}
else
{
CPaintDC dc(this);

CRect button;
m_OK.GetWindowRect(&button);
CRect rect;
m_Frame.GetWindowRect(&rect);
//int Width = rect.Width();
//int Height = rect.Height();
int Width = 1000;
int Height = 1000;
m_Context.BitBlt(0, 0, Width, Height, &m_Context,0,0,WHITENESS);
m_Context.LineTo(300,600);
m_Context.LineTo(0,200);
m_Context.SetTextColor(0);
m_Context.DrawText("SSDSDSDSDJKLHklhljk", CRect(200,200,400,400), NULL);
m_Context.TextOut(500,100,m_str);

dc.BitBlt(0,0, Width, Height, &m_Context,0,0,SRCCOPY);

//CDialog::OnPaint();
}
}

// The system calls this to obtain the cursor to display while the user drags
// the minimized window.
HCURSOR CMy123Dlg::OnQueryDragIcon()
{
return (HCURSOR) m_hIcon;
}

int CMy123Dlg::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CDialog::OnCreate(lpCreateStruct) == -1)
return -1;

// TODO: Add your specialized creation code here
CDC *Canvas=GetDC();
m_Context.CreateCompatibleDC(Canvas);
m_Bitmap.CreateCompatibleBitmap(Canvas,1000,1000);
m_Context.SelectObject(&m_Bitmap);
ReleaseDC(Canvas);

m_i=1;
SetTimer(1,7,NULL);

return 0;
}

void CMy123Dlg::OnTimer(UINT nIDEvent)
{
// TODO: Add your message handler code here and/or call default
Invalidate();
m_i++;
itoa(m_i,m_str,10);
CDialog::OnTimer(nIDEvent);
}

BOOL CMy123Dlg::OnEraseBkgnd(CDC* pDC)
{
// TODO: Add your message handler code here and/or call default

//return CDialog::OnEraseBkgnd(pDC);
return 0;
}


QuestionUn-caught exception - how do I pin it down ? Pin
Still learning how to code15-Feb-03 7:45
Still learning how to code15-Feb-03 7:45 
AnswerRe: Un-caught exception - how do I pin it down ? Pin
Chris Losinger15-Feb-03 7:53
professionalChris Losinger15-Feb-03 7:53 
GeneralRe: Un-caught exception - how do I pin it down ? Pin
Still learning how to code16-Feb-03 8:09
Still learning how to code16-Feb-03 8:09 
GeneralRe: Un-caught exception - how do I pin it down ? Pin
Scott H. Settlemier17-Feb-03 18:10
Scott H. Settlemier17-Feb-03 18:10 
GeneralSetting the lenght of a text field in an SQL Access database... Pin
IrishSonic15-Feb-03 4:36
IrishSonic15-Feb-03 4:36 
GeneralRe: Setting the lenght of a text field in an SQL Access database... Pin
Anders Molin15-Feb-03 4:59
professionalAnders Molin15-Feb-03 4:59 
GeneralRe: Setting the lenght of a text field in an SQL Access database... Pin
Roger Wright15-Feb-03 6:18
professionalRoger Wright15-Feb-03 6:18 
GeneralRe: Setting the lenght of a text field in an SQL Access database... Pin
Member 9615-Feb-03 8:58
Member 9615-Feb-03 8:58 
GeneralRe: Setting the lenght of a text field in an SQL Access database... Pin
IrishSonic16-Feb-03 1:32
IrishSonic16-Feb-03 1:32 
QuestionHow can i send message from one view to the other ? Pin
muna_utkal15-Feb-03 2:08
muna_utkal15-Feb-03 2:08 
AnswerRe: How can i send message from one view to the other ? Pin
João Paulo Figueira15-Feb-03 5:31
professionalJoão Paulo Figueira15-Feb-03 5:31 
AnswerRe: How can i send message from one view to the other ? Pin
valikac15-Feb-03 6:56
valikac15-Feb-03 6:56 
GeneralRe: How can i send message from one view to the other ? Pin
AlexO15-Feb-03 10:17
AlexO15-Feb-03 10:17 
GeneralRe: How can i send message from one view to the other ? Pin
valikac15-Feb-03 12:08
valikac15-Feb-03 12:08 
GeneralRotate(URGENT) Pin
satyavasu15-Feb-03 1:47
satyavasu15-Feb-03 1:47 
Questionlimited size of an application? Pin
includeh1015-Feb-03 1:32
includeh1015-Feb-03 1:32 
AnswerRe: limited size of an application? Pin
Anders Molin15-Feb-03 1:57
professionalAnders Molin15-Feb-03 1:57 

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.