|
Thank you very much! it worked and I just couldn't see that....
|
|
|
|
|
See my answer if you have some question as to why his code wasn't working.
|
|
|
|
|
There's two ways to send messages in windows (not including PostMessage() ):
Using the WinAPI[^]
OR
Using MFC[^]
Each one can do pretty much the same thing. In your posted code, you're using the MFC version, but since you're calling the method internal to CDialogMsg , you're posting the message to that specific CDialogMsg object (you have him sending that message to himself), not to any CInvisibleWnd object.
How can you specify to send it elsewhere?
pWnd->SendMessage(...);
SendMessage( pWnd->GetSafeHwnd(), ...);
On a related note, you probably shouldn't name your messages with the "WM_" preffix, as that's there to indicate its an internal windows framework message.
|
|
|
|
|
Hi Developers,
Can anybody help me for a sample application of list control( Report View ) in MFC.
Actually I was handling a employee table. I want to show it's records in list control.
Thanks in Advance
|
|
|
|
|
|
Amrit Agr wrote: Can anybody help me for a sample application of list control( Report View ) in MFC.
See here.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Some people are making such thorough preparation for rainy days that they aren't enjoying today's sunshine." - William Feather
|
|
|
|
|
Hi Developers,
Suppose there is one text file in which I have stored database of Employee table like this:
EmpID EmpName Age Designation
101; Amrit; 23; Software Developer;
102; Ganesh; 25; Software Developer;
I want to take these record ( field by field ) based on these delimeter which is ;
Pls help me out to do that.
Thanks in advance.
|
|
|
|
|
Use string::getline to read the file line by line in a loop.
For each line read use the tokenize functions like strtok_s or wcstok_s with ; as the separator.
|
|
|
|
|
«_Superman_» wrote: For each line read use the tokenize functions like strtok_s or wcstok_s with ; as the separator.
Why not string::find_first_not_of ?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Well, why not?
In this case that will work since it is a single separator.
|
|
|
|
|
Yeap Thanks,
CString::Tokenize works better if we are getting the text in CSTring object, as I was using CStdioFile::readString().
|
|
|
|
|
This is a good answer, but I think it's interesting to mention that when dealing with large files, reading line-by-line will make this a very slow process.
Reading the file or a large part of it into memory and then scanning that would speed it up.
modified 13-Sep-18 21:01pm.
|
|
|
|
|
That is true, but Windows also does this for you by pre-fetching from disk to memory.
So even if you do this, the performance improvement may not be so great.
But you never know.
|
|
|
|
|
See the section titled "A string tokenizer" here.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Some people are making such thorough preparation for rainy days that they aren't enjoying today's sunshine." - William Feather
|
|
|
|
|
i have a project depend on converting mathematical C formula to mathematical formula used in calcualtors
for example
pow(x , 2 ) .....>x^2
the same as roots and all expreesions
which topics i must search ? must i search for tex and latex and MathML ?
help please
thnx in advance
|
|
|
|
|
You may try yourself to build a parser for.
What has it to do with TeX (i.e. formula used in calculators are pretty different by formula produced by TeX)?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
i cannot understand from where i must begin and what topics exactly i must know
|
|
|
|
|
Is that homework (I mean do you need to write yourself the 'expression parser' or you may use a tool)?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
it's part of project i need write expreesion parser
|
|
|
|
|
The you may use a tool, like, for instance, Boost Spirit[^] or ANTLR[^] or the oldie-goldie bison[^]-flex[^] pair.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
|
You are welcome.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Hi All,
Where I can get the free ebook
Inside COM by dale rogerson
|
|
|
|
|
It's not free, as far as I know.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Yes , there is NO e-book available for download.
|
|
|
|