|
Maxwell Chen wrote: Chinese is still left-to-right.
Just a ?, isn't Chinese written top to bottom?
"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
|
|
|
|
|
ThatsAlok wrote: Just a ?, isn't Chinese written top to bottom?
1) Hand-writing:
Ancient Chinese people wrote articles in these manners:
A) Right-to-Left, and
B) Top-to-Bottom.
2) The computer age:
Since the computer invented and for internationalization, currently these manners are preferred:
A) Left-to-Right, and
B) Top-to-Bottom.
Now you are curious how to do typing in the way Top-to-Bottom ... It's just a view issue. Microsoft Word can switch to this mode by rotating the view 90 degree to present Top-to-Bottom.
Maxwell Chen
|
|
|
|
|
Maxwell Chen wrote: w you are curious how to do typing in the way Top-to-Bottom ... It's just a view issue. Microsoft Word can switch to this mode by rotating the view 90 degree to present Top-to-Bottom.
That’s we called a good explanation! Thanks for it
"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
|
|
|
|
|
It's a really good explanation!
Thank u so much.
|
|
|
|
|
Hi,
the MFC application i'm building uses GDI+ to draw the background (this is double buffered using a cached bitmap). I have some controls (mainly buttons) i draw on the view (it's an MDI application).
I know it's possible to prevent the controls from flickering by setting the style of the view to WS_CLIPCHILDREN but this does not work when the control has a transparent background (which some controls have). Is there a way to prevent the flickering without using WS_CLIPCHILDREN so my controls still have a transparent background.
Thanks in advance!
|
|
|
|
|
I went windowless for my controls in views and it allows me to do all my drawing in the same offscreen buffer. It works pretty good but it's slightly more work if your not using ActiveX controls.
|
|
|
|
|
Hi,
How to execute DOS commands in MFC. I use WinExec() to use COPY commands.
It works fine to copy files to local directory/system. But it fails to copy file to another PC in the network.
WinExec("cmd /c copy Prints.txt \\avon\Prints",SW_SHOW);
\\avon is the network PC with shared folder Prints
This commands works filke from DOS prompt but not from MFC..Pls help
Ram
|
|
|
|
|
Try using ShellExecute (or ShellExecuteEx)
Russell
|
|
|
|
|
Thanks for reply.Can you pls give me an example?
|
|
|
|
|
If the DOS command that you wrote was working,... then you can use something like:
ShellExecute(NULL, "cmd.exe", "/c copy Prints.txt \\avon\Prints");
(WinExec is an old function, and it is possible that it isn't a good interface between your app and DOS)
Russell
|
|
|
|
|
What is wrong with CopyFile , or CFile::Copy ? Why going to DOS if using MFC ?
~RaGE();
|
|
|
|
|
cberam wrote: \\avon\Prints
Try \\\\avon\\Prints
|
|
|
|
|
cberam wrote: How to execute DOS commands in MFC. I use WinExec() to use COPY commands.
It works fine to copy files to local directory/system. But it fails to copy file to another PC in the network.
WinExec("cmd /c copy Prints.txt \\avon\Prints",SW_SHOW);
\\avon is the network PC with shared folder Prints
Have a try with system API
system("copy c:\\test.txt \\\\Test\\mydata");
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
Most DOS commands have a Win32 API equivalent (e.g., CopyFile() ). Use that instead.
"The largest fire starts but with the smallest spark." - David Crow
|
|
|
|
|
cberam wrote: It works fine to copy files to local directory/system. But it fails to copy file to another PC in the network.
What about using Direct CopyFile api!
"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
|
|
|
|
|
Hi
Program crashing before create:
m_pListenSock = new CSock();
m_pListenSock->Create(200); // Before this statment ( Eror is access violation)
CSock() is a class inherited form CSocket class
Regards.
|
|
|
|
|
You don't provide any relevant information. Use the debugger to locate the problem more precisely. You can also use the call stack to see what causes the problem.
Where does it crash ? In the contructor of CSock or when calling the Create method ?
Cédric Moonen
Software developer
Charting control
|
|
|
|
|
It crashes while calling create method
Regards.
|
|
|
|
|
zahid_ash wrote: It crashes while calling create method
What is the value of m_pListenSock ?
Where exactly does it crash (use the debugger to find the exact instruction). If it's really on the call of Create, then it means that m_pListenSock is invalid.
Alos, what is the exact error message you get. Man, you have to provide more information when asking for help. And learn to use the tools like a debugger, it is much more helpfull than a forum.
Cédric Moonen
Software developer
Charting control
|
|
|
|
|
Would it be because If the Port creation is blocked by administrator on the system?
If it is becuase of admin rights , then how can i create the port ?
Regards.
|
|
|
|
|
Please provide more information ! And USE your debugger instead of trying to guess what the problem is. The only way to be sure of the problem is by debugging your code. If you know how to use it, your debugger will give you much more information that anybody here can give you.
Cédric Moonen
Software developer
Charting control
|
|
|
|
|
error is Cx0000005 Access violation
Regards.
|
|
|
|
|
Put a break point before this lines:
m_pListenSock = new CSock();<br />
m_pListenSock->Create(200);
And then press F11 (or F10) to step the program and find why comes the error.
Probally it depends on a bad initialization in the constructor (CSock() ), or in some strange operation in Create that uses an unitialized pointer.
Russell
|
|
|
|
|
CSock * m_ListenSock;
m_pListenSock is the memeber of CSock class that is inherited from CSocket class.
nothing is done in CSock() constructor.
then steps are CServerHandler class that is inherited from CWinThread class
m_pListenSock = new CSock();
upto this step all is fine
it crashes at
m_pListenSock->Create(200);
and says access violation
Regards.
|
|
|
|
|
zahid_ash wrote: it crashes at
m_pListenSock->Create(200);
and says access violation
So step into the Create() method to narrow down the problem.
"The largest fire starts but with the smallest spark." - David Crow
|
|
|
|