|
I just followed the same format as all the other ON_COMMAND declarations. I tried runnig the program without the ampersand and I still get the same problem.
|
|
|
|
|
void CMainFrame::Scroll()
{
CDC *pDC = this->GetActiveView()->GetDC();
You may be right
I may be crazy
But it just may be a lunatic you’re looking for
-- Billy Joel --
Within you lies the power for good - Use it!
|
|
|
|
|
I have created my own class CThread inherited from CWinThread,
I am Starting Threads using
for loop begin
AfxBeginThread(RUNTIME_CLASS(CThread));
for loop ends
I have created 15 thread in a loop, will they run parallely or with the time slice scheduling, Actualy I want that they should run parralelly , so that i can write in 15 different file simaltinoiusly.
I want to work fast on these threads.
Regards.
|
|
|
|
|
zahid_ash wrote: ...I have created 15 thread in a loop, will they run parallely or with the time slice scheduling...
They will never run in parallel on a uniprocessor machine.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
Is there any technique to write in the in the different file parallely or read from them .
i want to shorten the read write time
Regards.
|
|
|
|
|
|
I think so, as long as the read and write operations are not happening at the exact spot in the file. See LockFile() for more.
zahid_ash wrote: i want to shorten the read write time
Well, creating a bunch of threads on a uniprocessor machine is one way to not "shorten the read write time." The overhead of context-switching between all of the threads will be your demise.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
Will they run parallely on multi processor machine.
How can i demise the context switching of thread,
Regards.
|
|
|
|
|
zahid_ash wrote: Will they run parallely on multi processor machine.
Yes, but I've no experience with this. I think SetThreadIdealProcessor() will be required.
zahid_ash wrote: How can i demise the context switching of thread,
I'm not sure exactly what it is that you are asking here, but I think the answer is, "When more than one thread is involved, the processosr will need to periodically switch between them so that at any given monent, only one thread is actually active." This obviously incurs overhead that cannot be avoided.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
Hi!
DOes anybody know, what I have to do, if I want either to create an new .XML-File or open an existing .XML-File to write at the beginning of this file?
I thought, that I can handle this like a normal text-file but that has been a mistake.
So, if anybody knows something about this, please let me know!
Thanks, Hanno
|
|
|
|
|
Use IXMLDocument or DOMDocument .
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
Thanks for your help. Could you send a small piece of code, explaning this a little bit?
With best regards, Hanno
|
|
|
|
|
Why not just Google for those two interfaces? Also try CodeProject articles, and MSDN.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
If you want a light-weight XML library (i.e. not MSXML), have a look at http://tinyxml.sourceforge.net/[^].
I used TinyXML in several projects, it works pretty well.
Best regards
Dominik
_outp(0x64, 0xAD);
and
__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do??
(doesn't work on NT)
|
|
|
|
|
Whats the symbol to put to stdin to finish its reading
//console app reading in a loop until that magic symbol
while(res)
res = fscanf(stdin,"%s",&str);
//while pressing in console
string1
string2
string3
??? how to quit it
9ine
|
|
|
|
|
Use F6 or Ctrl-Z.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
whats the code for that combination ctrl-z? \r \n \t ... ?
9ine
|
|
|
|
|
If you are typing at a command prompt (which is what I inferred from your "while pressing in console" comment), \r \n \t are meaningless. What exactly are you trying to do?
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
I'm not going to type numbers and then pressing F6, I need to write to console application stdin so it will read it like fscanf(stdin, ... ) or whatever the method until that character F6 encountered
9ine
|
|
|
|
|
Ok, let me see if I can put the pieces together. You have a Windows application that is going to spawn a console application. Right so far? The console applicaton is going to be reading from stdin , so you need to populate that stream from within the Windows application. Correct?
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
Exactly! and send that stream of floating numbers prepared as char strings array of course to console input so it will be reading it until F6 encountered.
9ine
|
|
|
|
|
|
CTRL Z is ASCII 26, you can enter it in your text literals using the octal notation \032
You may be right
I may be crazy
But it just may be a lunatic you’re looking for
-- Billy Joel --
Within you lies the power for good - Use it!
|
|
|
|
|
Isn't the onSize() event supposed to fire when you resize a CDialog?
void CDlgMap0::OnSize(UINT nType, int cx, int cy)
{
MakePE();
CDialog::OnSize(nType, cx, cy);
}
In my case the execution never steps into the function.
I have in the .h file, where I added it by hand
protected:
afx_msg void OnSize(UINT nType, int cx, int cy);
DECLARE_MESSAGE_MAP()
thanks,
sb
|
|
|
|
|
ns wrote:
In my case the execution never steps into the function.
How do you know?
What does CDlgMap0 's BEGIN_MESSAGE_MAP() method look like?
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|