After I add a progess bar on the dialogue box, I added code:
in OnInitDialog(), and m_progress1.SetPos(mmtt);
in the Next(). WHen I tried to run the program, the blue blocks representing the progress can not be seen in the progress bar. In other words, the progress bar is only an empty rectangular grew box when I run the program until finish.
Are you aware that if you have a lenghty operation in the main thread, UI messages won't be processed until the task is finished ? This means that the UI won't be redrawn and you won't be able to see any progress in the bar until the end of the task (in which case, all messages are processed at once and the progress is full).
A better approach would be to run your lenghty task in a separate thread. I really recommand reading this excellent article[^] about threading.
I need a SDI with MFC in windows sever 2003,vs2005,the CPU is Core 2 Q8200.
I create a SDI with MFC, it can run.
for I need large memory , then I set the configuration x64.
compling error, "MD/switch" off.I set on this switch.
now fatal linking error 1561: entry point need define.
but "theApp" object indeed exist.
(I have a not SDI code in VC,it can run when I set the configuration x64.)
Please teach me.
I'm trying to enable my ARM development board to communicate with a PC. I can establish a connection and send data from the PC to the micro without any issues. When I try to send data from the micro to the PC, however, my socket doesn't respond to the data. A network analyzer shows that the packet was sent and formated properly. I have tried both TCP and UDP with the same results. Has anyone come across this before?
If the TCP handshake is successful, you are actually sending packages from the microcontroller to the PC. This lets me wonder if the error you see is on application level, perhaps your socket code is not working properly, could be both client or server side. In the code snippet you provided there is no connect or bind/listen call, so I would not expect the socket to change status.
1) Have you tried connecting to your PC socket application from another PC (or via loopback)?
2) What error code do you get when connecting from microcontroller to PC? Timeout or something else?
3) Have you checked with Wireshark that TCP handshake is fine and packages are properly ACKed?
4) Which TCP stack are you using on the micocontroller (ARM SDK)? Could the problem not be Winsock at all?
In ARM processor, which BSP r u using? how r u receiving Data? U TCP stack implemented? If u have stack implementation, there should not be problem in sending. If u dont have stack implementation, u have to assemble the packet in the TCP/IP struct and have to send it.
I'm not using any BSP and I implemented the TCP stack myself. I am able to establish communication via the 3-way handshaking process and then I assemble the package and send it. I used Wireshark to trap the packets between the PC and the micro and it recognizes it as a valid TCP/IP packet so I'm assuming it's formated properly.