|
Anyone knows how to calculate or retrieve the "Commit Peak" value as shown in the TaskManager?
On WindowsXP I can get the value with GetPerformanceInfo() but what about W2k and NT4 ??
Holy Sh*t! I'm speechless. (hey, that's a first) Marc Clifton, The Lounge
|
|
|
|
|
hello,
I would like detect when the key "Ctrl" is down and show a dialog box at this time, and hide the dialog box when the key is up.
You know how can i do this?
Thx
|
|
|
|
|
Without knowing the specifics of your environment, here's what you basically need to do:
Handle the WM_KEYDOWN and WM_KEYUP messages and check for the VK_CONTROL character. Create the dialog box modelessly.
Regards,
Alvaro
All you need in this life is ignorance and confidence, and then success is sure. -- Mark Twain
|
|
|
|
|
My MFC project has this:
void CSTrainView::OnInitialUpdate()
{
CFormView::OnInitialUpdate();
ResizeParentToFit();
}
But it doesnt indicate where I should add my code: Before or after the call to the base class. How do I decide? How crucial is its position?
Appreciate your help,
ns
|
|
|
|
|
i think you can write your code after this code
|
|
|
|
|
Well if you want the default thing to happen before your code,
add it at the end. If you want your code to be first, add it at the start.
Usually just adding it to the end is fine
|
|
|
|
|
The approach I usually take to decipher these issues is to debug it. In other words, you don't have a clue what these two lines do or whether they should be called before or after your code, so before you do anything, run your program in the debugger and step into the code to see what's happening. This will (hopefully) shed light on the issue.
Regards,
Alvaro
All you need in this life is ignorance and confidence, and then success is sure. -- Mark Twain
|
|
|
|
|
Good ide about stepping in....thanks.
Appreciate your help,
ns
|
|
|
|
|
You can also look at the MFC source code, which has got to be better than spending time in the debugger.
Neville Franks, Author of ED for Windows. www.getsoft.com
Make money with our new Affilate program
|
|
|
|
|
Huh? Reading through dozens of MFC source files full of..., well, all kinds of stuff, is better than debugging the code and stepping into just the functions that he's not sure about?
Regards,
Alvaro
All you need in this life is ignorance and confidence, and then success is sure. -- Mark Twain
|
|
|
|
|
I meant I think it would be quicker to look at the source for CFormView::OnInitialUpdate() and its base classes versions than deciphering what is going on in the debugger. That's what I would do, at least to begin with.
In ED (see sig) I have all of the VC++ CRT and MFC source code included as a project in my workspace, so a simple right click on a function, gets me to the relevant source code, instantly.
Neville Franks, Author of ED for Windows. www.getsoft.com
Make money with our new Affilate program
|
|
|
|
|
hi everyone,
I'm sending a buffer of data between two programs using sockets and the error i get is:
"A message sent on a datagram socket was larger than the internal message buffer or some other network limit, or the buffer used to receive a datagram into was smaller than the datagram itself"
I have verified that the latter is not true, so is there any way of increasing the internal message buffer? If not can anyone recommend something?
Thanks alot
|
|
|
|
|
You can also split your buffer and send them step by step.
A. Riazi
|
|
|
|
|
Hi,
If u are using TCP connection the size is limited to 1480 bytes and similarly UDP buff size is fixed (don't remember exactly). So, it is always better to split buffer and send them.
|
|
|
|
|
i'm trickering a thread from another thread, from the old thread i give the SOCKET towards the new thread as a parameter. in the new thread i make a connection with a class for the functions of the thread, now i'm able to send data from my thread to my class, but i have no idear how to send a command from my class toward an other thread(to send data to de client SOCKET). so, how can i send data from the Class towards my Thread(to send the data to another computer)??
<br />
Server Thread ==> Client Thread(receive data) ==> Class CConnection<br />
Class CConnection ==> Client Thread(send data)<br />
<br />
Server Thread: UINT ServerThread(LPVOID Param<small>((LPVOID)this)</small>)<br />
Client Thread: UINT ClientThreadRecv(LPVOID Client<small>(socket)</small>)<br />
Client Thread: UINT ClientThreadSend(LPVOID Client<small>(socket)</small>)
|
|
|
|
|
Use PostThreadMessage in your class to post a message to your thread and GetMessage in your thread to get message posted by class.
A. Riazi
|
|
|
|
|
Hi world...
I wondered how a program (or a DLL) created by a company can send a bugs report remotely (for example by email)?
I want to do that...
Can somebody direct me towards the best solution?
Thanks in advance...
... Union makes force!
Hello World!!!
from Raphaël
|
|
|
|
|
1. Sockets. Socket server must be running and open to internet.
2. FTP. Dump an error report file into predefined directory on your company’s FTP side.
3. HTTP (with SOAP or without). In simple terms just invoke some WEB page on your company's server
|
|
|
|
|
You can find related article on CP.
A. Riazi
|
|
|
|
|
|
Or maybe a little bit more work by the original poster. People need to learn how to search for answers on their own.
Tim Smith
I'm going to patent thought. I have yet to see any prior art.
|
|
|
|
|
Tim Smith wrote:
Or maybe a little bit more work by the original poster. People need to learn how to search for answers on their own.
Amen
Neville Franks, Author of ED for Windows. www.getsoft.com
Make money with our new Affilate program
|
|
|
|
|
Yup, too.
Holy Sh*t! I'm speechless. (hey, that's a first) Marc Clifton, The Lounge
|
|
|
|
|
I am in the midst of developing an application that I'd like to be able to minimize to the system tray. I understand how to add an icon to the System Tray, and I understand how to make a window's button disappear from the task bar. What I don't understand is how to both remove the status bar button and show the icon when the window is minimized.
Is there an appropriate OnMinimize() method for CWnd? Maybe I'm just thinking too hard about this, but I cannot see how one can tie the minimize action to the two things I want to do. Any ideas?
Jonah Bishop
Visit JGB Productions
|
|
|
|
|
Do you mean Task bar button or Status bar button?
A. Riazi
|
|
|
|