2 questions
-
Hello! I have 2 problems. 1) I have a context menu that are created within a program. The problem is that I can't access it through the contextmenu button on a keyboard. Is it possible to do that with a dynamic menu that is created in MainFrm? 2) How do I find the local administrator acounts from a program? We have an option in wich you can add UID and PW to the program to restrict its use. I would like it to always be accesible from the administrator account on the löocal computor. In other words I would like the program to automatically add the Admin acount. /Martin
-
Hello! I have 2 problems. 1) I have a context menu that are created within a program. The problem is that I can't access it through the contextmenu button on a keyboard. Is it possible to do that with a dynamic menu that is created in MainFrm? 2) How do I find the local administrator acounts from a program? We have an option in wich you can add UID and PW to the program to restrict its use. I would like it to always be accesible from the administrator account on the löocal computor. In other words I would like the program to automatically add the Admin acount. /Martin
- react on the WM_CONTEXTMENU message, or use the WM_RBUTTONUP message. 2) get the token and ::CheckTokenMembership(). Or use the lately documented IsUserAdmin() [or so], look up on MSDN.
I don't think this is a serious possesion, and the evil most likely comes from your hand. Colin J Davies, The Lounge
-
- react on the WM_CONTEXTMENU message, or use the WM_RBUTTONUP message. 2) get the token and ::CheckTokenMembership(). Or use the lately documented IsUserAdmin() [or so], look up on MSDN.
I don't think this is a serious possesion, and the evil most likely comes from your hand. Colin J Davies, The Lounge
The WM_CONTEXTMENU and WM_RBUTTONUP messages only respond to the mouse and I need it to respond to the context menu button on your keayboard. Anyways I found WM_KEYDOWN adn WM_CHAR to do that for me. CheckTokenMembership() only lets me check if the current user is an administrator. IsUserAdmin is a method on MSDN that does just that. I need to get the Administrator acount. Maby that is not possible... /Martin