Welcome! Log In Create A New Profile

Advanced

Ezwin "not responding"

Posted by Qwatcha 
Announcements Last Post
Announcement SoC Curricula 09/30/2017 01:08PM
Announcement Demarcation or scoping of examinations and assessment 02/13/2017 07:59AM
Announcement School of Computing Short Learning Programmes 11/24/2014 08:37AM
Announcement Unisa contact information 07/28/2011 01:28PM
Ezwin "not responding"
May 06, 2006 01:19PM
Ezwin is giving me sum trouble im using mvc++ 6.0
after ive compiled my prog and i run the executable, a second or so after ezwin opens, it freezes and says "not responding".

however for very basic progs using ezwin it doesnt freeze

example of prog that doesnt freeze:

#include "ezwin.h"
#include "rect.h"

	SimpleWindow MyWindow("EZWin Tutorial"winking smiley;

int ApiMain() {
	RectangleShape MyRect(MyWindow, Position(2, 2));
	MyWindow.Open();
	MyRect.Draw();
	return 0;
}

example of prog that freezes:

#include <iostream>
#include <string>
#include "rect.h"
using namespace std;

int ApiMain()
{
	const float Unit = 0.25;
	cout << "Enter size of data set: ";
	int n;
	cin >> n;
	SimpleWindow W("Data set display", n+2, 10);
	W.Open();
	for (float x = 1; x<= n; ++x) {
		cout << "Enter data value (n): ";
		float y;
		cin >> y;
		RectangleShape Point(W, x, y, Blue, Unit, Unit);
			Point.Draw();
	}
	cout << "Type Ctrl-C to remove the display and exit" << endl;
	char AnyChar;
	cin >> AnyChar;
	W.Close();
	return 0;
}
Re: Ezwin "not responding"
May 12, 2006 01:00PM
To rectify this problem, first read in all the data and store it in an array, before you open the Ezwin window and start displaying.
Sorry, only registered users may post in this forum.

Click here to login