Click here to Skip to main content
15,909,325 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: i want help in writing this code Pin
Bob Stanneveld13-Jun-05 3:00
Bob Stanneveld13-Jun-05 3:00 
GeneralRe: i want help in writing this code Pin
kosamoza13-Jun-05 3:11
kosamoza13-Jun-05 3:11 
GeneralRe: i want help in writing this code Pin
toxcct13-Jun-05 5:38
toxcct13-Jun-05 5:38 
GeneralRe: i want help in writing this code Pin
ThatsAlok13-Jun-05 3:11
ThatsAlok13-Jun-05 3:11 
GeneralRe: i want help in writing this code Pin
kosamoza13-Jun-05 3:20
kosamoza13-Jun-05 3:20 
GeneralRe: i want help in writing this code Pin
ThatsAlok13-Jun-05 3:39
ThatsAlok13-Jun-05 3:39 
GeneralRe: i want help in writing this code Pin
road198113-Jun-05 5:20
road198113-Jun-05 5:20 
GeneralWeird problem with SetFocus Pin
RichardNN13-Jun-05 0:51
RichardNN13-Jun-05 0:51 
Hi,
I am using an owner drawn button on the same window as an edit box. I set the size and position of the button in the WM_INITDIALOG code using...

SetWindowPos(GetDlgItem(hwndow, Button), NULL, ButtonList[3], ButtonList[4], ButtonList[1], ButtonList[2], SWP_NOACTIVATE);

ButtonList being an array containing size and position of the button. I then set the focus to the edit box using...

SetFocus(GetDlgItem(hwndow, IDC_TEXT));

However, the focus is never set to the edit box. Remove the SetWindowPos line and it works perfectly. Put it back and no focus. If the user presses the enter key the code for that also sets the focus to the edit box and that works correctly whether the SetWindowPos is there or not.

I can find no reference to SetWindowPos causing a problem with the text focus so has anyone any idea what is wrong? I would hate to have to use a default button.

Richard


GeneralRe: Weird problem with SetFocus Pin
John M. Drescher13-Jun-05 2:29
John M. Drescher13-Jun-05 2:29 
GeneralRe: Weird problem with SetFocus Pin
Blake Miller13-Jun-05 7:31
Blake Miller13-Jun-05 7:31 
GeneralRe: Weird problem with SetFocus Pin
Anonymous17-Jun-05 6:09
Anonymous17-Jun-05 6:09 
GeneralAlternating btwn VC++ build types Pin
Alton Williams13-Jun-05 0:21
Alton Williams13-Jun-05 0:21 
GeneralRe: Alternating btwn VC++ build types Pin
toxcct13-Jun-05 0:30
toxcct13-Jun-05 0:30 
GeneralRe: Alternating btwn VC++ build types Pin
Member 142769213-Jun-05 0:38
Member 142769213-Jun-05 0:38 
GeneralRe: Alternating btwn VC++ build types Pin
Bob Stanneveld13-Jun-05 1:20
Bob Stanneveld13-Jun-05 1:20 
GeneralRe: Alternating btwn VC++ build types Pin
David Crow13-Jun-05 2:40
David Crow13-Jun-05 2:40 
GeneralRe: Alternating btwn VC++ build types Pin
Alton Williams14-Jun-05 4:36
Alton Williams14-Jun-05 4:36 
Generalgcc and Visual C Pin
Member 142769213-Jun-05 0:07
Member 142769213-Jun-05 0:07 
GeneralRe: gcc and Visual C Pin
David Crow13-Jun-05 2:43
David Crow13-Jun-05 2:43 
Generalmillsecond counter Pin
sweep12312-Jun-05 23:13
sweep12312-Jun-05 23:13 
GeneralRe: millsecond counter Pin
Cedric Moonen12-Jun-05 23:40
Cedric Moonen12-Jun-05 23:40 
GeneralRe: millsecond counter Pin
normanS13-Jun-05 19:35
normanS13-Jun-05 19:35 
QuestionHow to Use SQL language in VC++ Pin
zpzhou200812-Jun-05 22:57
zpzhou200812-Jun-05 22:57 
AnswerRe: How to Use SQL language in VC++ Pin
David Crow13-Jun-05 2:46
David Crow13-Jun-05 2:46 
GeneralRe: How to Use SQL language in VC++ Pin
zpzhou200813-Jun-05 14:35
zpzhou200813-Jun-05 14:35 

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.