|
I had similar problem when I compiled my VC6.0 on VC7.0.
I do not think you are missing files, just play with project settings.
In my case I fixed it by:
Linker\input\ignore all default libraries ->set it to--> NO.
Mark,
|
|
|
|
|
I am creating 2 secondary threads in my application.One of them runs constantly behind to poll for incoming files. The other one is created every 40 seconds.I've implemented the creation of thread using timer.This timer thread uses MAPI to check for incoming mails etc.
The problem is after this thread finishes checking the mails, the application pauses. i.e. the thread running behind stops.Sometimes it starts on its own after 20 secs or so. At times when it doesn't start,a user input like a mouse click or so does the trick and it starts.
The pausing is also intermittent so its very difficult to know exact reason why this is happening?
Any ideas?
Thanks in advance
|
|
|
|
|
It is tricky to debug multithreaded applications with in-depth knowledge of the design including calls to win32 API that waits for an event to complete.
Post more including including calls to WaitForSingleObject() if applicable.
Kuphryn
|
|
|
|
|
Hi, I will like to know what is the difference between malloc and localalloc?
Thanks.
|
|
|
|
|
look at return values at first (and than at LocalLock/Unlock help)
and:
The global and local functions supported for porting from 16-bit code, or maintaining source code compatibility with 16-bit Windows. The global and local functions are slower than other memory management functions and do not provide as many features. Therefore, new applications should use the heap functions. However, the global functions are still used with DDE and the clipboard functions.
Windows 95/98/Me: The heap managers are designed for memory blocks smaller than four megabytes. If you expect your memory blocks to be larger than one or two megabytes, you can avoid significant performance degradation by using the VirtualAlloc or VirtualAllocEx function instead.
|
|
|
|
|
Hi, thanks for your reply.
So do you mean both malloc and LocalAlloc actually allocates memory from the heap?
So I guess the main difference is really it's portability then, isn't it?
|
|
|
|
|
easiest is to look into malloc.c directly (in my case \Program Files\Microsoft Visual Studio\VC98\CRT\SRC)
you can find HeapAlloc there (#ifdef WINHEAP)
|
|
|
|
|
Hi,
any one have flex.exe please mail to me.
email : murali_utr@hotmail.com
murali@s-ecom.com
thanks in advance.
Happy New Year.
Murali.M
|
|
|
|
|
hi,
i got it. flex.exe is available in the following url.
http://www.monmouth.com/~wstreett/lex-yacc/lex-yacc.html
Have A Nice Day.
Murali.M
|
|
|
|
|
hai, i am a beginner of the c++ programming,and i am now doing a windows programming project of write and read through a serial port using c++. i have totaly no idea of how to do the windows programming.
i would able to write and read to the serial port in dos mode only. this is my simple program:
int main()
{
char path[BUFLEN];
DWORD byteswritten;
DWORD bytesread;
DCB portDCB;
char read[BUFLEN];
cout << "Enter the characters:" << endl;
cin.getline(path,100);
HANDLE comport;
comport = CreateFile("COM1:",
GENERIC_READ | GENERIC_WRITE,
0,
NULL,
OPEN_EXISTING,
0, NULL);
if (comport == INVALID_HANDLE_VALUE)
{
cout << "Problem opening com port " << endl;
exit(1);
}
GetCommState(comport,&portDCB);
portDCB.BaudRate=14400;
portDCB.Parity=NOPARITY;
portDCB.StopBits=ONESTOPBIT;
portDCB.ByteSize = 8;
SetCommState(comport,&portDCB);
if(WriteFile(comport,path ,strlen(path),&byteswritten,NULL))
{
cout<<"******write to the com port******"<
|
|
|
|
|
sam_mou wrote:
anyone know how to do in windows programming,can plz help me?
Try to be more specific. What exactly do you want to do?
You're so cute when you're frustrated. --from 'PDA' by Interpol
|
|
|
|
|
hi...My application contain a Dll.This Dll is internally useing the Oracle forms Runtime Dll, through compile time binding....This Dll and his .Lib is the oracle forms runtime .My application is useing this Oracle forms runtime in the Dll.
Problem start when I start useing the latest Forms runtime in the Dll because
my application should be generic and not specific to a perticular Forms runtime version. but I can not predict the client side runtime. and the main problem is the .lib file for the different version are with different name so when I include all these it give me error at run time.
please suggest a way by which I can attach .lib as per the client side in my application.
thanks
utkarsh sharma
"Not everything that counts can be counted, and not everything that can be counted counts."
|
|
|
|
|
Hello all.
I have two listboxes in my program (side by side) that I am storing different data in. I want it so that when you click inside one of the listboxes, the other one "tracks it", meaning if I click on item #1 in listbox1, I want to instantly select item #1 in listbox2.
Currently, I am doing it this way:
void CMyTestAppDlg::OnLbnSelchangeList1()
{
int curSel = m_ListBox.GetCurSel();
m_ListBox2.SetCurSel(curSel);
}
( I also do the same code for the changeList2() )
This method works for me, the only problem is that it is slower than I had hoped. (When I click on one of the listboxes, it takes a good half second or so before the other one "catches up"). I am wondering if there is some other way of "linking" the listboxes so that the tracking is instant? (I know it's a long shot, but worth the question anyways
BTW: If I use the UP/DOWN arrow to move the selection in one of the listboxes, the tracking is instant and looks beautiful. I am guessing that the additional bit of overhead in processing the mouse click is what is slowing down the tracking process.
Thanks!
|
|
|
|
|
On a mouse click in the list box, it sounds like your handler doesn't get called until you release the mouse button. The delay you're experiencing could be the difference between when the button is pressed and released. To check this out, try pressing and holding the button and see if the change occurs only after the release.
Software Zen: delete this;
|
|
|
|
|
That is exactly what is happening!
Is there any way that I can make the listbox "onchange" happen on the press of the mouse button instead of the release?
Thanks
|
|
|
|
|
shultas wrote:
Is there any way that I can make the listbox "onchange" happen on the press of the mouse button instead of the release?
Yes. Try handling the NM_CLICK notification sent by the list box.
You will have to do a little work to figure out which item has been clicked on, since the NM_CLICK notification does not identify the item within the list box that was clicked. You should be able to get the position of the mouse cursor within the list box and compute the item based upon the size of the items in the box and the number of the topmost visible item.
Software Zen: delete this;
|
|
|
|
|
ilist_item *next = _current
<< _current = _current->next()
: _current;
I don't know the meaning of the above sentence extracted from book "C++ primer 3rd"
Could somebody tell me its meaning?
Thanks in advance!
|
|
|
|
|
Are you sure this is not a typo and it should be the conditional operator?
ilist_item *next = _current<br />
<< _current ? _current->next()<br />
: _current;
That does not look correct either, but it depends on the code, i.e. if _current != NULL go to the next node, otherwise return NULL
Of course I could be wrong
"The greatest mistake you can make in life is to be continually fearing you will make one." - Elbert Hubbard
|
|
|
|
|
I don't know if it is right
I only got it from a book "C++ Primer 3rd"
It is in sector 5.11.1
|
|
|
|
|
|
Yes
It is
Only my book is translated into chinese.
Those code may be found in A Linked List Example of chapter 5 Statements
Great!
Thanks!!!
|
|
|
|
|
The code is extracted from the function below:
inline ilist_item*
ilist::
next_iter()
{
ilist_item *next =_current
<<_current = _current->next()
:_current;
}
Mavbe the right is as you said, that is a conditional operator:
inline ilist_item*
ilist::
next_iter()
{
ilist_item *next =_current ? _current = _current->next() : _current;
}
Do you think so?
Thanks for your answer!!!
Happy 2004!!!
|
|
|
|
|
I can't say 100%, the simple test is to try and compile the code and step through using the debugger.
What I think it is, is a class to iterate through a linked list, where _current is the current node, next_item() checks if _current has been defined is so get the next node, otherwise return _current , which I asuume is NULL
Isn't C++ fun!
"There is no monument dedicated to the memory of a committee." - Lester J. Pourciau
|
|
|
|
|
Yeah!
C++ is very fun
and it is abundant in perfect thinking!
|
|
|
|
|
it is accessing the constructor (maybe) of that object.
My God is more powerfull Than Your God. (the line that divides the world)
|
|
|
|