Ученик-кочегар
Группа: Участник
Сообщений: 17
|
имеется форма с фреймом.
CODE |
#ifndef FormMainH
#define FormMainH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <QControls.hpp>
#include <QStdCtrls.hpp>
#include <QForms.hpp>
#include <QMenus.hpp>
#include <QTypes.hpp>
#include "Frame.h"
#include <QExtCtrls.hpp>
//---------------------------------------------------------------------------
class TFormMain : public TForm{
__published: // IDE-managed Components
TFrame1 *F_Frame;
private: // User declarations
public: // User declarations
__fastcall TFormMain(TComponent* Owner);
};//---------------------------------------------------------------------------
extern PACKAGE TFormMain *FormMain;
//---------------------------------------------------------------------------
#endif
|
CODE |
#include <clx.h>
#pragma hdrstop
#include "FormMain.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma link "Frame"
#pragma resource "*.xfm"
TFormMain *FormMain;
__fastcall TFormMain::TFormMain(TComponent* Owner): TForm(Owner) {
Frame->RegUpdate();
}//---------------------------------------------------------------------------
|
CODE |
//---------------------------------------------------------------------------
#ifndef FrameH
#define FrameH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <QControls.hpp>
#include <QStdCtrls.hpp>
#include <QForms.hpp>
//---------------------------------------------------------------------------
class TFrame1: public TFrame{
__published: // IDE-managed Components
TEdit *Reg_AX;
private: // User declarations
public: // User declarations
void RegUpdate(void);
__fastcall TF_Registr(TComponent* Owner);
};//---------------------------------------------------------------------------
extern PACKAGE TFrame*Frame;
//---------------------------------------------------------------------------
#endif
|
CODE |
//---------------------------------------------------------------------------
#include <clx.h>
#pragma hdrstop
#include "Frame.h"
#include "FormMain.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.xfm"
TFrame1*Frame;
__fastcall TFrame1::Frame(TComponent* Owner) : TFrame(Owner) {
}//---------------------------------------------------------------------------
void TFrame1::RegUpdate(void){
Reg_AX->Text="sb"; // Здесь выкидывает ошибку
}//
|
Ошибка:
"Debugger Excepption Notification"
"Project i80186.exe raised exception class EAccessViolation with message 'Access violation at address 0041ECBF in module 'i80186.exe'. Read of address 000001B8'."
При просмотре идентификатор Reg_AX — " Undefined symbol"
Отредактировано PATRIOT — 27/02/2006, 17:21 |