|
Look carefully at the error message. Some return values changed in message handler methods.
You may need to change your OnNcHitTest() method declaration to return the proper type.
Mark
"If you can dodge a wrench, you can dodge a ball."
|
|
|
|
|
Thank you Mark for the reply. After looking over each one I see that the return types are always different. I'm going to see why they are changed because I know that the project compiles and runs properly in VS 6.0. I'm wondering if it may have happened when the project was converted to 2005.
After examining further I've noticed that the base methods for CWnd always return LRESULT but the methods used in the code i've been given return some data type, void, UINT, BOOL, etc. I will look into this.
|
|
|
|
|
It changed in MFC.
Most are changed for 64-bit support I believe. LRESULT, WPARAM, LPARAM are now all large enough
to hold a pointer on 32 or 64 bit builds (or 65-bit for those that go one higher ).
"If you can dodge a wrench, you can dodge a ball."
|
|
|
|
|
Thank you very much for the help. I've noticed that the code is riddled with int to double and double to long conversions so it seems i'm going to have to go through and clean everything up making it more in line with what the original coder wanted to do.
Blake M. Ward
|
|
|
|
|
bward84 wrote: I've noticed that the code is riddled with int to double and double to long conversions
Bummer. Those would (should!) be unrelated to MFC message handler changes.
Have fun with that
Mark
"If you can dodge a wrench, you can dodge a ball."
|
|
|
|
|
I seemed to be able to remove the errors mentioned by redefining the functions being called by ON_MESSAGE. It seems that when this code was written ON_MESSAGE would return nothing (void) and you could define function handlers which would accept no arguments. I had to redefine them to return LRESULT and to accept WPARAM and LPARAM. However, now I am getting a problem when buttons are clicked. I get a Debug Assertion Failed box saying that the error occured on line 143 of filecore.cpp. I'm not sure if my above actions have caused this or if this is due to something else.
|
|
|
|
|
bward84 wrote: I get a Debug Assertion Failed box saying that the error occured on line 143 of filecore.cpp
What's on that line? In the version I have, it's
ASSERT(shareCompat == 0);
where shareCompat is an enumeration value == 0.
"If you can dodge a wrench, you can dodge a ball."
|
|
|
|
|
Hi. To get answer on your question, look here -> http://forums.microsoft.com/msdn/showpost.aspx?postid=8663&siteid=1
|
|
|
|
|
I am having trouble viewing that page, it is not loading. I will try again after some necessary meetings. Thank you for the help.
|
|
|
|
|
I have got an MFC dialog with a CEdit control. I wish to toggle the "passwordish" behaviour of the control but:
m_oNetworkKeyEdit.ModifyStyle( 0, ES_PASSWORD );
or
m_oNetworkKeyEdit.ModifyStyle( ES_PASSWORD, 0 );
do not do anything. Is there a way, or do I actually have to use CreateWindow() to create a new window each time?
Thanks A Million
Adam
_____________________________________
Action without thought is not action
Action without emotion is not life
|
|
|
|
|
Adam, see the 3rd last post on this[^] page.
/ravi
|
|
|
|
|
The ES_PASSWORD style can't be removed.
Try m_oNetworkKeyEdit.SetPasswordChar(0);
"If you can dodge a wrench, you can dodge a ball."
|
|
|
|
|
Create two controls; one with and the other without. Call ShowWindow() accordingly.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
I haven't got this file! I've got Visual Studio 6 on my system with, I presume, MFC 6. Do I have to upgrade to a newer MFC to get this?
|
|
|
|
|
I'm pretty certain you have to upgrade.
|
|
|
|
|
It sounds like it's part of a 3rd party library. I don't have that file in any version of VC or PSDK on my machine right now.
|
|
|
|
|
Michael, You are my hero! I was interested in this header file because I wanted to make text entries in a list control appear in different colours. I have just looked at your 'Neat Stuff to do in List Controls Using Custom Draw' and used the method you describe and it has worked like a dream.
|
|
|
|
|
I'm currently workin on a project and was wondering if anyone knew of a way to open up a web page using C++ code, and then set the size of the screen that opens, or does anyone know of anywhere to get some more help
|
|
|
|
|
I use the class in this[^] article to open a web page from my app.
/ravi
|
|
|
|
|
Tully2003 wrote:
I'm currently workin on a project and was wondering if anyone knew of a way to open up a web page using C++ code...
ShellExecute() will do just that.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
I have used ReadDirectoryChangesW with recursive for sub-folders and watched changes in "c:\". It gave me output for a while and suddenly Microsoft thrown dialog something like "Not responding"....
Is their anyway to "Get the information of the file which is get added/modified/deleted anywhere on computer"
Thanks In advance.....
AmolM
|
|
|
|
|
Aamol M wrote: It gave me output for a while...
How long?
Aamol M wrote: ...and suddenly Microsoft thrown dialog something like "Not responding"....
So are you not using ReadDirectoryChangesW() correctly?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
I am using "ReadDirectoryChangesW()" and gave "C:\" as path.
The file changes were so fast.
It gave me output for about 200-250 notifications tentatively....
And after it "Not Responding" - "Send A report To Microsoft Dialog"
Now What should I use to "Get the information of the file which is get added/modified/deleted anywhere on computer"
Can I have sample code for it or something like that
Thanks For Reply...
AmolM
|
|
|
|
|
Aamol M wrote: Now What should I use to "Get the information of the file which is get added/modified/deleted anywhere on computer"
The information is contained in the second argument passed to ReadDirectoryChangesW() . It's in the format of a FILE_NOTIFY_INFORMATION struct.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Yes Sir,
I am using "FILE_NOTIFY_INFORMATION" struct but my problem is I want to find the changed file Inforamtion that has changed ANYWHERE on computer.
ReadDirectoryChangesW()takes first parameter as path - where to search. But now here I want to search for change ANYWHERE on the computer
Thanks In advance...
AmolM
|
|
|
|