Click here to Skip to main content
15,917,177 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralITOA Pin
12-Jun-01 3:33
suss12-Jun-01 3:33 
GeneralRe: ITOA Pin
Michael P Butler12-Jun-01 3:42
Michael P Butler12-Jun-01 3:42 
GeneralRe: ITOA Pin
Tomasz Sowinski12-Jun-01 4:17
Tomasz Sowinski12-Jun-01 4:17 
GeneralRe: ITOA Pin
12-Jun-01 7:51
suss12-Jun-01 7:51 
Generalie automation/printing in nt service without mfc Pin
sammy calma12-Jun-01 3:03
sammy calma12-Jun-01 3:03 
GeneralLoading a BMP to FullScreen & disabling keys Pin
Adeel Shamsi12-Jun-01 1:06
Adeel Shamsi12-Jun-01 1:06 
GeneralRe: Loading a BMP to FullScreen & disabling keys Pin
Jason Teagle12-Jun-01 4:45
Jason Teagle12-Jun-01 4:45 
GeneralRe: Loading a BMP to FullScreen & disabling keys Pin
Adeel Shamsi13-Jun-01 23:44
Adeel Shamsi13-Jun-01 23:44 
I just able to diable the keys WM_SYSKEYDOWN/UP didn't work.

Below is the code for others Smile | :)

Disable the keys on app startup:

BOOL CTest1Dlg::OnInitDialog()
{
// My Code Start Here

m_nHotKeyID_1 = 100;
m_nHotKeyID_2 = 200;

BOOL m_isKeyRegistered_1 = RegisterHotKey(GetSafeHwnd(),
m_nHotKeyID_1,
MOD_ALT,
VK_SNAPSHOT );

BOOL m_isKeyRegistered_2 = RegisterHotKey(GetSafeHwnd(),
m_nHotKeyID_2,
NULL,
VK_SNAPSHOT );


ASSERT( ( m_isKeyRegistered_1 != FALSE ) ||
( m_isKeyRegistered_2 != FALSE ) );

// My Code End Here
}


Enabling the keys on app end:

void CTest1Dlg::OnDestroy()
{
CDialog::OnDestroy();

// TODO: Add your message handler code here

// My Code Start Here

BOOL m_isKeyUnregistered_1 = UnregisterHotKey(GetSafeHwnd(),
m_nHotKeyID_1);

BOOL m_isKeyUnregistered_2 = UnregisterHotKey(GetSafeHwnd(),
m_nHotKeyID_2);

ASSERT( (m_isKeyUnregistered_1 != FALSE) ||
(m_isKeyUnregistered_2 != FALSE) );

// My Code End Here
}


Adeel Shamsi
adeelj@iname.com
GeneralRe: Loading a BMP to FullScreen & disabling keys Pin
Jason Teagle13-Jun-01 23:48
Jason Teagle13-Jun-01 23:48 
Generalvisual c++ 7 Pin
11-Jun-01 23:52
suss11-Jun-01 23:52 
GeneralRe: visual c++ 7 Pin
Michael P Butler12-Jun-01 0:04
Michael P Butler12-Jun-01 0:04 
GeneralRe: visual c++ 7 Pin
Derek Lakin12-Jun-01 0:05
Derek Lakin12-Jun-01 0:05 
GeneralTrackMouseEvent question Pin
11-Jun-01 21:44
suss11-Jun-01 21:44 
General2 Pin
11-Jun-01 21:44
suss11-Jun-01 21:44 
QuestionSetting wide message system hook? Pin
11-Jun-01 21:13
suss11-Jun-01 21:13 
AnswerRe: Setting wide message system hook? Pin
Igor Sukhov12-Jun-01 3:14
Igor Sukhov12-Jun-01 3:14 
AnswerRe: Setting wide message system hook? Pin
Jason Teagle12-Jun-01 4:56
Jason Teagle12-Jun-01 4:56 
GeneralDon't include header files. Pin
hahyojin11-Jun-01 19:17
hahyojin11-Jun-01 19:17 
Generalplease translate ;) Re: Don't include header files. Pin
Igor Sukhov11-Jun-01 23:02
Igor Sukhov11-Jun-01 23:02 
Generalwe all <i><b>love</b></i> an inheritance question! Pin
Nick Blumhardt11-Jun-01 17:37
Nick Blumhardt11-Jun-01 17:37 
GeneralRe: we all <i><b>love</b></i> an inheritance question! Pin
Gerald Schwab11-Jun-01 17:58
Gerald Schwab11-Jun-01 17:58 
GeneralRe: we all <i><b>love</b></i> an inheritance question! Pin
Nick Blumhardt11-Jun-01 19:06
Nick Blumhardt11-Jun-01 19:06 
GeneralRe: we all <i><b>love</b></i> an inheritance question! Pin
Ben Burnett11-Jun-01 19:21
Ben Burnett11-Jun-01 19:21 
GeneralRe: we all <i><b>love</b></i> an inheritance question! Pin
Gert Boddaert11-Jun-01 21:38
Gert Boddaert11-Jun-01 21:38 
GeneralRe: we all <i><b>love</b></i> an inheritance question! Pin
Nick Blumhardt12-Jun-01 13:21
Nick Blumhardt12-Jun-01 13:21 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.