Click here to Skip to main content
15,914,795 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralSubmenu MF_GREYOUT and MF_ENABLE Pin
adonisv5-Jun-03 11:55
adonisv5-Jun-03 11:55 
GeneralRe: Submenu MF_GREYOUT and MF_ENABLE Pin
Michael Dunn5-Jun-03 15:01
sitebuilderMichael Dunn5-Jun-03 15:01 
GeneralRe: Submenu MF_GREYOUT and MF_ENABLE Pin
Toni785-Jun-03 21:34
Toni785-Jun-03 21:34 
GeneralUpdating Cut, Copy, Paste on toolbar Pin
Steven M Hunt5-Jun-03 10:53
Steven M Hunt5-Jun-03 10:53 
GeneralRe: Updating Cut, Copy, Paste on toolbar Pin
valikac5-Jun-03 12:56
valikac5-Jun-03 12:56 
GeneralC++ code for derivation and integration Pin
zakimurtaza5-Jun-03 9:14
zakimurtaza5-Jun-03 9:14 
GeneralRe: C++ code for derivation and integration Pin
Andrew Walker5-Jun-03 22:22
Andrew Walker5-Jun-03 22:22 
GeneralRemoving focus from button in dlg-based app Pin
Vikram A Punathambekar5-Jun-03 9:12
Vikram A Punathambekar5-Jun-03 9:12 
I have a big matrix of buttons in a dlg-based MFC app wizard generated program. When any button is clicked, the focus remains on that button even after the handler is called; until another button is clicked.

Then I modified the handler - this is the first line in the handler now:

GetDlgItem(IDC_STATIC1)->SetFocus();


I'm setting the focus on another static control now. The handler is for the Dialog class, of course.

What happens is that the first time I click on a button, it retains the focus. When I click on the same button again, it loses focus (which is what I want).

I tried repeating the call to SetFocus() , but it doesn't help.

Can anybody suggest a way of taking the focus away completely, please? (I don't want to disable the button)

Thanks,


Vikram.
-----------------------------

KI klike KDE kand kuse kit, kbut KI kmust kadmit, kstarting kall knames kwith K kis ksilly. KI khope kthey kwill kgive kup kthis kwhole kscheme ksoon kand kcome kup kwith kreal knames.

pI vThink aHungarian nNotation vIs iA aWonderful nThing cAnd pEveryone
avShould vUse pIt aAll dThe nTime, adNo nMatter pWhat dThe nContext,
adEven adWhen vSpeaking.
GeneralRe: Removing focus from button in dlg-based app Pin
valikac5-Jun-03 9:28
valikac5-Jun-03 9:28 
GeneralRe: Removing focus from button in dlg-based app Pin
Neville Franks5-Jun-03 10:55
Neville Franks5-Jun-03 10:55 
GeneralRe: Removing focus from button in dlg-based app Pin
Vikram A Punathambekar5-Jun-03 19:54
Vikram A Punathambekar5-Jun-03 19:54 
GeneralRe: Removing focus from button in dlg-based app Pin
BhaskarBora5-Jun-03 18:12
BhaskarBora5-Jun-03 18:12 
GeneralRe: Removing focus from button in dlg-based app Pin
Vikram A Punathambekar5-Jun-03 20:03
Vikram A Punathambekar5-Jun-03 20:03 
GeneralRe: Removing focus from button in dlg-based app Pin
BhaskarBora9-Jun-03 23:35
BhaskarBora9-Jun-03 23:35 
GeneralGood Window Apps - Help Pin
iltallman5-Jun-03 7:53
iltallman5-Jun-03 7:53 
GeneralRe: Good Window Apps - Help Pin
Daniel Turini5-Jun-03 8:37
Daniel Turini5-Jun-03 8:37 
GeneralRe: Good Window Apps - Help Pin
Neville Franks5-Jun-03 11:04
Neville Franks5-Jun-03 11:04 
GeneralTool Tips Not Displayed Pin
Dave_5-Jun-03 7:45
Dave_5-Jun-03 7:45 
GeneralIRC Chat Server Source Code Download Pin
Amer Hafeez5-Jun-03 6:57
Amer Hafeez5-Jun-03 6:57 
QuestionHow do i draw 4:2:0 YUV data on the screen? Pin
Redeemer-dk5-Jun-03 6:51
Redeemer-dk5-Jun-03 6:51 
AnswerRe: How do i draw 4:2:0 YUV data on the screen? Pin
Anonymous5-Jun-03 15:08
Anonymous5-Jun-03 15:08 
GeneralForcing ON_UPDATE_COMMAND_UI Pin
Jawache5-Jun-03 6:33
Jawache5-Jun-03 6:33 
GeneralRe: Forcing ON_UPDATE_COMMAND_UI Pin
Dave_5-Jun-03 7:37
Dave_5-Jun-03 7:37 
GeneralNT Monitoring Service Struggles Pin
Jason Reis5-Jun-03 6:11
Jason Reis5-Jun-03 6:11 
GeneralPlease help.. Pin
sardinka5-Jun-03 6:11
sardinka5-Jun-03 6:11 

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.