|
Man whatever you need to ask my mail address is eu_acela@yahoo.com
eu_acela@hotmail.com
gabby
|
|
|
|
|
I come back from a 2 week break and notice that my code no longer works - I am getting errors related to
i386\chkesp.c<br />
The value of ESP was not properly saved across a function call. This is usually a result of calling a function declared with one calling convention with a function pointer declared with a different calling convention.<br />
As I believe nothing has changed with the file(s) going into this build, maybe some compiler settings were changed. I'm at a total loss and need some advice/direction.
Thank you.
Johnny P
|
|
|
|
|
Did you do a clean and Rebuild All?
"No matter where you go, there your are." - Buckaroo Banzai
-pete
|
|
|
|
|
I have my files in VSS - since coming back from hiatus, I did a "Get Latest" into clean folders, rebuilt everything and then ran.
My situation can be generalized as follows:
<br />
1) a dialog class that contains some processing (OnOk, etc.)<br />
CAdjustTimesDlg<br />
<br />
2) CAdjustTimesDlg has a private function (the offender)<br />
void UpdateTheList(CMyData item1, CMyData item2);<br />
<br />
3) AdjustTimes.cpp has the caller as:<br />
UpdateTheList(item1, item2);<br />
<br />
void CAdjustTimesDlg::UpdateTheList(CMyData item1, CMyData item2)<br />
{
}<br />
I have tried looking at the .DSP (settings), but there was no change. I tried explicitly casting the call as:
<br />
(void) UpdateTheList ( (CMyData) item1, (CMyData) item2 );<br />
But nothing I've tried so far has worked. It confuses me because there was no problem in previous builds and executions - I don't see anything that has changed.
Thanks.
Johnny P
|
|
|
|
|
Hi,
I need a help in converting files like .doc, .xls etc to tiff files.
I think that the ideal is a driver lika a printer driver.
Thanks in advance
|
|
|
|
|
I looked through Word's Save As list and did not see TIFF as an option. That's not to say it cannot be done, but having not ever done this, my initial response is "Is it possible, since Word does not offer such a conversion?"
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
I have a char buffer[20000] defined. I need to extract words from the buffer which has a string of characters which varies in length. I am not able to use substring to extract the word from the start position. how do extract a string from within a string in VC++.
|
|
|
|
|
_strtok() comes to mind. Or how about strcspn() ? If I'm way off, then I do not understand your question.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
strtok tokenizes the string, and strcspn gives the starting position of the string i am searching. I want to extract the string given the starting position and number of characters to extract. say for example i have "This is a test sample", using substring i should be able to extract sample.
substring in itself doesn't work in VC++. i don't know what equivalent is in VC++.
|
|
|
|
|
How about:
char *str = "This is a test sample";
char sub[7] = {0};
strncpy(sub, &str[15], 6); or
memcpy(sub, &str[15], 6);
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
mid()
TOXCCT >>> GEII power
|
|
|
|
|
Hi
I'm designing a multiclient drawing board. There's a pencil. When you click (OnLButtonDown) on the pencil over an area, CPoints are added to a CPoint list(OnMouseMove), and when you release the mouse button (OnLButtonUp), a (-1,-1) is sent to the list.
I sent that, so that in the OnPaint function, LineTo's are called for every point of the list, and when you get a (-1,-1) it means that the line ends.
When you release the mouse button(OnLButtonUp), the list is sent to the other drawing board.
The problem is that while you are drawing (without release the mouse button), and the other person draws something, when he realeases the mouse button, the list is sent to the other person, and i don't want that to happen.
So i thought of CCritical Section. The drawing board, has the list of CPoints, and i wanted the board not to receive while you are drawing.
So i declared in the drawing board class:
CCriticalSection CritSect;
And in the OnLButtonDown, i call CritSect.Lock(), and in OnLButtonUp, i call CritSect.UnLock(), hoping that when you are drawing, a list wouldn't be inserted to your list when you are drawing. but that doesn't happen.
Do you have any ideas of what i'm doing wrong? perhaps the CCriticalSection approach is wrong.
thank you very much for your help!.
|
|
|
|
|
Depends on who your clients are and how they are calling into your program.
Do you have multiple threads running?
If no, then you need something more like a code for ownership, that is not a 'thread' protector. You can somehow identify your clients by a code, and then only allow the button down to assign a client to the list if no other client is using the list. And only respond to the button up if the client already owns the list.
|
|
|
|
|
it's only a thread.
The program is only one to one, there are only 2 clients connected at a time.
Blake Miller wrote:
only allow the button down to assign a client to the list if no other client is using the list. And only respond to the button up if the client already owns the list.
how could i do that?
|
|
|
|
|
If you can not identify your clients, you will never sort this out.
Suppose you have a variable called PointListOwner, and you can assign PLO_NONE, PLO_CLIENT_ONE, or PLO_CLIENT_TWO, then initially you set it to PLO_NONE.
Then, when you get the button down message, you figure out which client the message came from and assign the variable that client's identifier (assuming no client currently owns the list). Then when another button down message comes in, if it is not client who owns the list, ignore it. When a button up message comes in, then if it is not client who owns it, ignore it. If the button up is the client who owns list, then draw the lines and then set the owner back to none, so the other client, or the same one, can own the list on the next button down.
Since you only have one thread, no mutex, criticalsection, etc. is going to help you with blocking access.
I don't knwo how your server is accepting the client messages, but you need to factor in a mechanism for the messages to be associated with each client.
|
|
|
|
|
that could be what i'm looking for.. i'll see about it. thanks
|
|
|
|
|
Hi,
I would like to update the display in the CSTestView if the OK botton on CParaDlg is pressed, how to initiate the update?
void CParaDlg::OnOK()
{
CString msg = "checked";
AfxMessageBox(msg);
CDialog::OnOK();
}
void CSTestView::OnDraw()
{
}
I will be very appreciated for whatever hint I received.
Regards
Nelson L.
|
|
|
|
|
If you are using Doc/View architecture, you should call method UpdateAllViews() from your document object.
example:
GetDocument()->UpdateAllViews();
regards
Rodrigo Pinho Pereira de Souza
|
|
|
|
|
If this is normal dialog, you may check if it's closed with OnOK
void CSTestView::YourCallingFunction()
{
if(YourDlg.DoModal()==IDOK)
{
}
}
|
|
|
|
|
Hi,
Could anyone provide an example to get SID (Security Identificator) of local computer ?
Yours sincerely,
Alex Bash
|
|
|
|
|
A SID uniquely identifies a user or a group (i.e., a trustee). What makes you think the computer itself has one?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Hi there,
Can someone tell me how I can copy a file from one folder to another? I was told it was unwise to use the system() function because of security reasons.
Thanks!
|
|
|
|
|
|
Now why did I think it only works for Visual Basic? Thanks!
|
|
|
|
|
elephantstar wrote:
I was told it was unwise to use the system() function because of security reasons.
To say the least. It's also a holdover from the Unix days. Use CopyFile() as has already been mentioned, or SHFileOperation() .
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|