Question regarding user input via a win32 GUI.

Trips

Well-known member
Joined
Aug 7, 2010
Messages
2,788
Well I have finished writing the GUI for my calculator but I am now facing a bit of a dilema.
I cant seem to figure out how to get the number the user imputs and put it into a variable without using strings and I cant convert my strings to integers.

Would anybody be able to help regarding this?
I have declared a few variables that I thought I could use to solve this problem but it seems that I was wrong.
These variables are "x, y, temp and operand".

All I have to figure out is how to allow the user to input what they want by pressing the buttons and then passing it into an integer variable some how.

Here is my source so far.

<div style="color:Black;background-color:White; <pre>
#include <windows.h>

#define IDC_TEXT_BOX 100

#define IDC_BUTTON_ONE 101
#define IDC_BUTTON_TWO 102
#define IDC_BUTTON_THREE 103
#define IDC_BUTTON_FOUR 104
#define IDC_BUTTON_FIVE 105
#define IDC_BUTTON_SIX 106
#define IDC_BUTTON_SEVEN 107
#define IDC_BUTTON_EIGHT 108
#define IDC_BUTTON_NINE 109
#define IDC_BUTTON_ZERO 110

#define IDC_BUTTON_POINT 111
#define IDC_BUTTON_DIVIDE 112
#define IDC_BUTTON_MULTIPLY 113
#define IDC_BUTTON_ADDITION 114
#define IDC_BUTTON_SUBTRACTION 115
#define IDC_BUTTON_EQUALS 116

#define IDC_BUTTON_INFO 117


HWND hwnd; <span style="color:Green; /* This is the handle for our window */
HWND hEdit; <span style="color:Green; /* This is the handle for the textbox */
HFONT hFont, hInfo_Font; <span style="color:Green; /* This is the handle for our font. */

HWND hButton1, hButton2, hButton3; <span style="color:Green; /* Buttons 1 - 3 */
HWND hButton4, hButton5, hButton6; <span style="color:Green; /* Buttons 4 - 6 */
HWND hButton7, hButton8, hButton9; <span style="color:Green; /* Buttons 7 - 9 */
HWND hButton_Zero, hButton_Point; <span style="color:Green; /* Buttons Zero and Point */
HWND hButton_Plus, hButton_Minus; <span style="color:Green; /* Buttons + and - */
HWND hButton_Multiply, hButton_Divide; <span style="color:Green; /* Buttons * and / */
HWND hButton_Equals; <span style="color:Green; /* Button = */
HWND hButton_Info; <span style="color:Green; /* Button Info */

WORD wLow, wHigh;

<span style="color:Blue; int x[100], y[100];
<span style="color:Blue; int temp;
<span style="color:Blue; char opperand;

<span style="color:Green; /* Declare Windows procedure */
LRESULT CALLBACK WindowProcedure (HWND, UINT, WPARAM, LPARAM);

<span style="color:Green; /* Make the class name as a global variable */
<span style="color:Blue; char szClassName[ ] = <span style="color:#A31515; "Shadow_Calc";

<span style="color:Blue; int WINAPI WinMain (HINSTANCE hThisInstance,
HINSTANCE hPrevInstance,
LPSTR lpszArgument,
<span style="color:Blue; int nCmdShow)
{
<span style="color:Green; /* Button exit */

MSG messages; <span style="color:Green; /* Here messages to the application are saved */
WNDCLASSEX wincl; <span style="color:Green; /* Data structure for the windowclass */

<span style="color:Green; /* The Window structure */
wincl.hInstance = hThisInstance;
wincl.lpszClassName = szClassName;
wincl.lpfnWndProc = WindowProcedure; <span style="color:Green; /* This function is called by windows */
wincl.style = CS_DBLCLKS; <span style="color:Green; /* Catch double-clicks */
wincl.cbSize = <span style="color:Blue; sizeof (WNDCLASSEX);

<span style="color:Green; /* Use default icon and mouse-pointer */
wincl.hIcon = LoadIcon (NULL, IDI_APPLICATION);
wincl.hIconSm = LoadIcon (NULL, IDI_APPLICATION);
wincl.hCursor = LoadCursor (NULL, IDC_ARROW);
wincl.lpszMenuName = NULL; <span style="color:Green; /* No menu */
wincl.cbClsExtra = 0; <span style="color:Green; /* No extra bytes after the window class */
wincl.cbWndExtra = 0; <span style="color:Green; /* structure or the window instance */
<span style="color:Green; /* Use Windowss default colour as the background of the window */
wincl.hbrBackground = (HBRUSH) COLOR_DESKTOP;

<span style="color:Green; /* Register the window class, and if it fails quit the program */
<span style="color:Blue; if (!RegisterClassEx (&wincl))
<span style="color:Blue; return 0;

<span style="color:Green; /* The class is registered, lets create the program*/
hwnd = CreateWindowEx (
0, <span style="color:Green; /* Extended possibilites for variation */
szClassName, <span style="color:Green; /* Classname */
<span style="color:#A31515; "Shadow_Calc vs 0.1", <span style="color:Green; /* Title Text */
WS_OVERLAPPED|WS_SYSMENU, <span style="color:Green; /* default window */
CW_USEDEFAULT, <span style="color:Green; /* Windows decides the position */
CW_USEDEFAULT, <span style="color:Green; /* where the window ends up on the screen */
185, <span style="color:Green; /* The programs width */
215, <span style="color:Green; /* and height in pixels */
HWND_DESKTOP, <span style="color:Green; /* The window is a child-window to desktop */
NULL, <span style="color:Green; /* No menu */
hThisInstance, <span style="color:Green; /* Program Instance handler */
NULL <span style="color:Green; /* No Window Creation data */
);

<span style="color:Green; /* Font */
hFont = CreateFont(18, <span style="color:Green; /* Logical height of font */
0, <span style="color:Green; /* Logical average of character width */
0, <span style="color:Green; /* Angle of escapement */
0, <span style="color:Green; /* Base-line orientation angle */
FW_BOLD , <span style="color:Green; /* Font weight */
0, <span style="color:Green; /* Italic attribute flag */
0, <span style="color:Green; /* Underline attribute flag */
0, <span style="color:Green; /* Strikeout attribute flag */
ANSI_CHARSET, <span style="color:Green; /* Character set identifier */
OUT_DEFAULT_PRECIS, <span style="color:Green; /* Output precision */
CLIP_DEFAULT_PRECIS, <span style="color:Green; /* Clipping precision */
DEFAULT_QUALITY, <span style="color:Green; /* Output quality */
DEFAULT_PITCH | FF_DONTCARE, <span style="color:Green; /* Pitch and family */
<span style="color:#A31515; "Ariel"); <span style="color:Green; /* Pointer to typeface name string */

hInfo_Font = CreateFont(15, <span style="color:Green; /* Logical height of font */
0, <span style="color:Green; /* Logical average of character width */
0, <span style="color:Green; /* Angle of escapement */
0, <span style="color:Green; /* Base-line orientation angle */
FW_BOLD , <span style="color:Green; /* Font weight */
0, <span style="color:Green; /* Italic attribute flag */
0, <span style="color:Green; /* Underline attribute flag */
0, <span style="color:Green; /* Strikeout attribute flag */
ANSI_CHARSET, <span style="color:Green; /* Character set identifier */
OUT_DEFAULT_PRECIS, <span style="color:Green; /* Output precision */
CLIP_DEFAULT_PRECIS, <span style="color:Green; /* Clipping precision */
DEFAULT_QUALITY, <span style="color:Green; /* Output quality */
DEFAULT_PITCH | FF_DONTCARE, <span style="color:Green; /* Pitch and family */
<span style="color:#A31515; "Ariel"); <span style="color:Green; /* Pointer to typeface name string */

<span style="color:Green; /* Text box */
hEdit = CreateWindowEx(WS_EX_CLIENTEDGE,
<span style="color:#A31515; "EDIT",
<span style="color:#A31515; "",
WS_CHILD|WS_VISIBLE|ES_RIGHT|ES_READONLY,
10,
10,
160,
50,
hwnd,
(HMENU)IDC_TEXT_BOX,
GetModuleHandle(NULL),
NULL);

<span style="color:Green; /* Button 1 - 3 */
hButton1 = CreateWindowEx(NULL,
<span style="color:#A31515; "BUTTON",
<span style="color:#A31515; "1",
WS_TABSTOP|WS_VISIBLE|WS_CHILD|BS_DEFPUSHBUTTON,
10, <span style="color:Green; /* Position */
65,
25,
25,
hwnd,
(HMENU)IDC_BUTTON_ONE,
GetModuleHandle(NULL),
NULL);

hButton2 = CreateWindowEx(NULL,
<span style="color:#A31515; "BUTTON",
<span style="color:#A31515; "2",
WS_TABSTOP|WS_VISIBLE|WS_CHILD|BS_DEFPUSHBUTTON,
40, <span style="color:Green; /* Position */
65,
25,
25,
hwnd,
(HMENU)IDC_BUTTON_TWO,
GetModuleHandle(NULL),
NULL);

hButton3 = CreateWindowEx(NULL,
<span style="color:#A31515; "BUTTON",
<span style="color:#A31515; "3",
WS_TABSTOP|WS_VISIBLE|WS_CHILD|BS_DEFPUSHBUTTON,
70, <span style="color:Green; /* Position */
65,
25,
25,
hwnd,
(HMENU)IDC_BUTTON_THREE,
GetModuleHandle(NULL),
NULL);

<span style="color:Green; /* Button 4 - 6 */
hButton4 = CreateWindowEx(NULL,
<span style="color:#A31515; "BUTTON",
<span style="color:#A31515; "4",
WS_TABSTOP|WS_VISIBLE|WS_CHILD|BS_DEFPUSHBUTTON,
10, <span style="color:Green; /* Position */
94,
25,
25,
hwnd,
(HMENU)IDC_BUTTON_FOUR,
GetModuleHandle(NULL),
NULL);

hButton5 = CreateWindowEx(NULL,
<span style="color:#A31515; "BUTTON",
<span style="color:#A31515; "5",
WS_TABSTOP|WS_VISIBLE|WS_CHILD|BS_DEFPUSHBUTTON,
40, <span style="color:Green; /* Position */
94,
25,
25,
hwnd,
(HMENU)IDC_BUTTON_FIVE,
GetModuleHandle(NULL),
NULL);

hButton6 = CreateWindowEx(NULL,
<span style="color:#A31515; "BUTTON",
<span style="color:#A31515; "6",
WS_TABSTOP|WS_VISIBLE|WS_CHILD|BS_DEFPUSHBUTTON,
70, <span style="color:Green; /* Position */
94,
25,
25,
hwnd,
(HMENU)IDC_BUTTON_SIX,
GetModuleHandle(NULL),
NULL);

<span style="color:Green; /* Button 7 - 9 */
hButton7 = CreateWindowEx(NULL,
<span style="color:#A31515; "BUTTON",
<span style="color:#A31515; "7",
WS_TABSTOP|WS_VISIBLE|WS_CHILD|BS_DEFPUSHBUTTON,
10, <span style="color:Green; /* Position */
123,
25,
25,
hwnd,
(HMENU)IDC_BUTTON_SEVEN,
GetModuleHandle(NULL),
NULL);

hButton8 = CreateWindowEx(NULL,
<span style="color:#A31515; "BUTTON",
<span style="color:#A31515; "8",
WS_TABSTOP|WS_VISIBLE|WS_CHILD|BS_DEFPUSHBUTTON,
40, <span style="color:Green; /* Position */
123,
25,
25,
hwnd,
(HMENU)IDC_BUTTON_EIGHT,
GetModuleHandle(NULL),
NULL);

hButton9 = CreateWindowEx(NULL,
<span style="color:#A31515; "BUTTON",
<span style="color:#A31515; "9",
WS_TABSTOP|WS_VISIBLE|WS_CHILD|BS_DEFPUSHBUTTON,
70, <span style="color:Green; /* Position */
123,
25,
25,
hwnd,
(HMENU)IDC_BUTTON_NINE,
GetModuleHandle(NULL),
NULL);

<span style="color:Green; /* Buttons 0 and . */
hButton_Zero = CreateWindowEx(NULL,
<span style="color:#A31515; "BUTTON",
<span style="color:#A31515; "0",
WS_TABSTOP|WS_VISIBLE|WS_CHILD|BS_DEFPUSHBUTTON,
10,
152,
55,
25,
hwnd,
(HMENU)IDC_BUTTON_ZERO,
GetModuleHandle(NULL),
NULL);

hButton_Point = CreateWindowEx(NULL,
<span style="color:#A31515; "BUTTON",
<span style="color:#A31515; ".",
WS_TABSTOP|WS_VISIBLE|WS_CHILD|BS_DEFPUSHBUTTON,
70,
152,
25,
25,
hwnd,
(HMENU)IDC_BUTTON_POINT,
GetModuleHandle(NULL),
NULL);

<span style="color:Green; /* Buttons + and - */
hButton_Plus = CreateWindowEx(NULL,
<span style="color:#A31515; "BUTTON",
<span style="color:#A31515; "+",
WS_TABSTOP|WS_VISIBLE|WS_CHILD|BS_DEFPUSHBUTTON,
115,
65,
25,
25,
hwnd,
(HMENU)IDC_BUTTON_ADDITION,
GetModuleHandle(NULL),
NULL);

hButton_Minus = CreateWindowEx(NULL,
<span style="color:#A31515; "BUTTON",
<span style="color:#A31515; "-",
WS_TABSTOP|WS_VISIBLE|WS_CHILD|BS_DEFPUSHBUTTON,
145,
65,
25,
25,
hwnd,
(HMENU)IDC_BUTTON_SUBTRACTION,
GetModuleHandle(NULL),
NULL);

<span style="color:Green; /* Buttons * and / */
hButton_Multiply = CreateWindowEx(NULL,
<span style="color:#A31515; "BUTTON",
<span style="color:#A31515; "*",
WS_TABSTOP|WS_VISIBLE|WS_CHILD|BS_DEFPUSHBUTTON,
115,
94,
25,
25,
hwnd,
(HMENU)IDC_BUTTON_MULTIPLY,
GetModuleHandle(NULL),
NULL);

hButton_Divide = CreateWindowEx(NULL,
<span style="color:#A31515; "BUTTON",
<span style="color:#A31515; "/",
WS_TABSTOP|WS_VISIBLE|WS_CHILD|BS_DEFPUSHBUTTON,
145,
94,
25,
25,
hwnd,
(HMENU)IDC_BUTTON_DIVIDE,
GetModuleHandle(NULL),
NULL);

<span style="color:Green; /* Button = */
hButton_Equals = CreateWindowEx(NULL,
<span style="color:#A31515; "BUTTON",
<span style="color:#A31515; "=",
WS_TABSTOP|WS_VISIBLE|WS_CHILD|BS_DEFPUSHBUTTON,
115,
123,
55,
25,
hwnd,
(HMENU)IDC_BUTTON_EQUALS,
GetModuleHandle(NULL),
NULL);

hButton_Info = CreateWindowEx(NULL,
<span style="color:#A31515; "BUTTON",
<span style="color:#A31515; "Info",
WS_TABSTOP|WS_VISIBLE|WS_CHILD|BS_DEFPUSHBUTTON,
115,
152,
55,
25,
hwnd,
(HMENU)IDC_BUTTON_INFO,
GetModuleHandle(NULL),
NULL);

<span style="color:Green; /* Make the window visible on the screen */
ShowWindow (hwnd, SW_SHOW);

<span style="color:Green; /* Set the font on all controls */
PostMessage(hButton1, <span style="color:Green; /* Handle of destination window */
WM_SETFONT, <span style="color:Green; /* Message to post */
(WPARAM) hFont, <span style="color:Green; /* First message parameter */
(LPARAM)MAKELPARAM(wLow, wHigh) ); <span style="color:Green; /* Second message parameter */

PostMessage(hButton2, <span style="color:Green; /* Handle of destination window */
WM_SETFONT, <span style="color:Green; /* Message to post */
(WPARAM) hFont, <span style="color:Green; /* First message parameter */
(LPARAM)MAKELPARAM(wLow, wHigh) ); <span style="color:Green; /* Second message parameter */

PostMessage(hButton3, <span style="color:Green; /* Handle of destination window */
WM_SETFONT, <span style="color:Green; /* Message to post */
(WPARAM) hFont, <span style="color:Green; /* First message parameter */
(LPARAM)MAKELPARAM(wLow, wHigh) ); <span style="color:Green; /* Second message parameter */

PostMessage(hButton4, <span style="color:Green; /* Handle of destination window */
WM_SETFONT, <span style="color:Green; /* Message to post */
(WPARAM) hFont, <span style="color:Green; /* First message parameter */
(LPARAM)MAKELPARAM(wLow, wHigh) ); <span style="color:Green; /* Second message parameter */

PostMessage(hButton5, <span style="color:Green; /* Handle of destination window */
WM_SETFONT, <span style="color:Green; /* Message to post */
(WPARAM) hFont, <span style="color:Green; /* First message parameter */
(LPARAM)MAKELPARAM(wLow, wHigh) ); <span style="color:Green; /* Second message parameter */

PostMessage(hButton6, <span style="color:Green; /* Handle of destination window */
WM_SETFONT, <span style="color:Green; /* Message to post */
(WPARAM) hFont, <span style="color:Green; /* First message parameter */
(LPARAM)MAKELPARAM(wLow, wHigh) ); <span style="color:Green; /* Second message parameter */

PostMessage(hButton7, <span style="color:Green; /* Handle of destination window */
WM_SETFONT, <span style="color:Green; /* Message to post */
(WPARAM) hFont, <span style="color:Green; /* First message parameter */
(LPARAM)MAKELPARAM(wLow, wHigh) ); <span style="color:Green; /* Second message parameter */

PostMessage(hButton8, <span style="color:Green; /* Handle of destination window */
WM_SETFONT, <span style="color:Green; /* Message to post */
(WPARAM) hFont, <span style="color:Green; /* First message parameter */
(LPARAM)MAKELPARAM(wLow, wHigh) ); <span style="color:Green; /* Second message parameter */

PostMessage(hButton9, <span style="color:Green; /* Handle of destination window */
WM_SETFONT, <span style="color:Green; /* Message to post */
(WPARAM) hFont, <span style="color:Green; /* First message parameter */
(LPARAM)MAKELPARAM(wLow, wHigh) ); <span style="color:Green; /* Second message parameter */

PostMessage(hButton_Zero, <span style="color:Green; /* Handle of destination window */
WM_SETFONT, <span style="color:Green; /* Message to post */
(WPARAM) hFont, <span style="color:Green; /* First message parameter */
(LPARAM)MAKELPARAM(wLow, wHigh) ); <span style="color:Green; /* Second message parameter */

PostMessage(hButton_Divide, <span style="color:Green; /* Handle of destination window */
WM_SETFONT, <span style="color:Green; /* Message to post */
(WPARAM) hFont, <span style="color:Green; /* First message parameter */
(LPARAM)MAKELPARAM(wLow, wHigh) ); <span style="color:Green; /* Second message parameter */

PostMessage(hButton_Multiply, <span style="color:Green; /* Handle of destination window */
WM_SETFONT, <span style="color:Green; /* Message to post */
(WPARAM) hFont, <span style="color:Green; /* First message parameter */
(LPARAM)MAKELPARAM(wLow, wHigh) ); <span style="color:Green; /* Second message parameter */

PostMessage(hButton_Minus, <span style="color:Green; /* Handle of destination window */
WM_SETFONT, <span style="color:Green; /* Message to post */
(WPARAM) hFont, <span style="color:Green; /* First message parameter */
(LPARAM)MAKELPARAM(wLow, wHigh) ); <span style="color:Green; /* Second message parameter */

PostMessage(hButton_Plus, <span style="color:Green; /* Handle of destination window */
WM_SETFONT, <span style="color:Green; /* Message to post */
(WPARAM) hFont, <span style="color:Green; /* First message parameter */
(LPARAM)MAKELPARAM(wLow, wHigh) ); <span style="color:Green; /* Second message parameter */

PostMessage(hButton_Point, <span style="color:Green; /* Handle of destination window */
WM_SETFONT, <span style="color:Green; /* Message to post */
(WPARAM) hFont, <span style="color:Green; /* First message parameter */
(LPARAM)MAKELPARAM(wLow, wHigh) ); <span style="color:Green; /* Second message parameter */

PostMessage(hButton_Info, <span style="color:Green; /* Handle of destination window */
WM_SETFONT, <span style="color:Green; /* Message to post */
(WPARAM) hInfo_Font, <span style="color:Green; /* First message parameter */
(LPARAM)MAKELPARAM(wLow, wHigh) ); <span style="color:Green; /* Second message parameter */

PostMessage(hButton_Equals, <span style="color:Green; /* Handle of destination window */
WM_SETFONT, <span style="color:Green; /* Message to post */
(WPARAM) hFont, <span style="color:Green; /* First message parameter */
(LPARAM)MAKELPARAM(wLow, wHigh) ); <span style="color:Green; /* Second message parameter */

PostMessage(hEdit, <span style="color:Green; /* Handle of destination window */
WM_SETFONT, <span style="color:Green; /* Message to post */
(WPARAM) hFont, <span style="color:Green; /* First message parameter */
(LPARAM)MAKELPARAM(wLow, wHigh) ); <span style="color:Green; /* Second message parameter */

<span style="color:Green; /* Run the message loop. It will run until GetMessage() returns 0 */
<span style="color:Blue; while (GetMessage (&messages, NULL, 0, 0))
{
<span style="color:Green; /* Translate virtual-key messages into character messages */
TranslateMessage(&messages);
<span style="color:Green; /* Send message to WindowProcedure */
DispatchMessage(&messages);
}

<span style="color:Green; /* The program return-value is 0 - The value that PostQuitMessage() gave */
<span style="color:Blue; return messages.wParam;

}
<span style="color:Green; /* This function is called by the Windows function DispatchMessage() */

LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
HINSTANCE hInst;

<span style="color:Blue; switch (message) <span style="color:Green; /* handle the messages */
{
<span style="color:Blue; case WM_DESTROY:
<span style="color:Blue; bool dead;

<span style="color:Blue; while (dead != <span style="color:Blue; true)
{
dead = DeleteObject(hFont); <span style="color:Green; /* Delete the font object */
}

PostQuitMessage (0); <span style="color:Green; /* send a WM_QUIT to the message queue */
<span style="color:Blue; break;

<span style="color:Blue; case WM_COMMAND:
<span style="color:Blue; switch (LOWORD(wParam))
{
<span style="color:Blue; case IDC_BUTTON_INFO:
MessageBox(NULL,
<span style="color:#A31515; "Shadow_Calc vs 0.1nnThis is a simple Win32 calculaternwritten for vb-board.com by Shadow_69_91.", <span style="color:Green; /* Messagebox text */
<span style="color:#A31515; "Shadow_Calc Info!", <span style="color:Green; /* Messagebox window text */
MB_OK | MB_ICONINFORMATION | MB_TOPMOST);
<span style="color:Blue; return 0;

<span style="color:Blue; case IDC_BUTTON_ONE:
SendMessage(hEdit, WM_SETTEXT, 0, (LPARAM) 1);
<span style="color:Blue; return 0;

<span style="color:Blue; case IDC_BUTTON_TWO:
SendMessage(hEdit, WM_SETTEXT, 0, (LPARAM) <span style="color:#A31515; "2");
<span style="color:Blue; return 0;

<span style="color:Blue; case IDC_BUTTON_THREE:
SendMessage(hEdit, WM_SETTEXT, 0, (LPARAM) <span style="color:#A31515; "3");
<span style="color:Blue; return 0;

<span style="color:Blue; case IDC_BUTTON_FOUR:
SendMessage(hEdit, WM_SETTEXT, 0, (LPARAM) <span style="color:#A31515; "4");
<span style="color:Blue; return 0;

<span style="color:Blue; case IDC_BUTTON_FIVE:
SendMessage(hEdit, WM_SETTEXT, 0, (LPARAM) <span style="color:#A31515; "5");
<span style="color:Blue; return 0;

<span style="color:Blue; case IDC_BUTTON_SIX:
SendMessage(hEdit, WM_SETTEXT, 0, (LPARAM) <span style="color:#A31515; "6");
<span style="color:Blue; return 0;

<span style="color:Blue; case IDC_BUTTON_SEVEN:
SendMessage(hEdit, WM_SETTEXT, 0, (LPARAM) <span style="color:#A31515; "7");
<span style="color:Blue; return 0;

<span style="color:Blue; case IDC_BUTTON_EIGHT:
SendMessage(hEdit, WM_SETTEXT, 0, (LPARAM) <span style="color:#A31515; "8");
<span style="color:Blue; return 0;

<span style="color:Blue; case IDC_BUTTON_NINE:
SendMessage(hEdit, WM_SETTEXT, 0, (LPARAM) <span style="color:#A31515; "9");
<span style="color:Blue; return 0;

<span style="color:Blue; case IDC_BUTTON_ZERO:
SendMessage(hEdit, WM_SETTEXT, 0, (LPARAM) <span style="color:#A31515; "0");
<span style="color:Blue; return 0;

<span style="color:Blue; case IDC_BUTTON_POINT:
SendMessage(hEdit, WM_SETTEXT, 0, (LPARAM) <span style="color:#A31515; ".");
<span style="color:Blue; return 0;
}
<span style="color:Blue; break;

<span style="color:Blue; default: <span style="color:Green; /* for messages that we dont deal with */
<span style="color:Blue; return DefWindowProc (hwnd, message, wParam, lParam);
}

<span style="color:Blue; return 0;
}

[/code]



Any help would be greatly appreciated.
Thanks in advance.

Jai Brown.

View the full article
 
Back
Top