|
My application compiles and builds properly. there is no error.
But when i get the application interface and click on the menu
to open a dialog boxes which has the controls in it, rather than opening
i get this message.
-------------------------------------------------------
Blah Blah .....
Please tell microsoft about this problem.
Blah Blah .....
We have created an error report that you can sedn to us.
We will treat this report as confidential and anonymous.
To see what this error report contains, CLICK HERE.
When i click on "CLICK HERE" i get this message
--------------------------------------------------------------
I get this error first:
--------------------------------------------------
Error Signature------------------------------------
AppName: Application App Ver 2.0.0.2 ModName ntdll.dll
ModVer: 5.1.2600.1217 Offset: 000096b5
Reporting details------------------------------
Blah Blah
To view technical information about the error report, click here
---------------------------------------------------------------
Then on seeing the error and exiting i get this messagebox at the end.
|--------------------------------------------------|
|Application: Application.exe Application Error |
|------------------------------------------------- |
|The instruction at "0x77f58dc5"referenced memory |
|at "0xfffffff8". The memory could not be read. |
|Click OK to terminate the program. |
| |
| ----- |
| |OK | |
| ----- |
|--------------------------------------------------|
What is wrong wi th my application ?
pleae help me out i have been battling this for the last one week
with no progress.
Thanks.
.iCe.
|
|
|
|
|
Odds are it means you passed an invalid pointer to something.
My immediate guess is that you have are using a dialog ID for which there is no control.
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
Ok here is a little history how i started getting errors.
I made some child dialogs boxes . After that attached them to the Parent Dialog Box. Everything is working fine. Then i added the control variables on the dialog boxes which are Check Boxes and Edit boxes only.
Now i am intialising them in the
DoDataExchange(CDataExchange* pDX)
Constructor.
e.g. setting control m_variable1 = 0.5
and so on.
After doing so it gives me error.
Any more suggestions.
Thankks for answering though.
============================================================================
A winner is not one who never fails, but one who NEVER QUITS!
============================================================================
7 days and i havent quit yet !
|
|
|
|
|
Just check the variables and step through the code. Make sure everything is being initialized properly and in the right order. Make sure you aren't using any of the controls before they are created.
Good luck.
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
You may have passed an invalid pointer or you may be over writting memory in an earlier function call. The last time I saw this error I had to back track until I found a miscalulated value that was causing an over write. This error normaly appears after the cause of the error (some times long afer).
INTP
|
|
|
|
|
|
Hi,
In my sdi application I have 2 tree views selectable by tabs. If I minimize and maximize the application the tree view looks grayed, only the selected node being visible. Can anyone tell me why and how to fix this?
|
|
|
|
|
There can be a range of issues here. Here are some things you can try:
One, make sure when one is made visible, the other is made invisible.
Two, the tab or the dialog may be drawing it's background on top of the tree controls. Try setting the tab or dialogs properties to clip children.
Three, detect the WM_ACTIVATE and do a RedrawWindow on the visible tree.
--
Joel Lucsy
|
|
|
|
|
Thanks a lot!...Redrawwindow() worked.
|
|
|
|
|
Hi,
how do I achieve the following:
I want to right click on a file and go to Open with and select my SDI application and it would be opened in my application the way it gets opened by File | Open etc.
Please advise
|
|
|
|
|
shell extensions
see michael dunn's articles here on cp
they are awesome
"there is no spoon" biz stuff about me
|
|
|
|
|
How can i de style of single cells in the MFC grid so that they convert all input to uppercase.
Change the style of the InPlaceEditControl ??
Luc Devriendt
|
|
|
|
|
Hi, sorry that this might be a beginner question.
I know how to get a pointer form View class to doc class.
But how do you get a pointer from app class to doc class? is there a way? If not can you get a pointer to app class from doc class?
Thanks for your help
Q-Bus
|
|
|
|
|
from the app, I believe you can call GetActiveView() or something.
Christian
I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
|
|
|
|
|
Do the following:
1.Add a member variable to your app class
CYourDoc* m_pYourDoc;
2.Add a memeber function to your app class:
SetYourDoc(CYourDoc* pYourDoc)
{
m_pYourDoc = pYourDoc;
}
3.In your doc class' constructor call
theApp.SetYourDoc(this);
Peter Molnar
|
|
|
|
|
|
Hi! I'm working on a program that opens JPEG images and i'm using GDI+ to do this. Everything was working fine until i tried to create a zoom feature. ScaleTransform() somehow causes horrible flickering. I'm using CMemDC for doulbe buffering which works fine if you view the image at 100% size. Even the scrollbars get sluggish the flickering is so bad. What could be causing this and is there a non-flickering way to do zoom?
-- Steve
|
|
|
|
|
I am not sure this is a GDI+ problem.
Possible causes:
1) failure to over ride CWnd::OnEraseBkgnd() (a.k.a. WM_ERASEBKGND).
2) not drawing the entire client content a memory DC before blitting it to the screen (kind of slow).
When displaying rectangular images that require updating/zooming etc..., I use the following method.
1) Override OnEraseBkgnd() to return TRUE.
2) In OnDraw(): (1) draw the image, (2) then call pDC->ExcludeClipRect() to exclude the drawn image rectangle from furthur drawing, then (3) draw the background (pDC->FillSolidRect(&rectClient, ::GetSysColor(COLOR_WINDOW));).
There are aticles on GDI+ and flicker free drawing at codeproject.
INTP
|
|
|
|
|
Hello,
I want to have more than 1 socket connections to
a port/IP address.
In CAsyncSocket::SetSockOpt(int nOptionName, const void* lpOptionValue,
int nOptionLen, int nLevel = SOL_SOCKET );
What is the value of nOptionName that I should provide for the
function, and how about the lpOptionValue, nOptionLen?
I should call this function before the call to
CAsyncSocket::Create(iPort, SOCK_STREAM, FD_READ | FD_WRITE |
FD_CONNECT | FD_CLOSE, NULL);
or after it.
For now, when I call the Create(), I always get the error code
10048 (WSAEADDRINUSE = Address already in use)
If possible, do you have any short sample to use this to make
connection to the socket that is already in use.
Thanks a lot!Hello,
I want to have more than 1 socket connections to
a port/IP address.
In CAsyncSocket::SetSockOpt(int nOptionName, const void* lpOptionValue,
int nOptionLen, int nLevel = SOL_SOCKET );
What is the value of nOptionName that I should provide for the
function, and how about the lpOptionValue, nOptionLen?
I should call this function before the call to
CAsyncSocket::Create(iPort, SOCK_STREAM, FD_READ | FD_WRITE |
FD_CONNECT | FD_CLOSE, NULL);
or after it.
For now, when I call the Create(), I always get the error code
10048 (WSAEADDRINUSE = Address already in use)
If possible, do you have any short sample to use this to make
connection to the socket that is already in use.
Thanks a lot!
TQD
|
|
|
|
|
A socket can only be created once, so if you or another program has already created it then you will receive the 'in use' error code. A socket can accept multiple connections, once created, and this can be controlled by the parameter given in the 'Accept' function.
|
|
|
|
|
uhhhh -- what are you passing in as iPort?
If you pass in 0, you can create as many connections as you need.
A connection is defined as a source port/ip paired with a destination port/ip. if the source and the destination are reused, you'll get ADDRINUSE.
Passing in 0 as the port (source port) causes the TCP stack to allocate the source port for you... letting you make many.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
Peter Weyzen<br />
Staff Engineer<br />
<A HREF="http://www.santacruznetworks.com">Santa Cruz Networks</A>
|
|
|
|
|
plz try to use setsockopt() function with SO_REUSEADDR
SOCKET sock;
BOOL bReuse = TRUE;
....
setsockopt(sock,SOL_SOCKET,SO_REUSEADDR,&bReuse,sizeof(int));
...
bind(...);
|
|
|
|
|
How to show a modal dialog in multithread app?
I want to show a modal dialog in multi thread application.
But when I show the dialog as the fllowing, VC shows
"Debug Assertion Failed" dialog. Anyone knows how to
do it? Thanks very much.
CAboutDlg dlg;
dlg.DoModal();
The attachment is a demo.
testmultithread.zip
|
|
|
|
|
Hi LaoWei.
First, there is a little bug in your CreateMultiThread :
void CTestMultiThreadApp::CreateMultiThread()
{
DWORD tID;
g_nIndex[1] = 0;
::CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)ThreadProc, (LPVOID)&(g_nIndex[0]), 0, &tID);
g_nIndex[1] = 1;
::CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)ThreadProc, (LPVOID)&(g_nIndex[1]), 0, &tID);
} Second, you use CreateThread in conjunction with MFC. This is dangerous. If your thread uses MFC support it should always be created via AfxBeginThread . Knowing this, you can write CreateMultiThread as follows:
void CTestMultiThreadApp::CreateMultiThread()
{
DWORD tID;
g_nIndex[0] = 0;
AfxBeginThread((AFX_THREADPROC)afxThreadProc,(LPVOID)&(g_nIndex[0]));
g_nIndex[1] = 1;
AfxBeginThread((AFX_THREADPROC)afxThreadProc,(LPVOID)&(g_nIndex[1]));
} Now your "Debug Assertion Failed" is gone bye bye...
RK
|
|
|
|
|
How does one go about getting the number of files in a directory with VC++?
Thanks for any help.
|
|
|
|