|
hi 2 all,
well the issue is still not understood by me.... the only problem is that .... as far as my app being multithreaded is conserned i dont think thats an issue, the problem is as u must have seen, that the code crashes in a destructor... of CFrameWnd derived class...:'( well, as far as i get from my research this problem has something to do with dll's loading and thread states... well if any one know anything about it.... do reply asap.
|
|
|
|
|
You never gave us the code for the destructor. Again, the call stack looks pretty plain to me. It's telling you exactly where the crash occurred. Without being able to look over your shoulder and step through your source code, there isn't a whole lot anyone else can do. IF it crashes in the destructor, why is the last call stack statement in the pop function?? My assumption is that the pop was where the crash occurred since that is where the program appears to have halted and this is the code fragment you gave us. While you are running in debug mode, are you able to step through the code right before the crash? WHen the system does crash, you should be able to double click on each statement in the call stack and perform an analysis of variable states; look for NULL pointers and test the assert conditions, etc. Consider yourself lucky to have a call stack that points directly at your code. Many times, you get call stacks that are pointing to MFC code which is really hard to troubleshoot.
Shawn
|
|
|
|
|
well i think i mentioned in one of my post that the code crashes some where IN THE MFC Code... the pop function i gave you was from afxpriv.cpp and it is an MFC file... one more thing as i mentioned back that the assert IS because of a NULL pointer... but i dont have a clue y its NULL.. cuz it have something to do with AFX_MANAGE_STATE... and sh*t like that... MSDN doesnt give any info about it...
and again the best part is that it crashes occasionally..... not always... there is NO threads in my App.
well i didnt get anything out of it... hope you can help me with AFX_MANAGE_STATE ....or something like that.
as for your query... the last call at the stack is Pop cuz it is automatically called after a CFramewnd derived object is Destroyed using DeleteWindow which removes the current frame from the RoutingFrame stack.
shoaib.
|
|
|
|
|
Hi !
I was writing a mailsync module for MSO and i am quite bewildered with one thing.
We use mapilogonEx() ( or initesession() as in ur program ) to login to a profile.Now generally speaking , profiles are not password protected.So, after logging in to a profile , I am able to fetch the messages WITHOUT supplying a password ? ! I mean if i had to retrieve from the server , then OK the user might put in some prompt for password or something , but what about the already downloaded messages ? I am able to view them all the same ?!So i guess the only way to be safe is by password protecting a .pst file....what do you think ?
Thanks,
Best Regards,
Kane
"Some guys hack just to get themselves a girlfriend.What a pathetic reason huh ?"
|
|
|
|
|
whoops ..just ignore what i said about initesession..mapilogonex is the only way...but still the question stays ..
-kane
"Some guys hack just to get themselves a girlfriend.What a pathetic reason huh ?"
|
|
|
|
|
Hi All,
I am using Wizard97 in MFC. Usually microsoft provides hot keys for
' Next ' and ' Back ' Button. I want hot keys for Finish and Cancel button.
Please let me know any of your solution or idea.
Thanks
Pushkar
|
|
|
|
|
i'm not sure to understand... you want hot keys in your program, or in the Visual C++ 97's MFC Wizard ???
if you choose for the second one, i don't think it is possible to modify for it.
If you're talking about the letters underlined on the buttons' captions, type Alt on the keyBoard to see them appear.
otherwise, i don't understand what you want ; you will be pleased to detail a bit more you problem, so.
TOXCCT >>> GEII power
|
|
|
|
|
Hi,
I have created an application which consists of dialog boxes corresponding to the various options. Presently i call each dialog box on the click of a particular button. Now i want to use a tabbed structure instead of buttons. How can i do that.
One possible way is to change the base class of the dialog objects from CDialog to CPropertySheet & then use the AddPage api to display the dialog. But how do i redefine the base class?
|
|
|
|
|
<font style="color:blue;">class</font> CmyClass : <font style="color:blue;">public</font> CDialog CPropertySheet {
<font style="color:green;">
};
like this ?
TOXCCT >>> GEII power
|
|
|
|
|
Hi
This may work, but MUST HAVE TO CHANGE THE STYLE of the dialog template(THIN etc)
Sujan
|
|
|
|
|
anless change name of base class from CDialog to CPropertyPage u need to change in macross to (IMPLEMENT_DYNAMIC(..., CPropertyPage) and in BEGIN_MESSAGE_MAP(..., CPropertyPage) and change anywhere in code where is use base class After that u must create object from CPropertySheet to wich you add your dialogs .... and it wil work
|
|
|
|
|
Can anyone out there show me a simple way to change a CListbox font i'm using in a Pocket PC app. Everything I've tried only seems to change the size of the selection highlight, not the font itself. in particular I want to use "Courier" size 8. An other way I tried to tackle the problem was to change it in the .rc file, but it seems I can only change the whole dialog. (ie all controls) Is is possible to change just the listbox font in the .rc file?
|
|
|
|
|
Hi....
I wanted to know whether we can create a dialog based Appliocation having document/view support, indirectly saying to have databse support in a dialog base application.
After entering the application wizard, in the second step it asks for the type of application to be built. if we go for SDI or MDI we can choose the document/view option and then canchoose our data source. But if we choose the dialog based application, then the option for choosing the data source is no more available.
Now how to give this dialog based application the database connectivity ???????
And further more if we are calling further more dialogs from the first dialog window then the connectivity should be there for all the windows.
Anyone.....
Pankaj
|
|
|
|
|
Hi,
Create a Dialogbased application, Add a new class to it using classwizard. Choose the base class 4 the newclass as CRecordSet, it will ask 4 the other db informations
Sujan
|
|
|
|
|
Tha is okay....but when it comes to attaching the member variables with the fields of the database, then the CRecordView class is required. I stuck up here when i have to attach the member variables. Please help in this matter then i suppose it will work successfully !!!
Do reply....
Pankaj
|
|
|
|
|
Hi,
while adding the Class itself, it will ask for the name of the datasource/db. When you give it, it will automatically add the fields to the newly created class, which is derived from CRecordSet.
Where R U getting the CRecordView ???.
Sujan
|
|
|
|
|
My Friend...
I have done what all you said. I made my own class which had the base class as CRecordSet. It asked for the details of the database and everything else. It created the class in which all the field members of the database were accesed by a global variable m_pSet,
for eg. m_pSet -> Name
where Name is a field of the database.
Now i have, say a edit box on my dialog resource, and i want to display the Name field in it. I will go to the class Wizard and Member Variable Tab. there i will have to assign the variable of this edit box, say
IDC_NAME = m_pSet -> Name
Now since there is no CRecordView class, so this cannot happen, which in the normal cases of SDI or MDI which have CRecordView as the base class give the option to assign these variables.
My problem lies here that how to assign any resource variable to the field variable as i said above.
Please do let me know how this can happen....
Pankaj
|
|
|
|
|
Oh 4 that, you must have to add a member variable to the edit control say m_myname, and you must have to passon the value m_pSet->Name into this and must have to call updateData function
m_myname = m_pSet->Name
UpdateData(FALSE);
The best way is to write a function say getvalues(), which gets all the values from the recordset and displays it on the dialog.
I do think there is another way to bind direclty is there, but couldn't remember it. Just go throught the MSDN. Usually what i'll do is i'll write my own class 4 data manipulation
Sujan
|
|
|
|
|
Thanks....this is one method that did not strike me....this can be done and i am sure it will work.
But usually what happens is that in the class wizard we get a combo box in which all the member variables are stored by default, we just have to choose for which resource which field variable we have to assign. In this case no coding is required.
But as you said i think by coding in this manner, the work will be done.
Anyways, Thanks a lot !!!
Regards,
Pankaj
|
|
|
|
|
Hi! it's me again!!! I like to know how to store a image into a variable under MFC?
Eg. I declared a global variable with an array:
<br />
int n; <br />
n = (512-(Recty+1))*512 + Rectx;
int image512;<br />
image512[n];.......
<br />
int dcmpixel [40] [40];<br />
<br />
int i, j;<br />
|
|
|
|
|
Can't you use the CImage class?
|
|
|
|
|
hi all ,
i am using Ado in mfc and i want to insert a record in the recordset but not in the database. Could i insert a record in recordset after i close the connction to the database.
if some one can help
pls reply soon ....
|
|
|
|
|
I am not exactly sure whether it can be done or not, but even it can be done or not, what will you do by inserting a record in a recordset if you do not want to insert it in the database.
As far as my knowledge goes, the recordset is used as an interface between the user and the actual database, and once the connection is closed with the databse the recordset will not exist !!!
Pankaj
|
|
|
|
|
I know you can have disconnected recordsets in ADO. I think you do this by setting the ActiveConnection property of the Recordset to NULL. As far as inserting a record I would imagine it would work. Hope this helps.
|
|
|
|
|
When building for UNICODE, I'm getting a C4005 warning for a redefition of the UNICODE macro for each file in the project as each file includes stdafx.h, which in turn ultimately defines the macro.
Besides using a pragma to ignore the message, is there something else that I should be doing to build a UNICODE project without getting these warnings?
Cheers,
Tom Archer
"Use what talents you possess. The woods would be very silent if no birds sang there except those that sang best." - William Blake
* Inside C# -Second Edition
* Visual C++.NET Bible
* Extending MFC Applications with the .NET Framework
|
|
|
|