|
thanks so much,
sorry to repeat such an old question to bother...but anyway your link will make it easy for me to get to the right place~
^-^
|
|
|
|
|
It's no worry for me to answer you, it's more that to succeed as a developer, you need to do some research before asking questions
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hi,
Sorry for this crosspost from WTL message board but I didn't get an answer there.
In my main frame I have a splitter pane with two views. I want to scroll the appropriate window when the mouse hovers over it. What is the best way to do this?
I was thinking of handling the WM_MOUSEWHEEL message and checking if the cursor is within the bounds of the view's rectangle (using GetCursorPos() and GetWindowRect()) but I think it might cause other problems.
I also tried using WM_MOUSEHOVER and WM_MOUSELEAVE but I am not sure how to best implement them.
Is there another way?
Thanks in advance.
|
|
|
|
|
What's the worry with GetCursorPos, etc ? That's how I'd expect to do it.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Or watch for The WM_MOUSEMOVE message is posted to a window when the cursor moves. If the mouse is not captured, the message is posted to the window that contains the cursor. Otherwise, the message is posted to the window that has captured the mouse.
You would get the mouse coordinates and some other state informiton. You can use PtInRect to see which part of the frames the mouse is in to decide which area to scroll.
|
|
|
|
|
I have a project coded by Visual C++ languge, when I open it in Visual C++ .NET and I convert to .NET project.
What changes will my project change ?
Could I use my new project in Visual C++ 6.0 ?
Thank you
|
|
|
|
|
You can't use your new project in VC6, mainly because VC6 can't open the project file. Opening in VC.NET will simply create a project file in the new format. As you have an older project, you'll probably get build warnings about features in libraries like MFC that are deprecated, but they will still build and run, assuming your code was standards compliant.
Assuming you're not using managed C++, then the other differences are greater standards compliance, and a far better implimentation of the STL. A VC.NET project that doesn't use MFC, ATL or MC++ stands a better chance of compiling in a third party compiler than a VC6 project written under similar constraints.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Well i too had this problem once you have made the Project usint Visual C++ .net after that it was not properly working in Visual C++ 6.0.
And i need to rebuid it in Visual C++ 6.0.
if somebody can provide help on this it will great.
Regards
Anil
Anil Kumar
|
|
|
|
|
I'm hoping someone ran into this problem and knows a workaround.
Situation: to support proper uninstall I want my menu to be temporary (at each connect I recreate the menu). Appearently, items added to the main menu don't follow the normal rules and dont get removed when Word is closed. Another attempt... calling Delete on CommandBarControl when disconnecting fails for some reason.
Alex Korchemniy
|
|
|
|
|
well i have made a prog to capture ascreen but its not working in gui
pls help me
i have use getdesktop function
using hdc doenst work
pls help me out
|
|
|
|
|
You see that little search box at the top of this screen (directly under the CodeProject logo)? Go there and type "Screen Capture" and click the go button. You will then get a whole list of articles covering the topic.
Within you lies the power for good - Use it.
|
|
|
|
|
prashant66_2000 wrote:
i have use getdesktop function
Carefull of getdesktopwindow
If called from a modal dialog there is a chance the desktop becomes disabled, which disables all of its descendants. ie, it disables every window in the system.
suhredayan There is no spoon.
|
|
|
|
|
Hi There,
I am getting error "Memory could not be written" only in release mode and that too not on my machine.
I thought of using MAPinfo to get the line number/function call where application is crashing. Unfortunetly address shown in error message doesnt come close to addresses mentioned in my MAP file.
I am very very confused, not getting any way to find this crash.
My memory address in MAP file starts from "0x00400000" to "0x004002xxxx".
Error message shows " The instruction at "0x77fcaea0" referenced memory "some address", memory could not be written.
Can somebody please help me in this? I am completely bugged with this error.
I am not able to reproduce this error at my end.
thanx in advacne,
regards,
Kavita
|
|
|
|
|
I know it doesn't really help you, but the chances are you are giving a bad pointer to a function
in a DLL. (Ie. every single Win32 API function). What you need is the stack of functions, so you can
see the last function of yours to narrow things down.
I'm sure there is an article or two here which may be able to help, but thats outside my realm!
Iain.
|
|
|
|
|
Hi,
I guess you might be using the COM library.
Because some time back i too had the same problem when i was using COM library.
So what you need to do just go through the proper usage of the COM library and uninitialize it at some other place.
Hopefully it should work
Anil
Anil Kumar
|
|
|
|
|
It could also be that you are using a pointer to a heap object, 'delete' was called on the pointer, and then this pointer variable was used again a few lines later in the code. The compiler would not catch this I don't believe, but may have given a warning in the compilation if the warning level was set high enough.
Another thing that could be the cause is uninitialized memory. Release mode does not initialize the variables I believe. So you may be using a pointer somewhere that refers to a bogus address.
You may already know this, but one thing you could do is to build it in release mode and run it on your machine, trying exactly what the user did, and see if it breaks for you also. If it does, then you know approximately where in the code it crashed and can look into the code to fix it. You have to run it in release mode, for the reason in the previous paragraph. In fact, for this same reason, one should always test in release mode before shipping.
David Spain, C++ Applications Programmer
|
|
|
|
|
Also, about the addresses, they will most likely not be the same as what is on your machine, because it is the memory address used by that machine. These addresses could even differ between different 'runs' of the program. It would depend on where the user's operating system put the program in memory for that particular execution. So using the memory addresses to find the error will not work in this case.
One more possibility, which you probably already know about, is that you could have written past the end of an allocated buffer.
David Spain, C++ Applications Programmer
|
|
|
|
|
I am trying to delete an unwanted class. I am using C++.NET and I am having difficulties (to say the least).
I have “physically” deleted the files from the folder where they are stored and I have also “physically” deleted the .obj file. I have then cleaned the sln.
When I try to build the sln I get a LINKER error for unresolved external.
Can anybody please tell me what else I should do to get rid of this class that is haunting me?
Thanks in advance
|
|
|
|
|
Remove the files (.cpp and .h) from the solutions browser tree. You should be ok after this.
I Dream of Absolute Zero
|
|
|
|
|
Thanks, the Phantom has gone.
|
|
|
|
|
i found FormatEx on www.sysinternals.com
but it not working
could you give me advices or some code?
thanks
I love programming
|
|
|
|
|
How to debug the dll, one exe contains more that dll, now i am trying debug viewer by using outputDebugString function, but my application is fully Dialog based. While running debugviewer gives a message m_pMainWnd is set to NUll, and after that it goes to terminate. where i can change the m_pMainWnd variable, please tell me how to solve this problem. and how to debug the dlls.
Srinivasarao M
|
|
|
|
|
A DLL is nothing without an EXE to hang it off. In VC++6, select the DLL project. Press f5 to "run" the DLL.
VC++ asks for an exe to use, so select an EXE that would use your dll. If you are making a shell extension,
pick explorer. If you already have a build exe, use that.
Then let things run, and VC++ will attach itself to the process for debugging as normal.
Iain.
|
|
|
|
|
An additional tip to open the debugger in extreme situations is to place
AfxDebugBreak( )or
_asm int3; in your dll code.
suhredayan There is no spoon.
|
|
|
|
|
from what i get this is a question where more programmers need help, so again:
i'm a novice programmer on Visual studio.net c++ and i need to connect it to mysql 4.1.17, it can be done with myodbc, bytefx or oledb, or another one that results, to make the normal operations (insert, select, delete, update ).
please help fast, it's really importante, and a sample application would be great, send it to horus.cv@gmail.com, but the code and the explanation is also good.
thanks sigh: sigh:
|
|
|
|