Get rid of W->A calls

hatky hatkyinc at yahoo.com
Fri Sep 5 11:30:40 CDT 2003


> Because I'm a lousy teacher :) Also, it is more
> productive
> to start with simpler examples, so you also do part
> of the
> learning from experience.
grr.....

Ok, lets take another one, winhelp.c WinHelpW->A

I take whatever is in WinHelpA and move it into
WinHelpW with the fallowing changes:

-BOOL WINAPI WinHelpW( HWND hWnd, LPCWSTR helpFile,
UINT command, ULONG_PTR dwData )
+BOOL WINAPI WinHelpW( HWND hWnd, LPCWSTR helpFile,
UINT wcommand, ULONG_PTR dwData )

why did they call them wcommand in WinHelpA and
command in WinHelpW ?? (msdn calls them uCommand but
the code uses wcommand...)

-hDest = FindWindowA("MS_WINHELP", NULL);
+hDest = FindWindowW("MS_WINHELP", NULL);

-        if (!(hDest = FindWindowA("MS_WINHELP",
NULL)))
+        if (!(hDest = FindWindowW("MS_WINHELP",
NULL)))

-    return SendMessageA(hDest, WM_COPYDATA,
(WPARAM)hWnd, (LPARAM)&cds);
+    return SendMessageW(hDest, WM_COPYDATA,
(WPARAM)hWnd, (LPARAM)&cds);

and now I need to put a call in WinHelpA to WinHelpW
after converting 
LPCSTR lpHelpFile
?

variables are
    HWND hWndMain,
-- window handler
    LPCTSTR lpszHelp, --in A
    LPCWSTR lpszHelp, --in W
-- file path + posible topic
    UINT uCommand,
-- Type of help requested. 
    ULONG_PTR dwData
--Additional data. either pointers or 0


Hatky.

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com



More information about the wine-devel mailing list