Click here to Skip to main content
16,007,443 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: C runtime processing Pin
Christian Graus16-Dec-02 0:51
protectorChristian Graus16-Dec-02 0:51 
GeneralRe: C runtime processing Pin
Jeff J16-Dec-02 0:58
Jeff J16-Dec-02 0:58 
GeneralHELP!? Pin
User 665816-Dec-02 2:21
User 665816-Dec-02 2:21 
Generalillegal operation Pin
ArunKGoyal15-Dec-02 22:37
ArunKGoyal15-Dec-02 22:37 
GeneralRe: illegal operation Pin
Christian Graus15-Dec-02 22:53
protectorChristian Graus15-Dec-02 22:53 
GeneralRe: illegal operation Pin
ArunKGoyal15-Dec-02 23:22
ArunKGoyal15-Dec-02 23:22 
GeneralRe: illegal operation Pin
Daniel Strigl15-Dec-02 23:59
Daniel Strigl15-Dec-02 23:59 
GeneralRe: illegal operation Pin
ArunKGoyal16-Dec-02 0:30
ArunKGoyal16-Dec-02 0:30 
Although this problem is not consistent.

the cpp file is :

// ProtComPortDlg.cpp : implementation file
//

#include "stdafx.h"
#include "FasGui.h"
#include "ProtComPortDlg.h"
#include "MainFrm.h"

#include "Music.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

bool CProtComPortDlg::bFasBmpFlag;
/////////////////////////////////////////////////////////////////////////////
// CProtComPortDlg dialog


CProtComPortDlg::CProtComPortDlg(CWnd* pParent /*=NULL*/)
: CDialog(CProtComPortDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(CProtComPortDlg)
m_nComPort1 = 1;
m_strPortSystemName = _T("Fas");
//}}AFX_DATA_INIT
}


void CProtComPortDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CProtComPortDlg)
DDX_Radio(pDX, IDC_PORTCOM1, m_nComPort1);
DDX_Text(pDX, IDC_PORTSYSTEMNAME, m_strPortSystemName);
//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CProtComPortDlg, CDialog)
//{{AFX_MSG_MAP(CProtComPortDlg)
ON_WM_SETCURSOR()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CProtComPortDlg message handlers


BOOL CProtComPortDlg::OnInitDialog()
{
CDialog::OnInitDialog();

// TODO: Add extra initialization here
SetIcon(AfxGetApp()->LoadIcon(IDR_MAIN),FALSE);


return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}

void CProtComPortDlg::OnCancel()
{
// TODO: Add extra cleanup here

CMusic MusicObj;
strSong = "Utopia.wav";
MusicObj.PlayMusic();

if(AfxMessageBox("This will terminate the application\nContinue with termination...",MB_YESNO|MB_ICONQUESTION) == IDYES)
{
PostQuitMessage(NULL);
}
//CDialog::OnCancel();
}

BOOL CProtComPortDlg::OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message)
{
// TODO: Add your message handler code here and/or call default
::SetCursor(::LoadCursor(AfxGetInstanceHandle(),MAKEINTRESOURCE(IDC_CDOT)));
return TRUE;

// return CDialog::OnSetCursor(pWnd, nHitTest, message);
}

I am calling the DoModal() of this class in MainFrm.cpp as:

if(ProtComPortDlgObj.DoModal()==IDOK)
{
//some processing
}

bye
GeneralRe: illegal operation Pin
Daniel Strigl16-Dec-02 1:09
Daniel Strigl16-Dec-02 1:09 
QuestionPreTranslateMessage Problem??? Pin
Lizp15-Dec-02 22:20
Lizp15-Dec-02 22:20 
Questioninteresting problem, easy way?? Pin
Sunnygirl15-Dec-02 21:26
Sunnygirl15-Dec-02 21:26 
AnswerRe: interesting problem, easy way?? Pin
Christian Graus15-Dec-02 21:34
protectorChristian Graus15-Dec-02 21:34 
GeneralRe: interesting problem, easy way?? Pin
Sunnygirl15-Dec-02 22:29
Sunnygirl15-Dec-02 22:29 
GeneralRe: interesting problem, easy way?? Pin
Christian Graus15-Dec-02 22:29
protectorChristian Graus15-Dec-02 22:29 
GeneralRe: interesting problem, easy way?? Pin
Sunnygirl15-Dec-02 22:49
Sunnygirl15-Dec-02 22:49 
GeneralRe: interesting problem, easy way?? Pin
Christian Graus15-Dec-02 23:03
protectorChristian Graus15-Dec-02 23:03 
GeneralRe: interesting problem, easy way?? Pin
Sunnygirl15-Dec-02 23:25
Sunnygirl15-Dec-02 23:25 
GeneralRe: interesting problem, easy way?? Pin
Christian Graus16-Dec-02 0:52
protectorChristian Graus16-Dec-02 0:52 
QuestionHow do i set the date to that of the computer Pin
dianazheng15-Dec-02 21:23
dianazheng15-Dec-02 21:23 
AnswerRe: How do i set the date to that of the computer Pin
Christian Graus15-Dec-02 21:35
protectorChristian Graus15-Dec-02 21:35 
GeneralEnumeration of Com Ports Pin
Wolfram Steinke15-Dec-02 20:41
Wolfram Steinke15-Dec-02 20:41 
GeneralRe: Enumeration of Com Ports Pin
Olli15-Dec-02 21:02
Olli15-Dec-02 21:02 
GeneralRe: Enumeration of Com Ports Pin
Wolfram Steinke15-Dec-02 21:34
Wolfram Steinke15-Dec-02 21:34 
GeneralRe: Enumeration of Com Ports Pin
Daniel Strigl15-Dec-02 21:03
Daniel Strigl15-Dec-02 21:03 
GeneralRe: Enumeration of Com Ports Pin
Wolfram Steinke15-Dec-02 21:51
Wolfram Steinke15-Dec-02 21:51 

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.