|
Check to make sure that the IDC_ numbers aren't messed up in the resource file. If they're somehow the same, that would cause this behavior you're seeing.
|
|
|
|
|
I'm not 100% sure but I strongly suspect this is caused by changes to the message map macros.
Check out BEGIN_MESSAGE_MAP etc. in:
C:\Program Files\Microsoft Visual Studio\VC98\MFC\Include\AFXWIN.H
and compare with:
C:\Program Files\Microsoft Visual Studio 10.0\VC\atlmfc\include\afxwin.h
|
|
|
|
|
It just occurred to me that if they changed how the macros generate the map tables, there'd be corresponding changes to the RTL to support it. So make sure the project conversion didn't leave some old libraries that you link with. You might have an explicit link in the project that should be updated for VS2010. Since you have both installed (I assume), you wouldn't get link errors but you'd see runtime oddities.
|
|
|
|
|
You may need to change whats being passed in the message map macros:
ON_BN_CLICKED(IDC_MYBUTTON, OnMyButton)
would become:
ON_BN_CLICKED(IDC_MYBUTTON, &CYourClass::OnMyButton)
If you vote me down, my score will only get lower
|
|
|
|
|
Ok ages ago in my conversion process I was trying to get rid of all the:
warning C4407: cast between different pointer to member representations, compiler may generate incorrect code
warnings from my dialog code. I added /vmg /vmv and forgot about it.
This caused all my function pointers in the dialog message maps to be 16 bytes long instead of 4, breaking everything while complaining about nothing!
|
|
|
|
|
wow, nice find. How'd you ever figure that out?
|
|
|
|
|
I replaced the BEGIN_MESSAGE_MAP macro with its expanded form and stepped through the population of the message map array. It was then easy to compare the (apparent) size of the AFX_MESSAGE_ENTRY structure with the amount of info being poked in at the memory location.
|
|
|
|
|
When we upgraded to VC10 from VC6 we did this exact same thing and everythng broke also.
If you vote me down, my score will only get lower
|
|
|
|
|
Hello Friends
I am reading a xml file(suppose A.xml) using MSXML::IXMLDOMDocumentPtr and all related classes of MSXML.
Now,I want to create another xml file with new data and want to replace with A.xml.
Both xml will be having same Nodes but their child nodes can be different.
Now,My question is
Is there any way that I can store all the data in DomDocumentPtr object and then replace with it existing xml file Dom Pointer?
Or do i need to create another xml on disc and then i have to replace one file with another file.
Which way i can achieve this?
Thanks and Regards
Yogesh sikri
|
|
|
|
|
XmlDocument::ImportNode does the job, It states and i quote:
"The ImportNode method is the mechanism by which a node or entire node subtree is copied from one XmlDocument to another. The node returned from the call is a copy of the node from the source document, including attribute values, the node name, node type, and all namespace-related attributes such as the prefix, local name, and namespace Uniform Resource Identifier (URI). The source document is not changed. "
more from MSDN..
Code from MSDN:
#using <System.Xml.dll>
using namespace System;
using namespace System::IO;
using namespace System::Xml;
int main()
{
XmlDocument^ doc = gcnew XmlDocument;
doc->LoadXml( "<bookstore><book genre='novel' ISBN='1-861001-57-5'><title>Pride And Prejudice</title></book></bookstore>" );
XmlDocument^ doc2 = gcnew XmlDocument;
doc2->Load( "books.xml" );
XmlNode^ newBook = doc->ImportNode( doc2->DocumentElement->LastChild, true );
doc->DocumentElement->AppendChild( newBook );
Console::WriteLine( "Display the modified XML..." );
doc->Save( Console::Out );
}
|
|
|
|
|
Hi all,
I want to learn embedded systems, and looking some reading materials which explain from the basic concepts. About PIC programming, designing simple circuit and so on.
I appreciate your help all the time...
CodingLover
|
|
|
|
|
This is the same guy who said "debugging is the oposite of programming".
My advice is to stop wasting our time with silly questions like this. If you had ANY intention of actually becoming an embedded programmer than you would already have books on the various processors used, ARM, Siemens etc and commonly used hardware such as PICs and FPGAs.
==============================
Nothing to say.
|
|
|
|
|
Erudite__Eric wrote: This is the same guy who said "debugging is the oposite of programming".
Yes I am.
Erudite__Eric wrote: My advice is to stop wasting our time with silly questions like this.
I wonder that this is the way experienced members in code project helping others. It may be silly question to you, but not for me. I have an interesting to learn embedded systems, and that is why I ask it openly. Since I have experienced in C/C++ a lot, I decide to plan something beyond that, yet relevant. That is why I ask my question in C/C++ forum too.
If you have any solution please let know. If not don't say anything to discourage others. If you really want to do that, show me the pros and cons I have.
I appreciate your help all the time...
CodingLover
|
|
|
|
|
Your question is too broad, too unfocused, not specific.
Your previous question about assembler, trying to turn a led on and off, what hardware were you running it on? Was it a test board, or some real bit of hardware you got hold of? How were you loading your code onto the hardware?
See what I mean?
If you want to learn embedded programming then get yourself some test/development hardware that you can practice on. Look on google. OSR used to do one I seem to recall.
==============================
Nothing to say.
|
|
|
|
|
Now I see your point. Sorry for the confusion.
May be that is because of I haven't much knowledge related with Embedded systems, pic and so on. So I have no clear picture in my mind about the stuff. You guys can guide me on to the relevant track. Basically I want to use my knowledge of C/C++ in hardware stuff, like PIC and so on. I have only my own interest, nothing to do with my job.
I appreciate your help all the time...
CodingLover
|
|
|
|
|
CodingLover wrote: If you have any solution please let know.
Solution to what? You say you want to learn programming on embedded systesms, PIC etc., have you tried the obvious starting point[^]?
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
Of course I tried mate. Already collect some stuff. But most of them are too complex to understand at once, because of the lack of knowledge on the basis.
I appreciate your help all the time...
CodingLover
|
|
|
|
|
This looks good:
http://www.quasarelectronics.com/3081-pic16f84a-introduction-to-pic-programming-tutorial.htm[^]
Now, if you dont order that straight away and start learning, we will never answer another question of yours.
--edit--
Actually, at £17 thats damn cheap, I might get one myself, always fancied doing a bit more embedded!
(I have been working in the Windows kernel for 13 years, mostly hardware related, but it could be fun to get right into the hardware. I also ought to learn the Linux kernel some time...)
|
|
|
|
|
That make sense to me too.
I already bought simple electronic components too, to familiarize with them. At the time I'll put an order on this too. Download a simple simulator and working on it too.
I appreciate your help all the time...
CodingLover
|
|
|
|
|
CodingLover wrote: But most of them are too complex to understand at once
So how do you think posting questions here will change that? The only way to learn is to study hard and practice. These forums are for technical questions not for "How can I learn X?".
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
Don't misinterpret the original question mate. I am asking about some reading materials where I can learn the basis on embedded systems and all. Not expecting any code or anything. So far I haven't make such a request on CP too.
I ask about the materials because people who has already refer them have a better understanding about the stuff.
I appreciate your help all the time...
CodingLover
|
|
|
|
|
CodingLover wrote: Don't misinterpret the original question mate.
I'm not (yet) your mate; that is a term of endearment reserved for my close friends only.
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
If you would like to learn about embedded programming and hardware development, start small.
1. Purchase a student kit from Microchip.
http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en539716&redirects=picdemlab
2. Read ALL of the information provided.
3. Familiarize yourself with the datasheet for the micro-controller you are using. It is your best friend.
4. Follow the examples closely.
5. Visit the forums to search for answers to your questions.
6. If after step 5 you are still unable to find the answers to your questions, ask for help online. People prefer to only help those that are willing to try to help themselves first.
|
|
|
|
|
UINT_PTR timer = SetTimer(1 , 1000 , NULL);
m_timeOut = FALSE;
while(!m_rxBufferRecivied && !m_timeOut)
{
}
KillTimer(timer);
.
.
.
void CMainFrame::OnTimer(UINT_PTR nIDEvent)
{
m_timeOut = TRUE;
}
In this code i wait in a while loop unil input buffer recieved.
Before the loop i set a timer to wait maximum 1 second so the program wont stack in a loop(in case there is error receving buffer).
If i remove the while loop timer callback function ONTimer works fine every second but with the loop the program stacks in a endless loop.
What am i doing wrong?
Thanks.
|
|
|
|
|
Your while() loop is not relinquishing control of the CPU. Inside of that loop, you're going to need to poll for messages.
"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
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
|
|
|
|