Sir
I have added a menu item in system menu and using c++ code using jni and i want to show a dialog box on the click of that menu My code is as follows
DLL Code-
JNIEXPORT void JNICALL Java_native1_NativeAdd_add
(JNIEnv *env, jclass cls)
{
hwnd=FindWindowA(NULL,(LPCSTR)"Anand");
a=(int)hwnd;
printf("a=%d",a);
HMENU sysmenu= ::GetSystemMenu(hwnd,false);
if(sysmenu)
{
::InsertMenuA(sysmenu,7,MF_BYPOSITION | MF_STRING,1001,"About ...");
}
}
I used the following function in c++ dll but it is not worrking any more if any one can help me then please give me the solution asap
Thanks in advance...
LRESULT CALLBACK WindowProcedure (HWND hwnd,
unsigned int uiMsg,
WPARAM wParam,
LPARAM lParam)
{
printf("inside window");
switch (uiMsg)
{
case WM_SYSCOMMAND:
flag=true;
printf("%d",flag);
break;
case WM_KEYDOWN:
switch (LOWORD (wParam))
{
case VK_RETURN:
break;
case VK_TAB:
printf("sir");
break;
case 1001:
flag=true;
break;
}
break;
}
return DefWindowProc (hwnd, uiMsg, wParam, lParam);
}