The reason it's forcing you to typecast is that someplace you've got #define UNICODE in your source. Hence all windows api calls need wide strings to work...
Originally Posted by codenewbie
A) remove the UNICODE define
B) change all your strings over to WCHAR .... and use the unicode vesions of all string functions in wchar.h
c) Explicitly call the Ansi version of Windows functions... as in GetDlgItemTextA() etc.
Unicode programming is a whole different animal than you are likely to be used to with console programming.
As matters of general practice to reduce errors it's not a good idea to use any more global variables than you absolutely have to. It's also a good idea to put as little code as possible in switch statements of message handlers; you should instead create functions for things like the above and call them from the message handler. Also... when working in Windows API, you should try to use windows types (variables, structs, etc) whenever possible.
#define MAX_EDIT 64
//this code is within my button case in my switch statement.
AccountBalance = wcstod(buffer);
AccountBalance = AccountBalance*2;