Click here to Skip to main content
15,920,896 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionSerial I/O in Non-Overlapped mode .... Pin
Mohammd Bilal19-Nov-06 21:08
Mohammd Bilal19-Nov-06 21:08 
AnswerRe: Serial I/O in Non-Overlapped mode .... Pin
Roger Stoltz19-Nov-06 21:36
Roger Stoltz19-Nov-06 21:36 
AnswerRe: Serial I/O in Non-Overlapped mode .... Pin
CPallini20-Nov-06 2:24
mveCPallini20-Nov-06 2:24 
QuestionHow to draw the window border by myself ? Pin
samfromcn19-Nov-06 21:08
samfromcn19-Nov-06 21:08 
QuestionHow to get mouse selected text? thanks ... Pin
tiaozi19-Nov-06 20:46
tiaozi19-Nov-06 20:46 
AnswerRe: How to get mouse selected text? thanks ... Pin
Rajesh R Subramanian19-Nov-06 23:20
professionalRajesh R Subramanian19-Nov-06 23:20 
Answerchildfrm Pin
Programm3r20-Nov-06 4:47
Programm3r20-Nov-06 4:47 
AnswerMainfrm Pin
Programm3r20-Nov-06 4:48
Programm3r20-Nov-06 4:48 
MAINFRM
<br />
// MainFrm.cpp : implementation of the CMainFrame class<br />
//<br />
// This is a part of the Microsoft Foundation Classes C++ library.<br />
// Copyright (C) 1992-1998 Microsoft Corporation<br />
// All rights reserved.<br />
//<br />
// This source code is only intended as a supplement to the<br />
// Microsoft Foundation Classes Reference and related<br />
// electronic documentation provided with the library.<br />
// See these sources for detailed information regarding the<br />
// Microsoft Foundation Classes product.<br />
<br />
#include "stdafx.h"<br />
#include "Scribble.h"<br />
<br />
#include "MainFrm.h"<br />
<br />
#ifdef _DEBUG<br />
#define new DEBUG_NEW<br />
#undef THIS_FILE<br />
static char THIS_FILE[] = __FILE__;<br />
#endif<br />
<br />
/////////////////////////////////////////////////////////////////////////////<br />
// CMainFrame<br />
<br />
IMPLEMENT_DYNAMIC(CMainFrame, CMDIFrameWnd)<br />
<br />
BEGIN_MESSAGE_MAP(CMainFrame, CMDIFrameWnd)<br />
	//{{AFX_MSG_MAP(CMainFrame)<br />
		// NOTE - the ClassWizard will add and remove mapping macros here.<br />
		//    DO NOT EDIT what you see in these blocks of generated code !<br />
	ON_WM_CREATE()<br />
	//}}AFX_MSG_MAP<br />
END_MESSAGE_MAP()<br />
<br />
static UINT indicators[] =<br />
{<br />
	ID_SEPARATOR,           // status line indicator<br />
	ID_INDICATOR_CAPS,<br />
	ID_INDICATOR_NUM,<br />
	ID_INDICATOR_SCRL,<br />
};<br />
<br />
/////////////////////////////////////////////////////////////////////////////<br />
// CMainFrame construction/destruction<br />
<br />
CMainFrame::CMainFrame()<br />
{<br />
	// TODO: add member initialization code here<br />
<br />
}<br />
<br />
CMainFrame::~CMainFrame()<br />
{<br />
}<br />
<br />
int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)<br />
{<br />
	if (CMDIFrameWnd::OnCreate(lpCreateStruct) == -1)<br />
		return -1;<br />
<br />
	if (!m_wndToolBar.Create(this) ||<br />
		!m_wndToolBar.LoadToolBar(IDR_MAINFRAME))<br />
	{<br />
		TRACE0("Failed to create toolbar\n");<br />
		return -1;      // fail to create<br />
	}<br />
<br />
	if (!m_wndStatusBar.Create(this) ||<br />
		!m_wndStatusBar.SetIndicators(indicators,<br />
		  sizeof(indicators)/sizeof(UINT)))<br />
	{<br />
		TRACE0("Failed to create status bar\n");<br />
		return -1;      // fail to create<br />
	}<br />
<br />
	// TODO: Remove this if you don't want tool tips<br />
	m_wndToolBar.SetBarStyle(m_wndToolBar.GetBarStyle() |<br />
		CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC);<br />
<br />
	// TODO: Delete these three lines if you don't want the toolbar to<br />
	//  be dockable<br />
	m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);<br />
	EnableDocking(CBRS_ALIGN_ANY);<br />
	DockControlBar(&m_wndToolBar);<br />
<br />
<br />
	return 0;<br />
}<br />
<br />
BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)<br />
{<br />
	// TODO: Modify the Window class or styles here by modifying<br />
	//  the CREATESTRUCT cs<br />
<br />
	return CMDIFrameWnd::PreCreateWindow(cs);<br />
}<br />
<br />
/////////////////////////////////////////////////////////////////////////////<br />
// CMainFrame diagnostics<br />
<br />
#ifdef _DEBUG<br />
void CMainFrame::AssertValid() const<br />
{<br />
	CMDIFrameWnd::AssertValid();<br />
}<br />
<br />
void CMainFrame::Dump(CDumpContext& dc) const<br />
{<br />
	CMDIFrameWnd::Dump(dc);<br />
}<br />
<br />
#endif //_DEBUG<br />
<br />
/////////////////////////////////////////////////////////////////////////////<br />
// CMainFrame message handlers<br />
<br />
// HEADER //<br />
// MainFrm.h : interface of the CMainFrame class<br />
//<br />
// This is a part of the Microsoft Foundation Classes C++ library.<br />
// Copyright (C) 1992-1998 Microsoft Corporation<br />
// All rights reserved.<br />
//<br />
// This source code is only intended as a supplement to the<br />
// Microsoft Foundation Classes Reference and related<br />
// electronic documentation provided with the library.<br />
// See these sources for detailed information regarding the<br />
// Microsoft Foundation Classes product.<br />
/////////////////////////////////////////////////////////////////////////////<br />
<br />
class CMainFrame : public CMDIFrameWnd<br />
{<br />
	DECLARE_DYNAMIC(CMainFrame)<br />
public:<br />
	CMainFrame();<br />
<br />
// Attributes<br />
public:<br />
<br />
// Operations<br />
public:<br />
<br />
// Overrides<br />
	// ClassWizard generated virtual function overrides<br />
	//{{AFX_VIRTUAL(CMainFrame)<br />
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);<br />
	//}}AFX_VIRTUAL<br />
<br />
// Implementation<br />
public:<br />
	virtual ~CMainFrame();<br />
#ifdef _DEBUG<br />
	virtual void AssertValid() const;<br />
	virtual void Dump(CDumpContext& dc) const;<br />
#endif<br />
<br />
protected:  // control bar embedded members<br />
	CStatusBar  m_wndStatusBar;<br />
	CToolBar    m_wndToolBar;<br />
<br />
// Generated message map functions<br />
protected:<br />
	//{{AFX_MSG(CMainFrame)<br />
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);<br />
		// NOTE - the ClassWizard will add and remove member functions here.<br />
		//    DO NOT EDIT what you see in these blocks of generated code!<br />
	//}}AFX_MSG<br />
	DECLARE_MESSAGE_MAP()<br />
};<br />
<br />
/////////////////////////////////////////////////////////////////////////////<br />


The only programmers that are better than C programmers are those who code in 1's and 0's..... Smile | :)

Smile | :) Programm3r

Questionset transparent to slidercontrol background... Pin
klvin19-Nov-06 19:53
klvin19-Nov-06 19:53 
AnswerRe: set transparent to slidercontrol background... Pin
prasad_som19-Nov-06 20:09
prasad_som19-Nov-06 20:09 
GeneralRe: set transparent to slidercontrol background... Pin
klvin20-Nov-06 1:22
klvin20-Nov-06 1:22 
Generalc++ constructor Pin
Swetha Desai19-Nov-06 19:00
Swetha Desai19-Nov-06 19:00 
GeneralRe: c++ constructor Pin
Parthi_Appu19-Nov-06 19:46
Parthi_Appu19-Nov-06 19:46 
GeneralRe: c++ constructor Pin
tiaozi19-Nov-06 20:48
tiaozi19-Nov-06 20:48 
QuestionHow I can resize the web page size in Microsoft web browser? Pin
Sameer_Thakur19-Nov-06 18:58
Sameer_Thakur19-Nov-06 18:58 
AnswerRe: How I can resize the web page size in Microsoft web browser? Pin
Parthi_Appu19-Nov-06 19:44
Parthi_Appu19-Nov-06 19:44 
QuestionWriting an iterator for your class Pin
HondaCBR60019-Nov-06 18:29
HondaCBR60019-Nov-06 18:29 
AnswerRe: Writing an iterator for your class Pin
Sceptic Mole19-Nov-06 22:14
Sceptic Mole19-Nov-06 22:14 
Questionsetfocus not working Pin
prithaa19-Nov-06 17:21
prithaa19-Nov-06 17:21 
AnswerRe: setfocus not working Pin
Parthi_Appu19-Nov-06 17:25
Parthi_Appu19-Nov-06 17:25 
AnswerRe: setfocus not working Pin
toxcct20-Nov-06 0:50
toxcct20-Nov-06 0:50 
AnswerRe: setfocus not working Pin
Mark Salsbery20-Nov-06 6:53
Mark Salsbery20-Nov-06 6:53 
QuestionHow do I access a c# class from vc++? Pin
malayalite19-Nov-06 16:08
malayalite19-Nov-06 16:08 
AnswerRe: How do I access a c# class from vc++? Pin
Christian Graus19-Nov-06 17:00
protectorChristian Graus19-Nov-06 17:00 
GeneralRe: How do I access a c# class from vc++? Pin
malayalite19-Nov-06 18:27
malayalite19-Nov-06 18:27 

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.