Click here to Skip to main content
15,914,111 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Generalcoledatetime format error in debug mode! Pin
stick0422-Feb-05 16:02
stick0422-Feb-05 16:02 
GeneralRe: coledatetime format error in debug mode! Pin
David Crow23-Feb-05 2:35
David Crow23-Feb-05 2:35 
GeneralDraw rectangle, but it single color!!! Pin
JAMANAKA22-Feb-05 15:34
JAMANAKA22-Feb-05 15:34 
GeneralRe: Draw rectangle, but it single color!!! Pin
Christian Graus22-Feb-05 16:09
protectorChristian Graus22-Feb-05 16:09 
GeneralRe: Draw rectangle, but it single color!!! Pin
Hamed Musavi22-Feb-05 16:18
Hamed Musavi22-Feb-05 16:18 
GeneralRe: Draw rectangle, but it single color!!! Pin
John R. Shaw22-Feb-05 16:32
John R. Shaw22-Feb-05 16:32 
GeneralRe: Draw rectangle, but it single color!!! Pin
Ryan Binns22-Feb-05 17:15
Ryan Binns22-Feb-05 17:15 
GeneralExtensible interfaces? WHY SO HARD!?! Pin
Will115722-Feb-05 15:30
sussWill115722-Feb-05 15:30 
Hi guys,
Im trying to develop an application that takes in a video image and derives a bunch of information from it. The problem is that there is ALOT of info to be displayed and I want to be able to make the interface extensible and add/remove "Dialog bars" from it that have controls in them such as CEdits, combos etc.

I started out with a dialog based application, then went to an SDI for its support of dockable Dialog bars, but now Im running into the issue that I can handle events for the controls, but I cant setup variables to control the data in them. i.e. I setup a message map but I get assertion issue when I try and use UpdateData(), if I use it in a global context in the mainfrm then I get an error. Now if I specify the dialogbox that has the Edit control in it I want to update i.e. m_wndViewTrans.UpdateData() then it does nothing with no error.

Specifically here are some code snippets:
From MainFrm.H:
/////////////////////////////////////////////////////////////////////////////
// CMainFrame

IMPLEMENT_DYNCREATE(CMainFrame, CFrameWnd)

void CMainFrame::DoDataExchange(CDataExchange* pDX)
{
CFrameWnd::DoDataExchange(pDX);
//{{AFX_DATA_MAP(ViewTrans)
DDX_Text(pDX, IDC_00, m_Edit00);
//Where IDC_00 is a edit box in a dialog resource(IDD_ViewTrans).
//}}AFX_DATA_MAP
}

In the OnCreate():
if(!m_wndViewTrans.Create(this,
IDD_ViewTrans,
CBRS_LEFT | CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY,
IDD_ViewTrans) )
{
TRACE0(_T("Failed to create the toolbox\n"));
return -1;
}

Then a button on another toolbar is clicked causing the Edit box to be updated. The message map is omitted, trust me it works.

void CMainFrame::OnCalibPos()
{
m_Edit00 = 5.0;
m_wndViewTrans.UpdateData(FALSE);
}
From MainFrm.H
class CMainFrame : public CFrameWnd
{

protected: // create from serialization only
CMainFrame();
DECLARE_DYNCREATE(CMainFrame)

// Attributes
public:

// Operations
public:
// Dialog Data
//{{AFX_DATA(ViewTrans)
enum { IDD = IDD_ViewTrans };
//CComboBox m_Combo;
double m_Edit00;

and the rest...

PLEASE TELL ME WHAT I AM DOING WRONG... is what Im trying to do impossible? It builds with no errors, but it does nothing.

ALSO if anyone has any other ways to be able to create a bunch of modeless dialogs that can be docked and have message maps I would be greatly appreciated.

FURTHERMORE, if what I appear to be doing is complete garbage you are probabaly right, this is only my second MFC app.

Cheers, and thanks,
Will.
GeneralRe: Extensible interfaces? WHY SO HARD!?! Pin
John R. Shaw22-Feb-05 17:24
John R. Shaw22-Feb-05 17:24 
GeneralWM_SIZE issue w/ Raw Win32s Pin
realloc22-Feb-05 14:26
realloc22-Feb-05 14:26 
GeneralRe: WM_SIZE issue w/ Raw Win32s Pin
Blake Miller23-Feb-05 4:45
Blake Miller23-Feb-05 4:45 
GeneralRe: WM_SIZE issue w/ Raw Win32s Pin
realloc23-Feb-05 15:39
realloc23-Feb-05 15:39 
GeneralRe: WM_SIZE issue w/ Raw Win32s Pin
Blake Miller24-Feb-05 5:46
Blake Miller24-Feb-05 5:46 
GeneralRe: WM_SIZE issue w/ Raw Win32s Pin
realloc24-Feb-05 12:11
realloc24-Feb-05 12:11 
GeneralMainMenu component Pin
MDowning22-Feb-05 14:10
MDowning22-Feb-05 14:10 
GeneralGathering ethernet network statistics Pin
Bail Organa22-Feb-05 13:55
Bail Organa22-Feb-05 13:55 
GeneralRe: Gathering ethernet network statistics Pin
David Crow22-Feb-05 14:07
David Crow22-Feb-05 14:07 
GeneralRe: Gathering ethernet network statistics Pin
Bail Organa23-Feb-05 10:19
Bail Organa23-Feb-05 10:19 
GeneralRe: Gathering ethernet network statistics Pin
David Crow23-Feb-05 10:28
David Crow23-Feb-05 10:28 
GeneralOnDraw() troubles.... Pin
bitpusher22-Feb-05 10:34
bitpusher22-Feb-05 10:34 
GeneralRe: OnDraw() troubles.... Pin
John R. Shaw22-Feb-05 16:10
John R. Shaw22-Feb-05 16:10 
GeneralRe: OnDraw() troubles.... Pin
bitpusher23-Feb-05 6:40
bitpusher23-Feb-05 6:40 
GeneralRe: OnDraw() troubles.... Pin
bobi_zcl22-Feb-05 21:50
bobi_zcl22-Feb-05 21:50 
GeneralRe: OnDraw() troubles.... Pin
bitpusher23-Feb-05 6:36
bitpusher23-Feb-05 6:36 
GeneralSTL sort functor question Pin
Maximilien22-Feb-05 10:03
Maximilien22-Feb-05 10:03 

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.