Log in

View Full Version : My code that uses HTML Control in PPC 2003 no longer grabs the string from szData in WM5


kyue
12-19-2006, 05:19 PM
Hello,

I'm currently confused with a problem that I'm having with WM 5.0. I
have an application that uses an HTML control inside a Dialog box. My
HTML page is a form with <textarea>, radio buttons and drop down menus
for the user to select. What I am trying to do is grab the data from
the HTML page. I'm using the struct NM_HTMLVIEWA to pull the query
data in szData, but szData returns an empty string. The struct also
has another variable called szTarget, and there's always something in
there. The odd thing is that this application works (ie. szData is not
empty) in Pocket PC 2003, but not in WM5. I've encountered this
problem before and it was because WM_NOTIFY receives the message in
ANSI form. So using NM_HTMLVIEW of NM_HTMLVIEWW will only produce
gibberish. I've tried all the different encodings on WM5 with no
success.

So I'm not sure is there is a difference in the HTML Control between
PPC 2003 and WM5?

Unfortunately, I only have eVC++ 4.0 so the only way I'm debugging is
using ASSERT statements and Message Boxes.

If anyone has any ideas why this may be, I would really appreciate it!

Kathy

kyue
12-21-2006, 06:35 PM
Hello,

For those who have the same problem as I did...

I found the cause of my problem. The reason why I wasn't get data back from szData was because I was trying to catch the string in NM_BEFORENAVIGATE. This works well in WinCE 4.2, but not in WM 5.0. In WM5, the string is found in NM_HOTSPOT instead, which is what the documentation on MSDN hints to. But then again, descriptions for both NM_BEFORENAVIGATE and NM_HOTSPOT are quite similar so I wasn't sure if there was a difference between the two. It still puzzles me why there is a difference in notification messages, perhaps this mystery will reveal itself one day...

Hope this helps!

Kathy