|
hi
i have an MFC dialog based application...based in a my own class not CDialog..
when i insert a new dialog and create a new class ... icouldnt find my own class in the drop down list..where about two weeks ago i inserted anew dialog and founnd my class among the base class...
what did go wrong ....its really confusing and driving me crazy....
pleease help me with this...my work has stopped because of this
thank u all
|
|
|
|
|
First Check your file are added to you project. if it is already added, try deleting the "clw" file in the project folder.
|
|
|
|
|
lahom wrote: i have an MFC dialog based application...based in a my own class not CDialog..
Your class is derived from CDialog?
lahom wrote: icouldnt find my own class in the drop down list..
You mean in the dropdown list of class wizard?
if so, I think your Project's classWizard information might be corrupted. It often happens. You just take your project directory, then delete - *.clw . Now load the project in visual studio and press Ctrl+W . It will take the class wizard.
Since the classWizard info is deleted, it will show a dialog and ask whether to regenerate it. Press yes and it will show a dialog to select source files. Add All your source files. I hope, now you can see your new dialog class in class wizard.
Does this solves? or your problem is something else?
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
do not edit the code generated by wizard anytime
if you wish to use wizard always.
|
|
|
|
|
Hello,
I made an application with a few classes developed by me.Then I made a dll for the classes which act as the base classes for developing my application.
But when I develop an application with this dll the application gives Unhandled Exception .If I develop an application using my base classes then the application is developed and works fine.
Is there something that must be missing while making the dll?
I went through the steps mentioned in a book for making the dll and the dll is been made.
Regards,
Pritha
|
|
|
|
|
Did you try using your debugger ?
|
|
|
|
|
prithaa wrote:
But when I develop an application with this dll the application gives Unhandled Exception .
Please provide the details of exception. if you press Ctrl+C in the Messagebox, the entire message will be copied to clipboard. FYI.
prithaa wrote: If I develop an application using my base classes then the application is developed and works fine.
Your class depends on MFC? did you forget to add AFX_MANAGE_STATE(AfxGetStaticModuleState( )); as the first line of all exported functions? Just possibilities. Provide more info, then only we help in isolating the issue.
regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
Hello,
Thanks
I have not mentioned this
AFX_MANAGE_STATE(AfxGetStaticModuleState.Where should I write this ?
While making the dll I have written AFX_EXT_CLASS in the declaration of the class.
I am getting the following Unhandled exception.
Unhandled exception in DllClient.exe(MFC42D.DLL):0xC0000005:Access Violation
Pritha
|
|
|
|
|
prithaa wrote: I have not mentioned this
AFX_MANAGE_STATE(AfxGetStaticModuleState.Where should I write this ?
As the first line of all exported functions. See details here http://msdn.microsoft.com/en-us/library/ba9d5yh5(VS.80).aspx[^]and technical note here - http://msdn.microsoft.com/en-us/library/ft1t4bbc(VS.80).aspx[^]
I stress the point, it might be the reason since we don't have see the code. BTW, could you post the code snippet, which throws the exception?
prithaa wrote: While making the dll I have written AFX_EXT_CLASS in the declaration of the class.
AFX_EXT_CLASS is to make the class exportable. It expands to __declspec(dllexport) .
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
AFX_MANAGE_STATE(AfxGetStaticModuleState is required if you are using resource templates. If you are not using resources i dont think its required.
please provide more details regarding classes you wish to export.
Also how are you using the dll in your new applications.
|
|
|
|
|
Hello,
My application does not resources for user interface.I have a class derived from CMenu which initializes the menu of the application.
I get an error in the following.
CMenu* M = this;
int Count = M->GetMenuItemCount();
In my original program the count was 5 but with the dll I get 0 which means that there are no menu items in the 'this' menu .But there are.
Regards,
Pritha
|
|
|
|
|
what is this pointer pointing to??
i mean is it a window or what??
|
|
|
|
|
Hello,
The this pointer is
class Menu : public CMenu
{
}
The pointer is pointing to the Menu class.
Regards,
Pritha
|
|
|
|
|
Hi all ,
i want to write a program , which can monitor a specific floder , if there was a file created in that specific floder, my program(i have to write) should get a notification.
How can i do this using VC++, or any better way to do this . please advise.
Thanks
Kanth.
|
|
|
|
|
You can use FindFirstChangeNotification() and FindNextChangeNotification() apis for monitiring directory changes. For getting file creation notification, you've to provide dwNotifyFilter as FILE_NOTIFY_CHANGE_FILE_NAME . Note that it will include renaming, creating, or deleting a file name.
Check this sample about how to use it - http://msdn.microsoft.com/en-us/library/aa365261(VS.85).aspx[^]
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
Thank you soo much for your time for replying me. i will go thru the link
|
|
|
|
|
Always welcome. Since i'm sick today and resting at home, I've plenty of time to help you.
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
Jijo raj wrote: Since i'm sick today and resting at home
Good recovery
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
Rating helpfull answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
Hello Jijo
Get Well Soon
Pritha
|
|
|
|
|
ReadDirectoryChangesW() will be more apropriate, if u want to get the name of the file created.
|
|
|
|
|
Seems better one.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
|
#include <algorithm>
#include <vector>
#include <functional>
#include <list>
using namespace std;
typedef list<int> LIST_INT;
bool IsOdd (int i) {
return ((i%2)==1);
}
int AbsToRelPosition(LIST_INT list1, int value)
{
LIST_INT::iterator pos;
pos = find_if(list1.begin(), list1.end(),bind2nd(greater<int>(), 1));
return 0;
}
int main () {
LIST_INT m_shown_cols; //shown column list
LIST_INT m_hid_cols; //hidden column list
LIST_INT m_shown_rows; //shown rows list
LIST_INT m_hid_rows; //hidden rows list
for (int i = 0; i < 2; i++)
{
m_shown_rows.push_back(i);
}
for (int j = 0; j < 4; j++)
{
m_shown_cols.push_back(j);
}
int place = AbsToRelPosition(m_shown_cols, 1);
LIST_INT::iterator pos;
pos = find_if(m_shown_cols.begin(), m_shown_cols.end(), bind2nd( greater<int>(), 1));
}
in this piece of code i am getting UMR(using purifier) in find_if using in AbsToRelPosition function but if i am using same piece of code in main function as shown above in my code purifier is not showing UMR.Pls help me wht would be the reason.
thanking you
Deepesh
deepesh
|
|
|
|
|
how to selective loading BHO in Chtmlview environment
wqewqqeweqwrwerewrwe
modified on Tuesday, May 27, 2008 11:40 PM
|
|
|
|
|
"BHOs are not loaded by other applications that host the WebBrowser control or by windows such as HTML dialog boxes." from [Building Browser Helper Objects with Visual Studio 2005^].
BTW, why need a BHO, when you have full control over the events and contents of html document when using Chtmlview( or Webbrowser control hosted in your application), BHO are used to extend custom functionally to Internet Explorer where you don't have direct control (like hosting in your app).
|
|
|
|