|
My Visual studio debug sessions are suddenly behaving erratically. The debugger position does not correspond with the c++ source code line, it's sometimes one line off. This used to work fine. I'm VS 2005 SP1. Any ideas what might be wrong?
|
|
|
|
|
Hi,
I am just giving a try....
May be your exe hasn't been updated, with the current code and debugging points.Its a old one
What you can do is,
- check the exe path in project settings...see if it is existing, check the updated time(after re-building)
- or, delete the exe...rebuild the project..if no new exe has been updated to that path, that means your path is wrong....
-----------------------------
I am a beginner
|
|
|
|
|
No, that's not it. I'm just going to try to reinstall and see if that does the trick.
|
|
|
|
|
fine, hope it works fine....if that doesnot work....just try this one....coz even I had the same problem...
-----------------------------
I am a beginner
|
|
|
|
|
Have you removed all temporary files, including the Debug folder, and rebuilt the project?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
|
What about optimizations?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
This may be too simple a solution but what you describe usually occurs when you start debugging a release version.
Is your active configuration 'Debug' ?
Souldrift
modified on Monday, August 24, 2009 9:53 AM
|
|
|
|
|
Yes, I know about that, but it's definately debug version
|
|
|
|
|
The standard solution to this problem is to select "Rebuild Solution" in Visual Studio. Sometimes the source gets out of sync with the stored debugging information, and Rebuild Solution brings it up to date.
|
|
|
|
|
Yeah, that's the first thing I tried. But I notice when I moved the function that I was debugging to a different position in the file that the problem went away. Seems like VS just doesn't like my source code
|
|
|
|
|
hi,
it may be cause of fault in encoding of lines endings in Your source file, ie. from any reason at end of line instead of standard windows CRLF code ('\x0D','\x0A') appear the CR code ('\x0D'). Debugger counts line endings and if any encoding of line end differs from the other it may results in wrong line highlighting. To eliminate this problem You can use any text tool that can re-encode the line endings in Your source file to standard windows encoding or You can use Visual Studio editor feature "Save With Encoding" into "Save File As..." dialog. I would try first in VS do "Save File As..." -> Unix/Macintosh and next "Save File As..." -> Windows.
modified on Tuesday, August 25, 2009 9:28 AM
|
|
|
|
|
You know I have a switch statement like this:
switch (keyCode)
{
case 0x10:
maybe it's somehow recognising the 0x10 as a new line return. That makes sense becuase it's only after this switch statement that the error occurs
|
|
|
|
|
ed welch wrote: You know I have a switch statement like this:
switch (keyCode)
{
case 0x10:
maybe it's somehow recognising the 0x10 as a new line return.
No, not possible.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
The code after that switch statement is giving the error, so it definately looks like it to me
|
|
|
|
|
Sorry for my mistake, proper hex values of CRLF are: '\x0D' for CR and '\x0A' for LF. Values which I wrote earlier are related decimal values 13 and 10 respectively. I was thinking about hex values but wrote decimal it happens. In Your switch condition there is actually decimal value of 16 but not 10 as You expected. So, it not may be the cause of problem.
|
|
|
|
|
Hi all,
i have create a Tree by derived my class from TreeView.
please tell me how can i add menu on right click of tree,and how can handle menu item over tree.
please help me for this if possible please exaplin me with any example.
thanks in advance.
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
You need to go through a few steps...
1/ Add a handler for NM_RCLICK.
2/ Get the mouse position (annoyingly, this is not a field in NM_RCLICK)
GetMessagePos is your friend.
3/ Maybe use TVM_HITTEST to work out which item you're on top of...
4/ Make / load a popup menu.
5/ TrackPopupMenu(Ex)
6/ Do something with the result.
I've seen you here a while, so I hope that should be enough to steer you in the right direction!
Iain.
I have now moved to Sweden for love (awwww).
If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), or need cotract work done, give me a job! http://cv.imcsoft.co.uk/[ ^]
|
|
|
|
|
Thanks ,its done
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
Hi ,
I want to convert a BSTR into a character array , I am having string containing alphanumeric character of 30 character . i want it to convert them into a character array..can you please help me in resolving this..
|
|
|
|
|
I use the _bstr_t class for this.
_bstr_t has an overloaded char* operator.
So all you need to do is create an _bstr_t object and typecast it as char* .
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
|
Let's presume your BSTR is called bstr .
UINT len = SysStringLen(bstr);
int bytesNeeded = WideCharToMultiByte(CP_ACP, WC_DEFAULTCHAR, (LPCWSTR)bstr, len, 0, 0, 0, 0);
char* buffer = new char [bytesNeeded + 1];
int bytesNeeded = WideCharToMultiByte(CP_ACP, WC_DEFAULTCHAR, (LPCWSTR)bstr, len, buffer, bytesNeeded, 0, 0);
buffer[bytesNeeded] = 0;
That should create a suitably sized character array and translate your BSTR into it.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Thanks a lot ...Article is really good
|
|
|
|
|
Hello Friends
my task is to append icons to menu (ie .ico), it is very easy to add bmp file to menu, but in order to need transparency i have to use icons only not bmps.
There are lots of programs for this in MFC , but i need to do it in Win32 API
using VC++
Any help is greatly appreciated
|
|
|
|