|
I write a programm with C# and it's ok. But with Visual c++, I have the error: "include 'ATLComTime.h' not found. I add it in my project, but ich get new errors like the first one.
Why can i do to eliminate these errors?
Thank you.
Rick
|
|
|
|
|
didn't you forget the #include its header in the file that's using it ?
|
|
|
|
|
erikamania wrote: write a programm with C# and it's ok. But with Visual c++,...
hhmmm why do you want to compile your C# program with Visual C++ ?????????
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
Hã? You can't compile C# with a C++ compiler... But if the problem is an #include directive, then try adding the file's path to the "directories" list. Access Tools | Options and then click "Directories". But I'm not shure that's what is happening to you.
regards [[]]
hint_54
|
|
|
|
|
I'm Creating an ActiveX subclassing "EDIT". I would
like it to be able to change the colour of the background, text or indeed
both.
I've added the BackColor and ForeColor as Stock implementation.
I've changed below:
BEGIN_PROPPAGEIDS(CEditTestCtrl, 1)
PROPPAGEID(CEditTestPropPage::guid)
END_PROPPAGEIDS(CEditTestCtrl)
to
<CODE>BEGIN_PROPPAGEIDS(CEditTestCtrl, 2)
PROPPAGEID(CEditTestPropPage::guid)
PROPPAGEID(CLSID_CColorPropPage)
END_PROPPAGEIDS(CEditTestCtrl)
</CODE>
I've also modified the OnDraw method to;
<CODE>void CEditTestCtrl::OnDraw(
CDC* pdc, const CRect& rcBounds, const CRect& rcInvalid)
{
DoSuperclassPaint(pdc, rcBounds);
pdc->FillRect(&rcBounds, &CBrush(TranslateColor(GetBackColor())));
}</CODE>
The Bakground colour changes. The problem lies when enter text in the control, the control reverts back to the orignal colour.
The question is what is the correct way in achieving this?
-- modified at 16:03 Tuesday 14th March, 2006
|
|
|
|
|
Hello Alton Williams,
I don't have answer to your question but i just want to know why are you doing this through ActiveX control. I mean you can change the background and text color of standard Edit control by Handling WM_CTLCOLOR Message. Is ActiveX your requirement?
Muhammad Azam
|
|
|
|
|
Muhammad Azam wrote: but i just want to know why are you doing this through ActiveX control
Answer this is a component of my result.
Muhammad Azam wrote: I mean you can change the background and text color of standard Edit control by Handling WM_CTLCOLOR Message.
I know that I want to able to have the result on VB, Delphi, VC++ ect.
|
|
|
|
|
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.
|
|
|
|