|
The error messages you mentioned frequently appear when the compiler's options related to single or multithreading are different in your project and in CxImage library.
If you are using a pre-build CxImage library file, you should be sure the "C/C++ --> Code Generation --> Runtime Library" option of your project corresponds to the value used to generate CxImage library.
If you have the source code of CxImage library and use CxImage as a second project of your solution, then it is easy to check if the compiler options are the same in both cases.
|
|
|
|
|
hai every body i try to write a program to chat with dialogs in same project(MFCAppWzd).I create two dialog control and editbox on both.Whenever i type in dialog1 it display dialog2,similarly i type in dialog2 it also display in dialog1 and also switch between dialogs.
|
|
|
|
|
And what is the question ?
(Please, post a specific question, not asking how to do a chat program. The more accurate the question is, the more accurate the answer will be).
Cédric Moonen
Software developer
Charting control
|
|
|
|
|
Do you need to one chat program?or you have one problem
whitesky
|
|
|
|
|
From what I interpreted according to your question -
You will need to send each character on to the remote machine as and when it is entered into the edit window from M/C 1 -> M/C 2 and v/v.
You will have to synchronize the sending and receiving of data on both ends with extreme cautions.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
I use the event model to receive data from the socket,
How to get packet one another from what I've received?
I tried to use a buffer list (list<char*>) to save data, then to get the packet from the buffer list. Though it can work, not efficient. For example:
while FD_READ
recv(s,buf,1024,0);
buflist.push_back(buf);
buf may have data less than 1024 bytes, so memory is wasted, and a more complicated algorithm is needed to get a packet from the buffer list. Maybe I should allocate another block of memory in the appropriate size, and copy the data to it. But I don't think it is efficient. Is there any efficient way?
-- modified at 12:34 Tuesday 6th June, 2006
|
|
|
|
|
As we know quick launch in task bar is a very usefull component to launch app.
i wanna know much more about it.It works as if they create shortcut in it.
can you tell me the truth of how it works.
By the way, if i want to display the shortcut to another app in my own window,
how can i implement it.
|
|
|
|
|
wanglei1980 wrote: By the way, if i want to display the shortcut to another app in my own window,
They simply Execute the EXE on Click...
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
Hi,
Is there any way to catch the mouse move over listview header? I am able to handle click and dblclick but I did'nt find any message for mouse move over listview header.
Adios,
Cool Ju
Dream Ur Destiny
|
|
|
|
|
Subclass the headerctrl and then handle the mouse move
nave
|
|
|
|
|
OMG!!
Years later, I found this by chance and this is exactly what I needed !
Tahnks
|
|
|
|
|
Hi,
I have a list control with 4 columns. One of the columns should have 2 subcolumns within it. Could anybody guide me how to go about it?
Thanks!
|
|
|
|
|
I don't think there is an easy way to stop the header bar from showing the split without it being owner-drawn.
1- You could always reduce the width of the columns, so it looks like a sub-column.
2- You could also insert the text using some spaces between the two sub-column entries in the same column.
this is this.
|
|
|
|
|
Hi all,
I have custom scrollbar. I need to track the thumb as windows tracks the thumb of a scrollbar. My logic is not working very well. the thumb is not reaching the bottom Do u know how to calculate physical position of the thumb accordign to the logical position(scroll range).
SaRath.
"Don't Do Different things... Do Things Differently..."
|
|
|
|
|
hi
in spread how to get the position of cursor like the cursor is in 4 chars from start or 5 chars from start .
"Men never do evil so completely and cheerfully as when they do it from religious conviction"
-Pascal
|
|
|
|
|
Hi
I want to display finish button on Property page along with next and back button. For this i have changed code according to MS link
http://support.microsoft.com/kb/q143210/[^]
but finish button is not displayed.How does MFC internally handles calls to
ID_WIZFINISH and ID_WIZNEXT buttons?
Thanks in advance
Abhi Lahare.
|
|
|
|
|
to display the finish button overide the OnSetActive function of that page and put the following code in it
CPropertySheet* psheet = (CPropertySheet*) GetParent();
psheet->SetWizardButtons( PSWIZB_FINISH );
nave
|
|
|
|
|
hi Naveen,
psheet->SetWizardButtons( PSWIZB_FINISH ) will set the FINSIH button on property sheet and will hide NEXT button,
I want all the buttons Back,Next,Finish,Cancel all the time on all pages of wizard. expect the last page where there will be no Next button.
Also i want to override functionality of Finish Button.
Thanks in advance
Abhi Lahare
|
|
|
|
|
did u try the following steps
1. Overide the OnSetActive() function in the class of last page
2. Put the following code in it
CPropertySheet* psheet = (CPropertySheet*) GetParent();<br />
psheet->SetWizardButtons( PSWIZB_FINISH );
To overide the functionality of finish button overide the function OnWizardFinish()
nave
|
|
|
|
|
...OnSetActive()
{
// TODO: Add your specialized code here and/or call the base class
CPropertySheet *pParent;
pParent = static_cast<cpropertysheet *=""> (GetParent());
pParent->SetWizardButtons(PSWIZB_BACK|PSWIZB_NEXT|PSWIZB_FINISH);
return CPropertyPage::OnSetActive();
}
Regards
Amar
|
|
|
|
|
I need to replace Sleep(n) in my code by a timer (in a while loop or something).
Sleep is turning out to be very inaccurate with errors of upto 40 milliseconds.
can anyone please give me some easy to understand code to do this replacement.
|
|
|
|
|
If you are using MFC, then it is a bit easier.
Set the timer using SetTimer() .
Handle the WM_TIMER message, OnTimer() etc.
But this one is also not accurate. It skids slowly in one direction or the other until you have an error that is seconds long in a few hours.
The better timer available is the Multimedia timer .
Just look up WM_TIMER message and SetTimer() function, and you are on your way. Do all the processing in the OnTimer() function and without using any loop or Sleep() .
this is this.
|
|
|
|
|
You won't be able to have a precision under 10 or 15 msec (depends of the CPU load and other factors) because windows is not a real-time operating system. If you need to have such precision, you'll need to look for another OS.
Cédric Moonen
Software developer
Charting control
|
|
|
|
|
I think you can try to replace Sleep with QueryPerformanceCounter .
The code can look like this. First, get the frequency of high-resolution performance counter; this can be done once in your program:
LARGE_INTEGER freq;
QueryPerformanceFrequency(&freq);
Then, when you need a delay, use the following approach:
int const delay_ms = 500;
long long n = delay_ms * freq.QuadPart / 1000;
LARGE_INTEGER c;
QueryPerformanceCounter(&c);
long long const f = c.QuadPart + n;
do
{
QueryPerformanceCounter(&c);
} while( c.QuadPart < f);
Hope this solution will meet your requirements.
|
|
|
|
|
Sharath86 wrote: can anyone please give me some easy to understand code to do this replacement.
try QueryPerformanceCounter
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|