|
If it is always working OK on your machine I would guess that the problem is something to do with the DLLs linked to your app.
Have your tried statically compiling the application with MFC libraries?
|
|
|
|
|
This question looks very familiar and I think I have provided a reply already, so probably it was the CodeGuru web site that I saw it. That site has been having problems so perhaps my reply was lost.
One good possibility is that you might be using ASSERT or something like that; if so, then the code would be executed for the debug version only.
Another possiblity might be that you are not checking all return codes from SDK functions etc. and there might be an error that you could catch and provide an error message for and quit sooner so that it would be easier to fix.
The other answer about uninitiallized variables could be an explanation; I think that the debug version might (I am not sure) initialize memory to zeros eventhough they are not initialized explicitly.
|
|
|
|
|
I need to hide the windows menu in a NT 4.0 windows application. Originally, the design of the application had a menu but the "design" of the application "has been changed" to one without a menu.
The functionality of the menu is provided by button controls in a child window.
I searched the MSDN, MSDN online, CodeGuru, CodeProject, Experts-Exchange, etc. without finding any information on "hiding a menu" in a Windows application.
|
|
|
|
|
Read MSDN for
CDocTemplate
CSingleDocTemplate
CM....
maybe you will find a hint
/REMUS
|
|
|
|
|
Hi,
I'm working with a Single-Document-Interface application (SDI).
In the resource editor, (VC++6.0), I tried changing the default icon (16x16) and (32x32) for saved documents.
But now when I save, the file still gets the old default icon. What's going on?
I would appreciate it if someone can tell me how to fix it.
Thank you.
|
|
|
|
|
You need to rebuild your icon cache. Tweak UI will do it, or if you don't have that, go to Control Panel/Display/Appearance tab. In the Item combo box, select Icon. Change the size to 33, apply it, then back to 32. That will rebuild the cache.
|
|
|
|
|
Does anyone know how the Unicode (wide-char) string is constructed. I have a unicode text file and I want to use WideCharToMultiByte to manipulate the contents. My problem is that I read the file as binary (byte-by-byte) and I dont know how to construct the wide-character string (used as the input for the function) to result the ANSI string. My project doesn't define unicode (therefore doesn't support unicode).
Thanks a lot in advance for any ideas.
|
|
|
|
|
Unicode uses 2 bytes for one character.
"Byte-order Mark" MSDN article could be helpful for you.
|
|
|
|
|
Hello,
how can I view the items of an array or an MFC Collection in the watch view? Let's say I have an CObArray named m_Array. Now I've typed into the watch window "m_Array[0]" to have a look at the first item in the array, but this doesn't work.
Any ideas are very welcome.
Matthias
|
|
|
|
|
For a CArray you have to dereference the internal data pointer to the C style array within the CArray.
Any collection not using standard C style arrays for data storage, which I believe is everything but CArray derivatives, will not likely have its contents aligned in a contiguous portion of memory like a CArray will. So viewing such a container's contents would probably be very difficult if not impossible. However, viewing a CArray is easy.
For example, if you are stepping through a class with a CArray derived data member named m_array you can see the contents of index 4 by entering this in the watch window:
*m_array.m_pData[ 4 ]
This assumes that that the array has a size of at least 5. Overstepping the allocated size of the array will probably not hurt in this situation but you will see garbage instead of what you expect to see.
Just think of the watch window as a way to execute a limited line of code. Virtually any syntax you would use in your program should be valid in the watch window. However, don't forget about the scope of the data you want to watch. It's easy to assume that what you put in should work and then believe that the problem is not yours when it doesn't work as anticipated.
|
|
|
|
|
I have run across a problem using CfileDialog on Windows 2000 for which I have not yet found a solution. The problem is as follows:
If I instantiate an instance of a CFileDialog passing TRUE as the first parameter and accepting the default values for all other parameters, and then call DoModal(..) on the object, then the standard CFileDialog is displayed. However, if I navigate to any folder that contains a read-only files, then I hit a user breakpoint deep within NTDLL.
To see this problem, the simplest possible reproduction is to create a dialog based MFC app that uses CFileDialog as its main window.
I had thought that specifying the OFN_DONTADDTORECENT flag might fix this problem but it did not. I also tried getting rid of the OFN_HIDEREADONLY flag, but that had no effect either.
Once the breakpoint is called in NTDLL, you can step over it to receive a 2nd which can be stepped over as well, and then the program continues normally until you shut it down at which point 2 additional breakpoints are encountered. Of course, in release mode, the operation is seamless and no problems are evident.
I have not been able to find anything at MSDN online that gives a description of the problem or a work around. If anyone has any information on a workaround that will keep Win2000 from hitting this internal breakpoint, I would appreciate it
|
|
|
|
|
Sorry that this is not a answer to your problem, but I tried creating a dialog app using CFileDialog as the main window. It worked fine in debug mode on read-only files. The only thing I can say is I have Windows 2000 Professional with SR-1 and DevStudio 6.0 with SR-4.
Sorry I can't help,
Jonathan Craig
|
|
|
|
|
Is theree any decent documentation on writing DevStudio add-ins?
I want to be able to add a menu item to the context menu in the workspace ClassView tab, and then bring up my own dialog when the programmer selects my menu item.
Thanks in advance.
|
|
|
|
|
Hi, what I need is a C++ class to read/write zipfiles(jar-files). The class may not use MFC, because I'm writing the application with WTL. Any suggestions ?
|
|
|
|
|
I realise that you don't want to use MFC but there is an MFC class on this site. This may be a start for you. Otherwise try the ZLib library avaiable from all over the place.
HTH
Jerry
|
|
|
|
|
I saw the classes here at CodeProject. I don't know if it's difficult to remove the MFC-stuff. When I don't find another solution, I'll give it a try.
I also saw ZLib, but I can't find any good documentation about it to use it in VC++.
|
|
|
|
|
Try having another look at ZLib. It's not that difficult. t has some examples, one of which I think is in pure C++. There are other examples such as an ActiveX version.
Jerry
|
|
|
|
|
Try having another look at ZLib. It's not that difficult. It has some examples, one of which I think is in pure C++. There are other examples such as an ActiveX version.
Jerry
|
|
|
|
|
Hi everybody,
where do i find the RLMAN.EXE described in the MSDN to localize existing resources.
And, there must also be an UCONVERT.EXE to convert files from ANSI to UNICODE.
I have installed VC++6.0 professional, but it is not coming with it.
TIA, Chris
|
|
|
|
|
never heard of rlman.exe ... programming international apps means u have to use unicode from the start and use the generic text mapping functions ... as well as being aware of the small gotchas to do with the unicode versions of functions (like strlen giving chars NOT bytes)
look up UNICODE in the msdn and go from there
good luck
|
|
|
|
|
Are there any tutorial to implement an event sink to capture events from an ATL component? Thanks very much!
|
|
|
|
|
Hi all,
How can I receive those messages in the main dialog of a dialog based app ?
I tried with the class wizard, but the message handler doesnt get called.
Thanks all.
Carlo.
|
|
|
|
|
Try to use Window_Proc() to capture the window message.
|
|
|
|
|
Are there any good installshields you all will use usually in packaging a software? Please advise some. Thanks all!
|
|
|
|
|
Are there any good installshields you all will use usually in packaging a software? Please advise some. Thanks all!
|
|
|
|