|
IT IS TELLING LINE NUMBER IN VIEWFORM.CPP WHILE DEBUGGING ,IT IS NOT GOING TO THAT ERROR. WHEN I AM OPENING VIEWFORM.CPP THERE ARE MANY FUNCTIONS HOW CAN I UNDERSTAND WHERE IS ERROR?
I AM BEGINNER SO I AM SURE SOME SILLY STEP I AM MISSING
WHILE CREATING VIEW CLASS PLEASE HELP?
|| ART OF LIVING ||
|
|
|
|
|
I'm using VS 6.0.
When your program has aborted (while debugging it), take a look in the window below the code window (in Visual studio).
There you have a small window with the name "Context". The text line itself shows the function where the program took a dive.
Now, if you press the down arrow at the right of that text line, you will get a list of all of the functions your program has on it's call stack.
There will be (at least) one function name that you will recognize (because it's in your program).
Select that line and the editor window will show your code, together with a green arrow. The green arrow will point at the line (still in cour code) that was the reason for the error.
Another way to do this (sill in VS 6.0), is to select (from the VS menu), View->Debug Windows->Call Stack (or press Alt-7).
Double-click on the most upper line that has a function name that's in your code and the editor takes you to the line in error.
And please, for your own sake, get a book about Visual Studio. I'm sure you will find the time spent on reading to be worth while.
Good luck.
kakan
|
|
|
|
|
Sorry, I wasn't logged in when i wrote the answer.
|
|
|
|
|
Hello, everyong!
who can tell me the difference between "std::wstring" and "std::string" ? For unicode, I want to replace "std::string"
with "std::wstring", what I should pay attention to ? Please instruct me, thanks a lot!
|
|
|
|
|
|
Thank you very much!
Best regards.
|
|
|
|
|
Hi
I am doing a image prcessing project in VC++, I am using bilinear interpolation for stretching the images but the image intensity varies before stretching and after stretching.
for eg:
If the image intensity for a square of 1 unit = 1xI1.
If I stretch the image to 2 units then the intensity should be 2xI2
both the intensities should be equal
ie 1xI1 = 2xI2 = k(constant)
Pls help
|
|
|
|
|
I think this is a result of roundoff. Are you doing your calculation with floating point numbers and translating them back to integers?
John
|
|
|
|
|
Thanks for ur reply
Yes I am calculating it with floating point numbers and translating it back to integers.
Is there a problem with that? or should I use density filter to get the same intensity
|
|
|
|
|
i want to include the feature for logarithmic plots in my application ...but i am having trouble scaling the y-axis ...(bcoz points they are not equally spaced.)
anyone has an idea or expereince in this regard
thanks
|
|
|
|
|
What do you want to do exactly ? Plot a point on a logarithmic axis ? That is convert his value into a screen position ? If yes, you can use the following code:
long Offset = (int)floor((log10(Value)-log10(m_MinValue)) * GetAxisLenght()/(log10(m_MaxValue)-log10(m_MinValue)) );<br />
<br />
long ScreenPos = m_StartPos + Offset;
Value is the value you want to plot on the axis
m_MinValue is the minimum value of the axis (the real value I mean, not a screen position)
m_MaxValue is the maximum value of the axis
GetAxisLenght() returns the length in pixel of the axis
m_StartPos is the start position (in Screen coordinate) of the axis.
It works fine because I use this code in a chart control I developped some time ago.
|
|
|
|
|
Dear Readers,
In my project i m facing problem of memory model at some stage if my internal memory usage is exceed then its gice me error or some times it dont allow to open perticuler window. this is done if i make my double array size id huge like 800000 count.so please help me wht to do for this.and i cant able to use CArray of such type of things. so pleas ehelp me for this.
gunjan
|
|
|
|
|
In 16-bit programs, there was the option of different memory models, but in 32-bit, and 64-bit, it is Flat. So you can allocate as much memory as the OS will allow you. The problem seems like the OS is denying you memory. Solution should be (I think) Allow more hard disk space on the drive where windows is installed. And, Install more Ram.
this is this.
|
|
|
|
|
In a 32 bit windows program you can not make a single array larger than about 1.2 GB of memory unless you use the LARGEADDRESSAWARE complier flag and boot with a system that supports such a flag. There is some info here about this:
[EDIT]Oops... That is not that big of an array, look below for the solution. [/EDIT]
John
-- modified at 5:44 Tuesday 25th October, 2005
|
|
|
|
|
Hi,
How do you allocate the memory??
Like an array
double dblID[800000];
if this is the case the stack could be to small so you have to create it on the heap instead like this:
<code>double* pDblArray = new double[800000];
pDblArray[0] = 0.0;
delete [] pDblArray;</code>
Hope this solves your problem
codito ergo sum
|
|
|
|
|
Thank you for your valuable replay. If i want to create such a big two dimentional array then what i have to do.
|
|
|
|
|
I want to change the back colour of my Edit Box
Any one has done that???
I use such code but was not effective ,wanted a
blinking backcolour of the edit box so used a
timer event to change the colour but it didnot
change the colour
{
// TODO: Add your message handler code here and/or call default
pDC=m_display_msg.GetDC ();
pDC->SetBkColor (RGB(255,0,0));
m_display_msg.Invalidate (TRUE);
pDC->SetBkMode(OPAQUE);
m_display_msg.SetWindowText ("Event Occured ");
m_display_msg.UpdateWindow ();
//pDC->Invalidate();
this->Invalidate (TRUE);
CDialog::OnTimer(nIDEvent);
}
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|
|
Edit controls send a WM_CTLCOLOREDIT message to their parents when they need to repaint.
Try to provide a handler for that message, from that return a HANDLE to a brush which will be used to paint the background. If you need your color to blink use the timer to invalidate the control and alternate the colors you provide in you timer event handler.
|
|
|
|
|
Yeh i know that but any other way???
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|
|
Yeh i know that but any other way???
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|
|
I supose you could derive a class from CEdit and override OnPaint, but that doesn't seem an easy thing to to. When I had to custom draw an edit control I used WM_CTLCOLOREDIT, that's the easiest way I know.
|
|
|
|
|
why is that you dont want to use WM_CTLCOLOR,Any problem with this .
-- modified at 8:10 Tuesday 25th October, 2005
|
|
|
|
|
Yeh we Humans always want an easy way ,
during exploring the codeproject site
i found one derived class for CEdit
who did some things similar to changing
the colour .
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|
|
so, did you had a look a the source to find out how the guy was changing the color of his editBox ?
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
still you didn't leave this topic...??? i appriciate your attitude.. but if something(of lesser importance) takes too much time, we should consider skipping it .
He is like a one-legged man in a bum kicking competition. -Novjot Sidhu
--[v]--
|
|
|
|