|
Does it still happen if you remove the calls to Delete() and FileWrite() ? Have you stepped into CWinApp::ExitInstance() to note where that debug message is being printed from?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
if i remove delete() call there is no error but without delete CWinApp object isn't destroyed and application doesn't turns off and i can see it in task manager process list
|
|
|
|
|
|
edvintas wrote: ...without delete CWinApp object isn't destroyed...
The CWinApp -derived object does not get destroyed until it goes out of scope, which is one of the very last things to happen since it is a global variable. You need to debug into the Delete() call to see why it is misbehaving.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
when i debug my application it stops here:
***dbgheap.c***<br />
<pre>...
HERE>>> _ASSERTE(_CrtIsValidHeapPointer(pUserData));
...</pre><br />
<br />
but it says nothing for me :-O<br />
any ideas? :^)
|
|
|
|
|
edvintas wrote: but it says nothing for me
Me either, since you've not shown any supporting code.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
ok, short summary of my application: CWinApp creates thread and invisible window.
After 5sec. thread terminates and it should terminate the application but it don't.
BOOL CpKloggerApp::InitInstance()<br />
{<br />
hookThr = new pKhookT();<br />
hWnd = new HookWnd();<br />
m_pMainWnd = hWnd;<br />
return true;<br />
}<br />
pKhookT::~pKhookT()<br />
{<br />
theApp.m_pMainWnd->DestroyWindow();<br />
theApp.Delete();<br />
} thats all
i think i would better use win32api
in MFC to many mysterious sh*t happens however i almost like it
|
|
|
|
|
A secondary thread should not be allowed to terminate the application. It should simply post a message back to the primary thread indicating that the application should shut down.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hi , i want to create an application in which :
When someone write a word (key variable) the application will bring
others information
For example :
ID | Name | Last name | Birth date |
241 | John | Papadopoulos| 19/01/1980 |
541 | James | Smiths | 01/05/1970 |
so i will have 4 member variables (i think) and
ID , Name , Lname , Birthdate
When someone gives ID 241 then the other 3 variables
(Name , Lname , Birthdate) will get the data next to 241
(thats Data structures ?:P)
Now my question . Anyone could suggest me a link where
it will have information/guide on how i will make this ?
guide on how i will do this
|
|
|
|
|
a simple list ( or vector ) can be used to hold your structures; for small number of entries it will not be an issue.
// simplified solution
class Entry
{
int ID;
std::string name;
std::string last_name;
std::string birth_data; /// as a string.
}
std::vector<entry> EntryVector;
when user enters an ID, just loop the vector to find the matching ID, samething for other fields.
|
|
|
|
|
hm yes :S i didnt said the important think
I want , User be able to create the list (insert data)
But how i will save the values of the 4 member variables ?
(so i will be able afterwards search them )
PS : just loop the vector to find the matching ID how i do that ?
|
|
|
|
|
IMO, it looks like a database application for me. I think this should be the way to go. But now, you have to first know which 'technology' you want to use (which kind of database). And for that part, I'm not very experienced...
|
|
|
|
|
well i thought that too but data base = mysql ?
but i dont thing so that the video clubs that got a application
with all the renters , uses mysql
(on C++ i tried to crate Data base project and it ask my for dns login name pass etc :S)
I thought to work with edit text fuctions
(so in each line the first 10 letters/spaces will be for the ID
next 20 for Name next 20 for Lname next 10 for BirthDate)
(so with a buffer gonna read first 10 letters in each line
and when the ID is the same value with the value the User
have given it will collect the other 3 information
Just my University teacher told me it would be easy doing
it with Data structures
|
|
|
|
|
It is very difficult to understand you, can you please make a little effort on your spelling ?
Immunity18 wrote: data base = mysql ?
As far as I know, SQL is only a language to access your database in an uniform way. For mySQL, I don't know what it is exactly but it is certainly not the only database type that exists.
Immunity18 wrote: but i dont thing so that the video clubs that got a application
with all the renters , uses mysql
I don't understand what you are trying to say. Anyway, I'm almost sure that video clubs systems use a database to store their customer data. For me, that seems the most adequate thing to do.
Immunity18 wrote: (on C++ i tried to crate Data base project and it ask my for dns login name pass etc :S)
I'm not experienced with databases but there are several ways to do it (I thin you tried through the wizard, whihc I don't really like). If you make a search on this website, you'll find a lot of usefull classes to help you.
Immunity18 wrote: I thought to work with edit text fuctions
(so in each line the first 10 letters/spaces will be for the ID
next 20 for Name next 20 for Lname next 10 for BirthDate)
(so with a buffer gonna read first 10 letters in each line
and when the ID is the same value with the value the User
have given it will collect the other 3 information
Yes, I know what you want to do but it will be much more efficient to do it using database (I you don't need to to write all the stuff to read the files, parsing and searching... everything is handled by the database classes). Of course, you need to spend a little bit of time to understand how it works.
Immunity18 wrote: Just my University teacher told me it would be easy doing
it with Data structures
You can use a database and still use data structures to manage your data.
|
|
|
|
|
Cedric Moonen wrote: I'm not experienced with databases but there are several ways to do it (I thin you tried through the wizard, whihc I don't really like). If you make a search on this website, you'll find a lot of usefull classes to help you.
thx i will try that ( i had search info about Data structures and didnt finding something useful ) i will search about Data Bases
Cedric Moonen wrote: Yes, I know what you want to do but it will be much more efficient to do it using database (I you don't need to to write all the stuff to read the files, parsing and searching... everything is handled by the database classes). Of course, you need to spend a little bit of time to understand how it works.
I think you have understand me and yes i dont like to make the application as i said (I know how to edit text etc , but i dont
know how to use databases / data structures , so i want to try
make this project with databases and get some skill on this type
of projects.
|
|
|
|
|
yes, mySQL can be used to do this, but I'm no expert.
but i dont thing so that the video clubs that got a application
with all the renters , uses mysql
Immunity18 wrote: I thought to work with edit text fuctions
(so in each line the first 10 letters/spaces will be for the ID
next 20 for Name next 20 for Lname next 10 for BirthDate)
(so with a buffer gonna read first 10 letters in each line
and when the ID is the same value with the value the User
have given it will collect the other 3 information
NO!
use a struct or a class it will be so much simpler in the long run.
since it's for a school project, I will suggest you keep away from mySQL, and simply use list or vector to keep the data; I'm not sure you will be able to manage sql stuff.
|
|
|
|
|
well i know how to use Mysql (create tables ,Primary keys ,foreign keys etc , INSERT INTO xxx VALUES(); etc )
but i dont know how i can connect Mysql in my program
using list + vector to keep the data this will be a permenatly save?
I want my program to create a data base (i think its a data base) with the 4 member variables
And i just cant understand (if the suggestions you give me is for that) where the data will been saved :S (so i can callback)
|
|
|
|
|
hm my teacher said to use class (he said something that the type of this class dont have fuction ? so only the values of the "data" ?)
(i cant explain well in english :P)
|
|
|
|
|
Immunity18 wrote:
But how i will save the values of the 4 member variables ?
Entry e;
e.ID = 241;
e.name = "John";
e.last_name = "Papadopoulos";
e.birth_data = "19/01/1980";
EntryVector.push_back(e);
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
so when i close the application these values will be saved somewhere in my hard disk ? (same folder with the application?)
And when i will run agian the application and give id 241 it will be show me this register? ( ID=241 , Name = John , Lname = Papadopoulos Birthdate = "19/01/1980"
|
|
|
|
|
no, but I think that part of your job to do this !!
Go back to your notes, books and lectures, and read a little bit, I'm pretty certain this was all covered somewhere.
|
|
|
|
|
well i have not notes i am on the third year in university (I was idiot i didnt take part on the lectures in the first 1.5 year )
So i didnt take part on course Data structures.
Databases we do on Mysql only :S
I did take part on Software Techologies ( and made a exam-exersice Program that plays mp3 and download mp3 from server (+chat ? ) took 10/10 degree \o/ )
But i have Big holes on C++ ( i dont say i know C++ :P )
Thats a bit of my life ! (trash text !:P)
Now i look in my Data structures book and find things that i cant connect with my work (Binary Trees etc ):/
My teacher on that course dont know Programming code (she is intresting on the UI of the application) (so no notes about code from her
(and about code programming i had ask my last year teacher who knows much )
-- modified at 15:48 Thursday 2nd November, 2006
|
|
|
|
|
Immunity18 wrote: Now i look in my Data structures book and find things that i cant connect with my work (Binary Trees etc ):/
My teacher on that course dont know Programming code (she is intresting on the UI of the application) (so no notes about code from her
A data structures teacher that doesn't know programming code. That's reassuring.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Immunity18 wrote: so when i close the application these values will be saved somewhere in my hard disk ? (same folder with the application?)
Not unless you employed some sort of file I/O.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
hm yes and which is the way to do that ?
(allready start searching about Data bases class on this site )
|
|
|
|