|
You need to build your release version with debug symbols. Goto your project settings, select the release version.
In the C/C++ tab put the debug info to the level required (usually maximum)
In the link tab select the debug category and enable debug info.
You should then rebuild your project. At the call to DoModal() step into the code and see why its failing.
Usually the problems between debug/release can be down to the debug version initialising variables to 0. This does not happen in the release version, so you should check that variables have been inialised correctly.
Roger Allen the man
|
|
|
|
|
thank you for the reply but i am having a problem with the debug settings.
I do not have a maximum for debug info
all i have is
none
line numbers only
c7 compatible
program database
program database for edit and continue
I have tried all settings and the program will not compile correctly or when i run it i get a message " No Debug Info..."
these are my settings
/nologo /MD /W3 /GX /ZI /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Fp"Release/ildococx.pch" /Yu"stdafx.h" /Fo"Release/" /Fd"Release/" /FD /c
thank you again
|
|
|
|
|
I wanted to get a checksum of a file.
when I wrote the following function with "#define READ_BUFFER_SIZE 1024"
It didn't get the right checksum for very big files.
I changed it to "#define READ_BUFFER_SIZE 2048"
and it worked!
can anyone please explane the reason for it?
then you.
Aviv.
BOOL FileCheckSum(CString FileName, unsigned long *Sum/*UINT32 * Sum*/)
{
#define READ_BUFFER_SIZE 2048//1024
FILE *fp;
char DataBuffer[READ_BUFFER_SIZE];
INT32 length;
fp=fopen(FileName,"r");
if(fp==NULL)
return FALSE;
*Sum=0;
while(!feof(fp))
{
/* Reset the data buffer before reading */
for(int i=0;i<read_buffer_size;i++)
databuffer[i]="0;
" length="fread(DataBuffer,1,READ_BUFFER_SIZE,fp);
" while="" (length="">0)
{
if(DataBuffer[length]=='\n')
*Sum += '\r'; //need to add CR to count for every LF since MC does it
*Sum += DataBuffer[--length];
}
}
/* Add 1 to the calculated CheckSum (agreed with the BMDS) */
*Sum += 1;
fclose(fp);
return TRUE;
#undef READ_BUFFER_SIZE
}
avivhal
|
|
|
|
|
I wanted to get a checksum of a file.
when I wrote the following function with "#define READ_BUFFER_SIZE 1024"
It didn't get the right checksum for a certain very big file(it worked fine for smaller files).
I changed it to "#define READ_BUFFER_SIZE 2048"
and it worked for the very big file as well!
can anyone please explane the reason for it?It shouldn't metter what the size of the buffer is ,so I don't understand.maybe it's a bug in the OS?!
thank you.
Aviv.
BOOL FileCheckSum(CString FileName, unsigned long *Sum)
{
#define READ_BUFFER_SIZE 2048
FILE *fp;
char DataBuffer[READ_BUFFER_SIZE];
INT32 length;
fp=fopen(FileName,"r");
if(fp==NULL)
return FALSE;
*Sum=0;
while(!feof(fp))
{
/* Reset the data buffer before reading */
for(int i=0;i<read_buffer_size;i++)
databuffer[i]="0;
" length="fread(DataBuffer,1,READ_BUFFER_SIZE,fp);
" while="" (length="">0)
{
if(DataBuffer[length]=='\n')
*Sum += '\r'; //need to add CR to count for every LF since MC does it
*Sum += DataBuffer[--length];
}
}
/* Add 1 to the calculated CheckSum (agreed with the BMDS) */
*Sum += 1;
fclose(fp);
return TRUE;
#undef READ_BUFFER_SIZE
}
avivhal
|
|
|
|
|
I forgot a line in the function so here it is..........:
I wanted to get a checksum of a file.
when I wrote the following function with "#define READ_BUFFER_SIZE 1024"
It didn't get the right checksum for very big files.
I changed it to "#define READ_BUFFER_SIZE 2048"
and it worked!
can anyone please explane the reason for it?
then you.
Aviv.
BOOL FileCheckSum(CString FileName, unsigned long *Sum)
{
#define READ_BUFFER_SIZE 2048
FILE *fp;
char DataBuffer[READ_BUFFER_SIZE];
INT32 length;
fp=fopen(FileName,"r");
if(fp==NULL)
return FALSE;
*Sum=0;
while(!feof(fp))
{
/* Reset the data buffer before reading */
for(int i=0;i<read_buffer_size;i++)
databuffer[i]=0;
length =="" fread(databuffer,1,read_buffer_size,fp);
while="" (length="">0)
{
if(DataBuffer[length]=='\n')
*Sum += '\r'; //need to add CR to count for every LF since MC does it
*Sum += DataBuffer[--length];
}
}
/* Add 1 to the calculated CheckSum (agreed with the BMDS) */
*Sum += 1;
fclose(fp);
return TRUE;
#undef READ_BUFFER_SIZE
}
avivhal
|
|
|
|
|
VC++ : multi-language application with resource DLL
Hello !
I would like to create a VC multi-language application with language
resource DLL.
It's very easy for the main program, there is many exemple.
In the function CxxxApp::InitInstance() I add :
HINSTANCE hRes = NULL;
LoadLibrary("languFR.dll");
if(hRes)
AfxSetResourceHandle(hRes);
But my program use DLL and when I try to load a resource DLL into a DLL, my
software lose its string table !
Could you help me ?
|
|
|
|
|
Hi,
I have created a class derived from CListBox but when I use the CWnd::GetStyle() method (inside or outside my class), I can't see if my listbox has a border or not... is it a bug from Visual C++ 6.0 ?
I also used ::GetWindowLong() function, but the result is the same.
Thanks in advance.
|
|
|
|
|
I apologize if this has been asked before, but is there a way to make the existing clistview class have more than one text line, or is there a class available that allows this? I want to be able to have multiple lines of text in one row, and use \n to force the next line
eg. display "One\nTwo\nthree" in a cell, and have it look like this:
-----------
|One |
|Two |
|Three |
-----------
|
|
|
|
|
Download this file
http://www.codeproject.com/useritems/changerowheight/multiline.zip
Nish
Sonork ID 100.9786 voidmain
www.busterboy.org
Nish is a BIG fan of Goran Ivanisevic
|
|
|
|
|
How can I grab contents of any window of application ( from this application ) into a bitmap?
|
|
|
|
|
chk out http://support.microsoft.com/support/kb/articles/Q240/6/53.asp
the article is for VB but you should be able to convert easily to c++
Nish
Sonork ID 100.9786 voidmain
www.busterboy.org
Nish is a BIG fan of Goran Ivanisevic
|
|
|
|
|
Who can write simple regular dll (at name RegDNM) by the wizard.
That contain only one function (at name Reg).
That gets integer and returns integer(even the same integer )and that's all.
and would works in another language (as delphi) client program .
Very simple . not?
I tried it in all the ways that I successed to find and it works only in vc. not in delphi !
|
|
|
|
|
|
Nish, that was suggested to the guy about a month back. He didn't have much success with that either.
My Delphi knowledge is about five years out of date and so is my copy otherwise I'd take him up on his challenge. I refuse to believe that it can't be done.
Michael
|
|
|
|
|
Michael P Butler wrote:
Nish, that was suggested to the guy about a month back.
guy???
isnt mimi a girl-name?
I know of mimi rogers [actress]
Nish
Sonork ID 100.9786 voidmain
www.busterboy.org
Nish is a BIG fan of Goran Ivanisevic
|
|
|
|
|
|
Go to this site : http://www.delphi3d.net/
There is a wrapper DLL for NVStripLib that illustrates how to do this.
|
|
|
|
|
You are Great , Rick !!!
That site help me very much ,
Do you know any another site with example code on that subject ?
Yet I miss something in that example(NVStripLib )
Manny thanks
mimi
|
|
|
|
|
Nish [BusterBoy] wrote:
I know of mimi rogers [actress]
Let's not forget mimi from Drew Carey. It was me who suggested COM. The interesting thing is that he/she stated they were going to lose their job over it at the time, and a month later it seems they are still hard at it. Overall my impression is that this person is in way, way over their depth. I've tried to help, but it's moved beyond anything I know squat about.
Christian
After all, there's nothing wrong with an elite as long as I'm allowed to be part of it!! - Mike Burston Oct 23, 2001
|
|
|
|
|
Christian Graus wrote:
Let's not forget mimi from Drew Carey.
Yeah!
The Drew Carey show is cool!
So is "Who's line is it anyway?"
))
Christian Graus wrote:
Overall my impression is that this person is in way, way over their depth. I've tried to help, but it's moved beyond anything I know squat about.
Hmmm.
Not much anyone can do with that I guess.
Sometimes you feel annoyed that you couldnt help someone out despite trying. I mean the best thing about trying to help out is the feeling that you have been helping out someone. So if you try and you feel you havent been of much help, it is a little sad and annoying.
Nish
Sonork ID 100.9786 voidmain
www.busterboy.org
Nish is a BIG fan of Goran Ivanisevic
|
|
|
|
|
How do I make the lines I draw on the screen flash? Do I have to use palette animation? What's the easiest way? I only need simple blinking or color change.
|
|
|
|
|
take a look at CWnd::OnTimer
Nish
Sonork ID 100.9786 voidmain
www.busterboy.org
Nish is a BIG fan of Goran Ivanisevic
|
|
|
|
|
I want to transfer a file from one computer to other computer at a particular location in both LAN and WAN.The Operating systems are Windows family and Language is VC++.
First Approach
I can use FTP to tranfer the file,I want to shift file at different directroies....eg c:\Yan1, c:\Bridge1 etc.
The drawback of this approach is that
the file transfer is double.
1-First send file to a virtual directory as FTP needs a virtual directory.
2-Now picks file from these virtual directories and store at desired locations.
OverHead Of this Approach
Must be FTP Server
Must be IIS
2nd Approach
Just share a single directory SHARED, and use this directory on client side, Store the file in this directory, and then at server picks file from this directory "SHARED" and do the rest of work
Why Better Than First
No Need Of IIS
No Need Of FTP
Third Approach
DCOM. By using this approach i can shift files from one computer to other and then manipulate according to desire.
No Need Of Extra Packages,
So Mr, would u tell me which is the best, If u have any other idea, Plz tell me.
Thanks.
|
|
|
|
|
I am trying to enable or disable a toolbar button during runtime without clicking on the toolbar itself.
When a condition in some other file changes I would like to toggle the toolbar button accordingly.
The OnUpdateHandler that the Wizard uses does seem to update.
I am using the CToolbar::GetToolbarCtrl() and
CToolbarCtrl::EnableButton(nID, FALSE) because I'm working in different files, calling a function in CMainFrame.
However, the return value from EnableButton is FALSE. Why is this??
Can anyone please tell me what I am doing wrong???
m_MyToolbar is the CToolbar object which successfully has loaded my toolbar in my application. Now I just want to enable/disable a button on this toolbar...
file_A.cpp
void function file_A ()
{
cMainFrame MainFrame;
....
....
int nSuccess = MainFrame.m_MyToolbar.GetToolbarCtrl().EnableButton(ID_BUT1,FALSE);
...
...
}
Any help appreciated..! Thank you.
|
|
|
|
|
have you done this?
MainFrame=AfxGetMainWnd();
Nish
Sonork ID 100.9786 voidmain
www.busterboy.org
Nish is a BIG fan of Goran Ivanisevic
|
|
|
|