Memwatcher - show Options Dialog

Hello all,

I am playing since a couple of days with this sample: Memwatcher (today item on Windows Mobile 6).

Source code of memwatcher.cpp can be seen here:

http://read.pudn.com/downloads76/sourcecode/embed/288698/Memwatcher/memwatcher.cpp__.htm


At line 166:
1
2
3
case WM_LBUTTONUP: 
MessageBox(NULL, TEXT("Detected Screen Tap!"), TEXT("StorageCheck Today Item:"), MB_OK);
break;


I want to open the Options Dialog instead. At line 400 starts the ProcessHandler of this dialog.

I was trying these:

DialogBox(g_hInst, MAKEINTRESOURCE(IDD_TODAY_CUSTOM), g_hWnd, (DLGPROC)DialogProc);

for witch I created another DialogProc, because the actual CustomItemOptionsDlgProc looks something differently.
The Dialog is showing, but when trying to close it gives error and must restart the Mobile.

I was trying also:

1
2
3
HWND hDlg;
hDlg = CreateDialog(g_hInst, MAKEINTRESOURCE(IDD_TODAY_CUSTOM), g_hWnd, (DLGPROC)DialogProc); 
ShowWindow(hDlg, SW_SHOW);


But almost same effect, not modal, still restarting.

My question is how to show the options window of a today item, when I click on the today item?

Does anybody know if in this book explains more about this fenomen?
Nitty Gritty Windows Programming with C++ by Henning Hansen. (http://www.amazon.com/exec/obidos/ASIN/0201758814/rickstromonli-20)

or in this:
http://www.amazon.com/Programming-Windows%C2%AE-Edition-Microsoft-Series/dp/157231995X/ref=pd_sim_sbs_b_2/182-9646224-1455565


Thank you!
Ionut

PS: I was coding in C++ using C++ Builder aprox. 10 years before. At that time were few UNICODE stuff. And now... I merely do not understand the code anymore. So many new types (wchar, wchar_t, TCHAR, LPTSTR...) and all functions for the strings of that time, where are these now? How can I add 2 String nowadays? This is for me still awkward.
Last edited on
Topic archived. No new replies allowed.