Click here to Skip to main content
15,902,635 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: The WM_DEVICECHANGE question Pin
Roger Stoltz12-Nov-08 3:58
Roger Stoltz12-Nov-08 3:58 
AnswerRe: The WM_DEVICECHANGE question Pin
Iain Clarke, Warrior Programmer12-Nov-08 12:09
Iain Clarke, Warrior Programmer12-Nov-08 12:09 
QuestionRegisterClassEx and CreateWindowEx fails.. Pin
gothic_coder12-Nov-08 2:35
gothic_coder12-Nov-08 2:35 
AnswerRe: RegisterClassEx and CreateWindowEx fails.. Pin
CPallini12-Nov-08 2:47
mveCPallini12-Nov-08 2:47 
GeneralRe: RegisterClassEx and CreateWindowEx fails.. Pin
gothic_coder12-Nov-08 3:10
gothic_coder12-Nov-08 3:10 
AnswerRe: RegisterClassEx and CreateWindowEx fails.. Pin
Randor 12-Nov-08 2:59
professional Randor 12-Nov-08 2:59 
QuestionRe: RegisterClassEx and CreateWindowEx fails.. Pin
David Crow12-Nov-08 3:00
David Crow12-Nov-08 3:00 
AnswerRe: RegisterClassEx and CreateWindowEx fails.. Pin
enhzflep12-Nov-08 3:01
enhzflep12-Nov-08 3:01 
Okay, first things first. The first call to GetLastError seems to be useless as it comes before the call to RegisterClassEx.

Next, the thing about RegisterClassEx compared to RegisterClass, is that you are expected to provide a valid handle for not only the standard icon, but also the small one.

You can do this like so:
wndclass.hIcon = wndclass.hIconSm = LoadIcon (NULL, IDI_APPLICATION);



Finally, you've not set the cbSize member of wndclass. You can do that with the following:
wndclass.cbSize = sizeof (WNDCLASSEX);



As for the message loop - there's no window created, so no messages to process.
Smile | :)
GeneralRe: RegisterClassEx and CreateWindowEx fails.. Pin
gothic_coder12-Nov-08 3:18
gothic_coder12-Nov-08 3:18 
GeneralRe: RegisterClassEx and CreateWindowEx fails.. Pin
enhzflep12-Nov-08 3:36
enhzflep12-Nov-08 3:36 
GeneralRe: RegisterClassEx and CreateWindowEx fails.. Pin
gothic_coder12-Nov-08 3:43
gothic_coder12-Nov-08 3:43 
GeneralRe: RegisterClassEx and CreateWindowEx fails.. Pin
enhzflep12-Nov-08 3:50
enhzflep12-Nov-08 3:50 
GeneralRe: RegisterClassEx and CreateWindowEx fails.. Pin
gothic_coder12-Nov-08 19:10
gothic_coder12-Nov-08 19:10 
QuestionCoCreateInstance Problem Pin
john563212-Nov-08 2:10
john563212-Nov-08 2:10 
AnswerRe: CoCreateInstance Problem Pin
CPallini12-Nov-08 2:27
mveCPallini12-Nov-08 2:27 
AnswerRe: CoCreateInstance Problem Pin
Roger Stoltz12-Nov-08 2:32
Roger Stoltz12-Nov-08 2:32 
GeneralRe: CoCreateInstance Problem Pin
john563212-Nov-08 6:04
john563212-Nov-08 6:04 
AnswerRe: CoCreateInstance Problem Pin
Roger Stoltz12-Nov-08 6:29
Roger Stoltz12-Nov-08 6:29 
GeneralRe: CoCreateInstance Problem Pin
john563213-Nov-08 17:42
john563213-Nov-08 17:42 
AnswerRe: CoCreateInstance Problem Pin
Roger Stoltz13-Nov-08 22:34
Roger Stoltz13-Nov-08 22:34 
QuestionStrange Issue Pin
Sameer Naik12-Nov-08 2:02
Sameer Naik12-Nov-08 2:02 
AnswerRe: Strange Issue Pin
CPallini12-Nov-08 2:21
mveCPallini12-Nov-08 2:21 
QuestionExe problem in different machine Pin
NewVC++12-Nov-08 1:12
NewVC++12-Nov-08 1:12 
QuestionRe: Exe problem in different machine Pin
Rajesh R Subramanian12-Nov-08 1:42
professionalRajesh R Subramanian12-Nov-08 1:42 
JokeRe: Exe problem in different machine Pin
CPallini12-Nov-08 1:45
mveCPallini12-Nov-08 1:45 

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.