Printing aside, you need to first verify that the tree is being built correctly. The only way to do that is to single step through each line of code (the stree() function) using the debugger. Note the values of info, left, and right along the way. As you build the tree on paper, what you see in the debugger should match.
Are you trying to print the tree contents pre-order, in-order, or post-order?
"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
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
It's simply a means to provide values for the arguments that will be a good default (or starting point).
For example, if let's say... you're opening a socket to provide some service. By default, most libraries will bind to any (or every) Ethernet address available on a system. Reason you'd want to do this is because you don't necessarily want to only provide the service on one Ethernet device but not the other (for example, servers have multiple Eth devices for load balancing). If however, you do only want the service to be provided on one device, then you can choose to bind to the specific Eth address of interest.
I've used SendMessageW API to direct an EM_SETSEL message to
a designated Edit control to make it locates the searched text
entered from the another Edit control. Why it doesn't provide
visual feedback to reflect its current state?
I used Spy++ to detect the EM_SETSEL message and the message
was correctly listed in the message window.
Can anyone give suggestion?
My current development tool is MSVS Community 2015, project type is Win32 that merely uses A.P.I.
I have just tried this (with VS 2010 Express) and it selects and highlights the text correctly. Can you show the exact code you are using?
As a suggestion, do not use the A or W suffixes on Windows API calls. Use the base name, without the suffix, and let the compiler generate the correct call based on your projrct's Unicode/ASCII setting.
As per Richard said debug the dam thing because there is something wrong with a value and you are asking us to guess what.
However something obvious to me which you have not explained you have two different string pointers in the above lpWStr1 and lpWstr0 and since there is something wrong with selPos or selEnd which you haven't debugged is this related as no explaination of these???
the actual value of selPos and selEnd just represent as what they are, both contained int value that denoted character index. To hwndEdit, the return value of GetWindowTextLengthW just not false ( other values than 0 ).
Last Visit: 31-Dec-99 19:00 Last Update: 26-Feb-21 3:23