|
모두 생성하면 12,000개 가량 되는데...
윈도우OS의 자원이 무한히 많은것이 아니라서 이렇게 많은 수의 컨트롤을 생성할 수 없습니다.
왜 이렇게 많은 컨트롤이 필요한지는 모르겠지만... 다른 방법을 찾아보세요.
되도록이면 생성하는 컨트롤을 줄이시는게 좋을듯합니다.
부산촌님 님이 쓰신 글 :
: 실행을 하면 아래와 같은 에러 메세지가 뜸니다..
: 방법이 없을까요?
:
: "EThead creation error: 사용 가능한 저장소가 부족하여 이 명령을 처리할 수 없읍니다."
:
: 참고로 작성한 클래스 입니다.
:
: #define TABCount 3
: #define MAXLightHouse 50
:
: #define TITLEPNLCOLOR clWhite
: #define TITLEPNLSELECTCOLOR 0x00DFFEFF
: #define TITLEPNLERRORCOLOR clRed
: #define CHARTCOLORBANDCOLOR 0xCDCDCD
: #define CHARTCOLORBANDTRANSPARENT 70
: #define CHARTSERISEROSECOLOR clBlue
: #define CHARTSERISECOLOR clBlue
:
:
: typedef struct
: {
: TPageControl *PC;
: TScrollBox *ScrBox[TABCount];
:
: TPanel *pnlChart;
:
: TPanel *pnlMain[TABCount];
: TPanel *pnlWeather[TABCount][MAXLightHouse];
:
: TPanel *pnlLHTitle[TABCount][MAXLightHouse];
: TImage *imgLH1[TABCount][MAXLightHouse];
: TImage *imgLH2[TABCount][MAXLightHouse];
:
: TPanel *pnlWind[TABCount][MAXLightHouse];
: TImage *imgWind1[TABCount][MAXLightHouse];
: TImage *imgWind2[TABCount][MAXLightHouse];
: TImage *imgWind3[TABCount][MAXLightHouse];
: TImage *imgWind4[TABCount][MAXLightHouse];
: TLabel *lbWind[TABCount][MAXLightHouse];
: TiCompass *icWind[TABCount][MAXLightHouse];
:
: TChart *chWind[TABCount][MAXLightHouse];
: TFastLineSeries *WsWind[TABCount][MAXLightHouse];
: TMarksTipTool *MarkWind[TABCount][MAXLightHouse];
: TColorBandTool *ColorbandWind[TABCount][MAXLightHouse];
:
: TiSpectrumDisplay *isdWind[TABCount][MAXLightHouse];
:
: TColorBandTool *WrkCB;
:
: TPanel *pnlWave[TABCount][MAXLightHouse];
: TImage *imgWave1[TABCount][MAXLightHouse];
: TImage *imgWave2[TABCount][MAXLightHouse];
: TImage *imgWave3[TABCount][MAXLightHouse];
: TImage *imgWave4[TABCount][MAXLightHouse];
: TLabel *lbWave[TABCount][MAXLightHouse];
: TiCompass *icWave[TABCount][MAXLightHouse];
:
: TChart *chWave[TABCount][MAXLightHouse];
: TFastLineSeries *WsWave[TABCount][MAXLightHouse];
: TMarksTipTool *MarkWave[TABCount][MAXLightHouse];
: TColorBandTool *ColorbandWave[TABCount][MAXLightHouse];
:
: TiSpectrumDisplay *isdWave[TABCount][MAXLightHouse];
:
: TPanel *pnlEtc[TABCount][MAXLightHouse];
: TImage *imgEtc1[TABCount][MAXLightHouse];
: TImage *imgEtc2[TABCount][MAXLightHouse];
: TImage *imgEtc3[TABCount][MAXLightHouse];
: TImage *imgEtc4[TABCount][MAXLightHouse];
:
: //기온
: TPanel *pnlAT[TABCount][MAXLightHouse];
: TPanel *pnlATValue[TABCount][MAXLightHouse];
: TPanel *pnlATName[TABCount][MAXLightHouse];
: TiSpectrumDisplay *isdAT[TABCount][MAXLightHouse];
:
: TChart *chAT[TABCount][MAXLightHouse];
: TFastLineSeries *WsAT[TABCount][MAXLightHouse];
: TMarksTipTool *MarkAT[TABCount][MAXLightHouse];
: TColorBandTool *ColorbandAT[TABCount][MAXLightHouse];
:
: TPanel *pnlATUnit[TABCount][MAXLightHouse];
:
: TPanel *pnlAH[TABCount][MAXLightHouse];
: TPanel *pnlAHValue[TABCount][MAXLightHouse];
: TPanel *pnlAHName[TABCount][MAXLightHouse];
: TiSpectrumDisplay *isdAH[TABCount][MAXLightHouse];
:
: TChart *chAH[TABCount][MAXLightHouse];
: TFastLineSeries *WsAH[TABCount][MAXLightHouse];
: TMarksTipTool *MarkAH[TABCount][MAXLightHouse];
: TColorBandTool *ColorbandAH[TABCount][MAXLightHouse];
:
: TPanel *pnlAHUnit[TABCount][MAXLightHouse];
:
: TPanel *pnlAP[TABCount][MAXLightHouse];
: TPanel *pnlAPValue[TABCount][MAXLightHouse];
: TPanel *pnlAPName[TABCount][MAXLightHouse];
: TiSpectrumDisplay *isdAP[TABCount][MAXLightHouse];
:
: TChart *chAP[TABCount][MAXLightHouse];
: TFastLineSeries *WsAP[TABCount][MAXLightHouse];
: TMarksTipTool *MarkAP[TABCount][MAXLightHouse];
: TColorBandTool *ColorbandAP[TABCount][MAXLightHouse];
:
: TPanel *pnlAPUnit[TABCount][MAXLightHouse];
:
: TPanel *pnlWT[TABCount][MAXLightHouse];
: TPanel *pnlWTValue[TABCount][MAXLightHouse];
: TPanel *pnlWTName[TABCount][MAXLightHouse];
: TiSpectrumDisplay *isdWT[TABCount][MAXLightHouse];
:
: TChart *chWT[TABCount][MAXLightHouse];
: TFastLineSeries *WsWT[TABCount][MAXLightHouse];
: TMarksTipTool *MarkWT[TABCount][MAXLightHouse];
: TColorBandTool *ColorbandWT[TABCount][MAXLightHouse];
:
: TPanel *pnlWTUnit[TABCount][MAXLightHouse];
:
: TChart *Chart[6];
: TFastLineSeries *Ws[4];
: TWindRoseSeries *Rose[2];
: bool flagDBWrite;
: int pInx;
: int Warning[MAXLightHouse];
: int ClearWarning[MAXLightHouse];
:
: float ATLimite[2];
: float APLimite[2];
: float AHLimite[2];
: float WTLimite[2];
: float WindLimite[2];
: float WaveLimite[2];
:
: //메인 데이타 컨넥션
: TADOConnection *DB_Con;
:
: }strWeather;
:
: class TDesignWeather
: {
: private:
: int CntCenter;
: int CntWeather[TABCount];
: bool flagDBConOk;
: bool OpenConnection(void);
: TImage *imgDot,*imgOnDot;
:
: void TDesignCreatePageControl(TWinControl *F);
: void TDesignCreateScrollBox(TWinControl *F);
: void TDesignCreatePnlMain(TWinControl *F);
: void TDesignCreatePnlWeather(TWinControl *F);
: void TDesignCreatePnlTitle(TWinControl *F);
: void TDesignCreatePnlWind(TWinControl *F);
: void TDesignCreatePnlWave(TWinControl *F);
:
: public:
: int OneLHWidth;
: int OneLHHeight;
:
: int pnlLHTitleHeight;
:
: int pnlChartWidth;
: int pnlOneChartHeight; //기상챠트의 패널1개당 높이
: int campasWidth;
: int innerPnlWidth;
: int OuterPnlWidth;
: int isdHeight;
: int EtcValueHeight;
:
: strWeather W;
: public:
: TDesignWeather();
: ~TDesignWeather();
: void TDesignPanels(TWinControl *F);
: };
:
: 이렇게 하여 모든 컴포넌트를 동적으로 생성 시켜 실행하면
: 위와같은 메세지가 나옴니다.
:
: 부디 고수님등의 해결 방안을 부탁 드립니다..
|