|
This is normal behaviour. What exactly do you want to prevent? What do you mean by overloaded?
|
|
|
|
|
|
RomTibi wrote: ~95 - 100 %
Is that while the app is sitting idle (waiting for user input) or is it doing some work?
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
|
I know I've sent this once again! But It's really important to me
(Special Thanks To DavidCrow)
I've derived a class from CRecordset without passing a CDatabase object to it.
I've also defined a string (e.g strConnectionString ) in its GetDefaultConnection() function as connection string. It goes fine unless I close my app! In that case the following error message appears:
"The instruction at "0xefa005" referenced memory at "0xacdf14". The memory could not be "read". Click on OK to terminate the program."
Whem I pass the same connectioin string (e.g strConnectionString ) to a CDatabase object and then use it to construct my CRecordset derived class, I won't see the error message again.
(I'm in release mode! But I don't think It's matter)
Can anyone help me to get the reason PLS.
I really need it!
|
|
|
|
|
Usef Marzbani wrote: I've derived a class from CRecordset without passing a CDatabase object to it.
At any point in time do you try and use the set's m_pDatabase member?
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
I didn't get it! Can U explain a little more please?
|
|
|
|
|
Hi all,
How to upload an image file into mysql database using CDatabase connection... please send a samples if you have..
thanks in advance
|
|
|
|
|
If you cannot access Google from your location you should complain to your ISP.
Well I don't know why I thought I was in the ASP.NET forum but obviously I was wrong. Anyway maybe this will help[^]
Last modified: 53mins after originally posted --
led mike
|
|
|
|
|
What is the best way for preserving a tree control on its own dialog form that is called with a doModal? I need to be able to access the contents of the tree control after a user would hit the OK button.
|
|
|
|
|
Stuck At Zero wrote: I need to be able to access the contents of the tree control after a user would hit the OK button.
In general, the way to handle that is to retrieve the relevant information from the list control on the OnOk handler of your dialog (so, you store all the information you need into strings, integers or whatever non-GUI variables). Then, outside this class you can then access those members (preferably through get functions).
|
|
|
|
|
The problem I have is that there are 16,384 combinations for the user to specify. I originally thought of using a multi-dimensional array of 5 dimensions but I felt this was going to be ugly.
I then thought of trying to do a bit map but it seems MFC doesn't support this.
Finally I just decided that transferring things from the tree control was a waste of time so I was going to simply retraverse the tree as needed. But with the tree control "disappearing" after the OK button is hit, I've been thinking of simply making a regular tree to transfer the contents of the tree control over to the tree but MFC has no such thing it seems.
If I go the path you suggest, I'm thinking this will push me towards a 5-dimensional C-String array... but I'm right back where I started it seems.
|
|
|
|
|
What do you need to do with this data ? Do you really need to retrieve the complete tree structure ? If the tree control was not destroyed, what would you extract as information ?
|
|
|
|
|
I'm building an app that displays data from a binary file on a virtual grid. Since the binary file is huge, users want to be able to filter out unwanted data.
I won't know if any given set of data is desired until after I read it in and check it against the tree. If the message is desired, I keep its location stored. If the message is not desired, I discard its location while the virtual grid periodically updates itself based on what my app discovers to be desirable data.
|
|
|
|
|
In the extreme case, if you really need to keep the complete structure can't you model it ?
Something like a node class which contain data (its name for example, or extra information) and a list of nodes, which are its children. It's a bit more intuitive than a 5 dimensional string array
Of course you can add helper functions in that class to make browsing of the children easier.
|
|
|
|
|
Understood on the node class... I was hoping to avoid that and utilize something more straightforward without having to use a new class for that.
|
|
|
|
|
My tree is a user-specified filtering device composed of 8 root nodes.
Each root node represents a bus. Each bus has 32 nodes called RTs.
Each RT node has 2 nodes; One called Transmit, the other called Receive.
Each Transmit / Receive node has 32 nodes called Message.
The tree is 4 levels deep. I have also been asked to make it such that if all sibling nodes of a given level are not selected, but that the parent node of these sibling nodes is selected, that this implies a wildcard for all the sibling nodes and their decedents.
|
|
|
|
|
|
Yanshof wrote: ...the application i fail.
Someone can help me find out what is the problem ?
How can we do that when you've failed to describe the problem, or what you've already tried? Have you bothered to use the debugger?
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
As David said, you're providing very little information.
I'm guessing that your main window is being destroyed, so it's disappearing from the taskbar, and the applications list in task manager. But your process has not finished, so it won;t disappear from the processes list.
You may have some large I/O waiting to finish, or a bug in your code.
Try debugging into your InitInstance member function, follow it out, and then into CWinApp::Run, and see if it exits the message loop.
You may also have some significant code in your OnDestroy method.
That's all the guessing I'm doing - over to you to dig into your application.
Also - I suspect the strange bug is in your code, not MFC.
Iain.
Iain Clarke appears because CPallini still cares.
|
|
|
|
|
hello every one,
i am programing my first program in usinng MFC. i want a simple addition fuction where i have two variables box where i enter two numbers. and third varible which shows the results of the two variables after pressing a button which is also place on the dialog box.
my question is i am able to create the complete form but how i can assign the varibles as variable and how take the values in the program and how i can show the value out. i know that some seeting shave to change but which one. i am using Visual studio 5
cheers
harry
|
|
|
|
|
harjeemann wrote: shave to change
harjeemann wrote: i am using Visual studio 5
Besides that, you could write a handler for the button and add member variables for the edit controls (CEdit type) and call SetWindowText to set the text.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
It's better you to start with some books or articles to know more about MFC. it's difficult to whole process in a QA thread.
There are many methods, to get things done for your case in MFC.
You can add a control variable for All your edit boxes and can GetWindowText routine to get text of each items.
atoi(); routine will help you to convert string to integer data
itoa(); routine will help you to convert integer to string data
SetWindowText() routine will help you to set a control variable.
There are other routines called "GetDlgItemInt" etc.. to get the text in integer format.
I suggest you to better start with "Programming Windows using MFC" by Jeff Prosise. or with articles in MSDN or Codeproject
-Sarath.
"Great hopes make everything great possible" - Benjamin Franklin
|
|
|
|
|
harjeemann wrote: i am using Visual studio 5
cheers
For learning, what's wrong with the Express compilers[^]?
E.g. Visual Studio Express 2008[^]
Let's think the unthinkable, let's do the undoable, let's prepare to grapple with the ineffable itself, and see if we may not eff it after all. Douglas Adams, "Dirk Gently's Holistic Detective Agency"
|
|
|
|
|
Probably because MFC's are not included in the express editions. I now that was the case for VC2005 Express, I don't know if they changed it but I don't suppose so.
|
|
|
|