|
Most likely you'll find that you are simply looking in the wrong thread. On Win2K I think you see extra threads even if your application isn't multithreaded. Use Debug|Threads to select the main thread and all should be well.
Hope that helps.
Neville Franks, Author of ED for Windows
www.getsoft.com
|
|
|
|
|
... unfortunately it didn't help ...
|
|
|
|
|
... unfortunately it didn't help ...
|
|
|
|
|
In Debug|Threads do you see more than one thread? You need to either Double click on the list item or press Set Focus before you will see the Stack Trace for the selected thread.
Neville Franks, Author of ED for Windows
www.getsoft.com
|
|
|
|
|
Yes, I see several threads; but neither double clicking nor pressing "Set focus" does help. BTW, even the context selector
(the drop down selector on top of the "Variables" debug window) is empty, i.e. doesn't contain any contexts.
|
|
|
|
|
... meanwhile I have reinstalled my machine in the following way:
* deinstall Microsoft Visual studio
* reinstalled WIN98_SE
* installed MCS
* tested debugging and call stack - no success! Call stack stays empty!
* installed service pack 4
* tested debugging and call stack - no success! Call stack stays empty!
* installed PP
* tested again with no success
Seems to be all very strange to me ...
Roland
|
|
|
|
|
Hi everyone,
I'm trying to build an activeX (ATL)witch contain a combobox.
The problem is, I can't see the strings that I add in the combobox list.
At test mode everything seem perfect, but When I insert my New control in any container there is no string inside.
I learned on another site that it is a bug, But they don't say exactly how to solve it.
I'm usign Visual C++ 6.0 to build it. This crucial for me
Please if you have any solution contact me that will appreciated.
Email: skoomson@motus.com
|
|
|
|
|
I'm trying to setup Microsoft's Intenet Connection Sharing from C++. MS
Knowledge Base article Q234815 talks about the ICS "APIs for configuration,
status and dial control for programs." However, even with MSDN, I can't find
any reference to these APIs.
Windows 98 has a DLL called icsapi32.dll and dumping the exports shows me
that these functions exist:
IcsConnect
IcsDisable
IcsDisconnect
IcsEnable
IcsEnumerateActiveMappings
IcsEnumerateClients
IcsEnumerateInstalledMappings
IcsGetAdapterList
IcsGetClientOptions
IcsGetConfiguration
IcsGetStatistics
IcsSetClientOptions
IcsSetConfiguration
IcsSetHomenetConnection
IcsSetInternetConnection
IcsSetMapping
but I can't find any doc on them. I've searched MSDN Universal,
developer.com, most of these newsgroups, and the Platform SDK header files.
They're supposed to be supported in Windows 98 Second Edition, ME, and 2000.
Does anyone have any ideas where I can find any information on these calls?
Thanks for your time.
|
|
|
|
|
I have a CButton-derived control (let's call it MyCButton) for which I am handling the painting. I do my painting in MyCButton.DrawItem().
The problem is, Windows erases MyCButton before each call to DrawItem(). That causes massive amounts of flickering.
How do I stop Windows from doing this? Are there any better ways of going about what I'm trying to do?
|
|
|
|
|
Try adding a handler for WM_ERASEBKGND . In the OnEraseBkgnd handler, do nothing - just return TRUE.
|
|
|
|
|
Is there a way to enumerate all the symbols exported by a loaded dll file?
Thanks!
|
|
|
|
|
Hello.
I'm working on an application that displays processes state. I manage to get their
handles thanks to "OpenProcess" function. Now I'd like my application to react when one of these processes terminates. How can I do ?
I understand that I probably have to implement callback functions, but how ?
Do I have to use "RegisterWaitForSingleObject" function ?
Thanks.
|
|
|
|
|
ummmm unfortunately its not so easy to get notified of things happening in other parts of the system ... thats why the process viewer in winnt polls every few seconds and gets a snapshot of whats happening
theres a styling article in an old copy of msj (jan 1999 - nerditorium) thats suggests using a fake kernel mode driver that can send notification to the user mode app across the dark divide from the kernel where it all happens (yeah yeah)
check it out ... i think it'll answer you're question
mostly watching the human race is like watching dogs watch tv ... they see the pictures move but the meaning escapes them
|
|
|
|
|
If you can't get the notification - and I can't think of it at the moment, you can
poll for the termination of the application using GetExitCodeProcess(). This will
either tell you the process is still alive, or give you its exit code.
Not ideal, but a start.
Stepehn Kellett
|
|
|
|
|
I have the following problem with virtual memory on NT. I have a 900Mhz athlon with 256MB of pc133 memory in windows NT 4.0 SP6a. I am developing and application to digitize 30 to 50 MB images (mammograms). The digitizer has 16 MB buffer and takes about 1 minute to digitize a film. The digitizer may not stop if the buffer is overrun so my program must not be inactive for more than 10 to 15 seconds. You would think this is easy. The problem is that I need to load 1 to 6 images into memory at a time. The system has enough memory to hold 4 images and swapping out parts of the images is not too bad as long as it does not make my application inactive for more than 10 seconds. The application's process is set to high priority and the task that reads the data is also a high priority thread. I set the minimum working set size to 128MB. Everything works fine with the application until I press the minimize button when the application is using 200+ MB of physical memory. When this occurs NT 4.0 pages out all the memory but about 2MB. The problem is that during this paging operation (thrashes for over 20 seconds), my application does not get enough cpu cycles to read the data from the digitizer and the buffer becomes overrun. I cannot allow this to happen because we are developing a time critical application and any failures will cause the whole operation to be aborted and a tech will have to restart the process from the beginning.. My solution for now is to disable the minimize application button, but is there a way without a Virtual Lock on each image to force NT not to page out all images at once.
Here are my allocation statements:
BOOL CImage::AllocateBuffer(UINT nMaxRows, UINT nMaxCols)
{
BOOL retVal = ( m_pBuffer == NULL );
if ( retVal ) {
m_nMaxCols = nMaxCols;
m_nMaxRows = nMaxRows;
m_pBuffer = (PWORD)VirtualAlloc(NULL,nMaxCols * nMaxRows * sizeof(WORD),
MEM_RESERVE,PAGE_READWRITE);
retVal = ( m_pBuffer != NULL );
}
return retVal;
}
BOOL CImage::CommitBuffer(UINT nOffsetBytes, UINT nBytes)
{
BOOL retVal = ( m_pBuffer != NULL );
if ( retVal ) {
PBYTE pBuf = (PBYTE)m_pBuffer;
VirtualAlloc(&pBuf[nOffsetBytes],nBytes,
MEM_COMMIT,PAGE_READWRITE);
}
return retVal;
}
BOOL CImage::FreeBuffer()
{
BOOL retVal = ( m_pBuffer != NULL );
if ( retVal ) {
retVal = VirtualFree(m_pBuffer,0,MEM_RELEASE);
}
return retVal;
}
Allocate buffer allocates a memory block for the image. I don't commit the memory during the allocate, because I don't know the size of the image until I finish digitizing. I allocate the largest possible image size and I commit sections of the buffer as I read the data from the digitizer.
Thanks in Advance,
John M. Drescher
|
|
|
|
|
as far as i know widows pages stuff out when minimizing as the app is assumed to be going bye byes for a while and so does not need the resources it had whilst running as the focus app
could you not spawn a digitizing thread off for each image and wait for them to finish from the main app? (am i talking sh*t?)
mostly watching the human race is like watching dogs watch tv ... they see the pictures move but the meaning escapes them
|
|
|
|
|
I have a digitizer thread (high priority) that is started by the main application. The one thing that gets me about this problem is that I developed the application on a Pentium Pro 200 under win2k with 128MB of memory and I don't remember seeing the problem (although it might have occured). I can't use Win2k in the final application because of the high resolution video (2 head * 2k by 2.5k pixels grayscale and costs $10,000 US) card does not have win2k drivers.
Thanks,
John
|
|
|
|
|
Ok,
I don't have a solution for your memory problem, but this should be a solution
you can use to workaround the problem.
Use two programs, one for the UI and one for doing all the work and managing the
memory, doing the digitizing etc. Use pipes (named pipes are valid on NT and 2000,
not valid on 9x/Me) to communciate between the two processes. When you minimize
the UI that process will get paged out but your digitization process (which I'm
assuming won't be visible, except on task manager) will carry on as normal.
I've got a similar program at home, except its a commercial project, so sorry,
no source code as an example. PlatformSDK has some good examples of communicating
via pipes. If you don't like pipes, you can use shared memory (which underly pipes
anyway), DDE, TCP/IP, etc).
Hope that is of use.
Stephen Kellett
|
|
|
|
|
Greetings, image processing MFC wildmen (and women),
Application: find edges in an image (machine vision task). Question: how would you architect this type of app? SDI, with the image data in the document and multiple views of the document (grayscale, binarized,...)? Other suggestions?
John K
|
|
|
|
|
i would use an mdi app with a separate view for each different version (greyscale,color,etc) of an image in the view's doc
for image manipulation algorithms theres a real cool book full of complete hieroglyphics and gobbledy-gook called "Digital Image Processing" ... i had it as a coffee table book once to impress people ... never understood a damn word of the heavy maths but hey ... it made people think i did
mostly watching the human race is like watching dogs watch tv ... they see the pictures move but the meaning escapes them
|
|
|
|
|
Why would you make it MDI, as opposed to SDI, if there was only a single 'base' image from which grayscale, binary, and other views could be drawn?
I have that book. Good theory but practically not so hot.
John
|
|
|
|
|
SDI is generally one view per app. with MDI, you can have as many views open in the client area as you want - even if they all come from the same base doc.
-c
-----------------------------
http://www.smalleranimals.com
image processing and more
|
|
|
|
|
Hi Chris,
The birth of my first child delayed this reply...sorry. Mom and baby are fine, I wasn't thinking about MFC for the last week!
In reference to your comments (thanks, BTW)I saw the image processing as a *serial* sequence of views, all derived from the same base doc, aka the raw image. First, the user would see a view that's the raw image (grayscale), then a binarized view, finally a binarized view with annotated feature locations (edges, actually). Therefore, since the views are serial, I thought life might be easier if I stuck with SDI.
In the future I would like to package this capability into a conventional or ActiveX DLL, to be called from a controlling Visual Basic program. This led me to pursue a minimally featured and simple image processing piece, which led me to SDI. However, since I'm an MFC neophute (and really struggling at times!) I'm open to architectural suggestions.
Regards,
John K.
|
|
|
|
|
Could you please comment on the book and any you've found to be better ? I'm looking for a good book at the moment, one that goes beyond obvious filters like emboss, sharpen, soften, gamma, etc. ( done all those already ;0)
Christian
The content of this post is not necessarily the opinion of my yadda yadda yadda.
To understand recursion, we must first understand recursion
|
|
|
|
|
Hello Christian,
Sorry for the delayed reply...my excuse is my first child, daughter, was born eight days ago. We're all doing fine, but MFC was the last thing on my mind!
As for practical books on image processing, I haven't run across *any*. To be fair, I haven't searched the literature for the last decade or so; I might be way out of date. They say experience is the best teacher, and that has certainly been true in my case. My image processing experience is mostly in machine vision, doing assembly or process automation. I've almost always been able to accomplish my image analysis tasks using edges, since the job at hand is usually some kind of gauging operation. Frankly, the problem is almost never the actual processing of the image; typically the lighting sucks or the optics are marginal or the damn thing shakes 'cause you're doing assembly in an automotive stamping plant. Rarely I've used connectivity and even less frequently some sort of correlation technique.
One area that seems to have a lot of practical literature is optics design. I also stay abreast of practical developments through technical magazines, e.g. _Assembly_.
Regards,
John K.
|
|
|
|