help, a question about atl
-
How can I decide whether the control is in design mode or not. I mean whether it's in an IDE such as VB and is being dragged and dropped, but not running as part of an application.
Not sure if this will work or not - give it a go - add the following to your control class: BOOL IsUserMode() { BOOL bUserMode = TRUE; HRESULT hRet = GetAmbientUserMode(bUserMode); if (FAILED(hRet) || bUserMode) { return TRUE; } return FALSE; } If the control is in design mode, then the above returns FALSE ... I think ... :)
Faith. Believing in something you *know* isn't true.
-
Not sure if this will work or not - give it a go - add the following to your control class: BOOL IsUserMode() { BOOL bUserMode = TRUE; HRESULT hRet = GetAmbientUserMode(bUserMode); if (FAILED(hRet) || bUserMode) { return TRUE; } return FALSE; } If the control is in design mode, then the above returns FALSE ... I think ... :)
Faith. Believing in something you *know* isn't true.