|
Alton Williams wrote: void CEditTestCtrl::OnDraw(CDC* pdc, const CRect& rcBounds, const CRect& cInvalid)
{
DoSuperclassPaint(pdc, rcBounds);
//added
pdc->FillRect(&rcBounds, &CBrush(TranslateColor(GetBackColor())));
}
Use pdc->SetBkMode(TRANSPARENT) to make text background transparent.
Nibu thomas
Software Developer
|
|
|
|
|
I need to verify that the outputs from two separate builds, using the same source code, is equivalent. If I compare the DLLs, there are 13 bytes that are different. Is there a tool somewhere that can do this kind of comparison?
Thanx,
Steve
|
|
|
|
|
Use fc /b file1 file2 from a command prompt.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
I've tried that. There are 13 bytes that are different. I can see no reason for them to be different since the source code is the same and the same version of Visual C++ is being used. Is there a build date or something in the DLL that would cause the miscompare? If so, is there a way to ignore it?
Thanx,
Steve
|
|
|
|
|
Steven Mattison wrote: Is there a build date or something in the DLL that would cause the miscompare?
I think I read somewhere in the PE literature about the linker writing date-related information to the file. It should be the number of seconds since December 31st, 1969 @ 4:00 P.M.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
I wrote a small code to read a file and write it out. I found the program can not read all the lines. I do not know what is wrong ? Please ckeck it for me.
---------------------------------------------------------------------
// blast_vib_procDlg.cpp : implementation file
//
#include <iostream.h>
#include <fstream.h>
#include <string>
using std::string;
int
main()
{
// read seed waveform data file
// string qq;
char filein[35];
char fileout[35];
ifstream f_ptr1;
ofstream f_ptr2;
char buffer_seed[90];
int i=0;
//
string pp;
cout << "input file name ?";
cin >> filein;
cout << "output file name ?";
cin >> fileout;
f_ptr1.open(filein);
if(!f_ptr1) {
cerr << "error: unable to open input file: "<
|
|
|
|
|
ruilin Yang wrote: I found the program can not read all the lines.
How many lines are in the file? The while loop terminates when it encounters a \n character. Is this intentional?
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
I am using VC++ compiler.
My intention is to read a file completely. So my intension is to read until
the end of the file. I do not know what is the best symbol to put at
while(!(qq=="'\n'")). I tried a few different symbols, does't help.
Thanks
|
|
|
|
|
I think you need to use the eof() method instead. Something like:
while (! f_ptr1.eof())
{
f_ptr1.getline(...);
f_ptr2.write(...);
}
On a side note, are ruilin Yang and mrby123 one in the same?
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
Hi DavidCrow
You solved my problem. ruilin = mrby123
Thanks
By the way, I do not like the f_ptr1.getline (par1,par2,par3); I do not like to
specify the number of the characters or the third parameter ' '.
I like to use the string function: getline(f_ptr1,s), This looks more robust,
but it does not work. The compile do not know the function, even you can see
I have #include string
The program is funny, when I put #include iostream and #include fstream
I got :'ifstream' : undeclared identifier
I have to put: #include iostream.h and #include fstream.h
Then the program works. I do not understand why I can not use #include iostream.
-- modified at 12:39 Tuesday 14th March, 2006
|
|
|
|
|
Hello, i am a new in c++! i know c#, vb.net, java, asp.net but C++ i dont know nothing! how can i start my new project from because when i created a new project .. many items appeard I am using VB.net 2003
Adrian De Battista
|
|
|
|
|
ADY007 wrote: how can i start my new project...I am using VB.net 2003
You might want to start with a VC++ compiler.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
I am using VC++ compiler.
My intention is to read a file completely. So my intension is to read until
the end of the file. I do not know what is the best symbol to put at
while(!(qq=="'\n'")). I tried a few symbols, does't help.
Thanks
|
|
|
|
|
yes but i can't see any VC++ Is it like console?
Adrian De Battista
|
|
|
|
|
it maight not have been installed with the other parts of your Visual Studio environment...
|
|
|
|
|
I made a console project with my VC++ 6.
|
|
|
|
|
Hi,
I currently porting some code from Linux to Windows. I have decided against a windows implementation of the POSIX threading libraries and opted for windows threading.
Previously in my code, I had conditional run conditions using the pthread_cond_t, is there an equivalent in the windows threading API?
Any help would be greatly appreciated,
Paul.
|
|
|
|
|
paul_a_chapman wrote: I have decided against a windows implementation of the POSIX threading libraries and opted for windows threading.
That was a mistake
paul_a_chapman wrote: I had conditional run conditions using the pthread_cond_t, is there an equivalent in the windows threading API?
Unfortunatelly, no, at least not directly. Look here[^] for a workaround.
My programming blahblahblah blog. If you ever find anything useful here, please let me know to remove it.
|
|
|
|
|
Thanks for your reply, that link is useful. I did try using the win32 pthread libraries, but I kept getting exception errors. The code functions correctly on linux but not with the win32 pthreads library. The decision was made above me to use windows threading api.
Thanks again.
Paul.
|
|
|
|
|
1. barcode is drawn by lines (space and bar), why does it need font? font is useless when we draw lines.
2. what is correct width of bar or space? - i.e. 0.2 mm etc.
3. what is correct height of barcode?
A nice tool for optimizing your Microsoft html-help contents.
Includeh10
|
|
|
|
|
includeh10 wrote: 1. barcode is drawn by lines (space and bar), why does it need font? font is useless when we draw lines.
See here.
includeh10 wrote: 2. what is correct width of bar or space? - i.e. 0.2 mm etc.
A barcode is comprised of bars and spaces. I believe the leftmost bar, which is one unit wide, sets the stage for the remaining bars and spaces.
includeh10 wrote: 3. what is correct height of barcode?
I believe it is governed by the product on which the barcode is placed. For example, a large box can afford to have a large barcode where as box of cookies could not. Another determining factor is how far will the scanner be from the box.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
I'm writing an application, where I need to save links to external documents (.xls, .doc, .txt, ...). In Windows, when I double-click to such a file, it'll be opened automatically by the corresponding application.
double-click to test.xls opens Microsoft Excel
double-click to test.doc opens Microsoft Word
double-click to test.tif opens the corresponding graphical application
and so on...
How can I implement this functionality in my application, working under Visual C++ / MFC ?
regards
Alfred Willi
|
|
|
|
|
a type of file (extension) is associated with an application.
u can find all info about this in system register (run regedit.exe).
e.g. doc file can be opened by Microsoft word.
A nice tool for optimizing your Microsoft html-help contents.
Includeh10
|
|
|
|
|
Alfred Willi wrote:
How can I implement this functionality in my application, working under Visual C++ / MFC ?
Use ShellExecute() with the "open" verb will open the associated application.
Otherwise, if you are wanting to know how to register your own file type, this is handled for you automatically by MFC's AppWizard. It will create a .reg file in your project that can be merged on the target machine. Check out CWinApp::EnableShellOpen() and CWinApp::RegisterShellFileTypes() .
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
Hi David
Your answer was exactly the information I was looking for. Your answer was very helpful for me. Thanks a lot.
Alfred Willi
|
|
|
|