tune code to reflect the new prototypes

This commit is contained in:
VincentWei
2018-01-21 17:19:18 +08:00
parent dbcc408ad3
commit 75764eecb4
14 changed files with 20 additions and 21 deletions

View File

@@ -3,7 +3,7 @@
* This example trys to handle the event when the user presses
* left button and right button of the mouse at the same time.
*/
int MyWinProc (HWND hWnd, int message, WPARAM wParam, LPARAM lParam)
LRESULT MyWinProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
switch (message) {
case MSG_LBUTTONDOWN:

View File

@@ -9,7 +9,7 @@
#define IDC_EDIT1 130
#define IDC_EDIT2 140
int ControlTestWinProc (HWND hWnd, int message, WPARAM wParam, LPARAM lParam)
LRESULT ControlTestWinProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
static HWND hStaticWnd1, hStaticWnd2, hButton1, hButton2, hEdit1, hEdit2;
switch (message) {

View File

@@ -2,7 +2,7 @@
* The following code defines the dialog box callback procedure
* and displays the dialog box by calling DialogBoxIndirectParam function.
*/
static int InitDialogBoxProc (HWND hDlg, int message, WPARAM wParam, LPARAM lParam)
static LRESULT InitDialogBoxProc (HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
switch (message) {
case MSG_INITDIALOG:

View File

@@ -11,7 +11,7 @@
#include <minigui/gdi.h>
#include <minigui/window.h>
static int HelloWinProc (HWND hWnd, int message, WPARAM wParam, LPARAM lParam)
static LRESULT HelloWinProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
HDC hdc;

View File

@@ -3,7 +3,7 @@
* This example trys to handle the event when the user
* presses <C> key as the <Ctrl> key is down.
*/
int MyWinProc (HWND hWnd, int message, WPARAM wParam, LPARAM lParam)
LRESULT MyWinProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
switch (message) {
case MSG_KEYDOWN:

View File

@@ -14,7 +14,7 @@
...
/* The window procedure. */
static int VCOnGUIMainWinProc (HWND hWnd, int message, WPARAM wParam, LPARAM lParam)
static LRESULT VCOnGUIMainWinProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
PCONINFO pConInfo;

View File

@@ -1,4 +1,4 @@
static int DepInfoBoxProc (HWND hDlg, int message, WPARAM wParam, LPARAM lParam)
static LRESULT DepInfoBoxProc (HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
struct _DepInfo *info;

View File

@@ -1,7 +1,7 @@
/*
* Use RectVisible to optimize the repaint of the window.
*/
MSG_PAINT:
case MSG_PAINT:
{
HDC hdc = BeginPaint (hWnd);

View File

@@ -3,8 +3,7 @@
#define MSG_SET_STEP_INFO (MSG_USER + 1)
#define MSG_SET_CURR_STEP (MSG_USER + 2)
static int StepControlProc (HWND hwnd,
int message, WPARAM wParam, LPARAM lParam)
static LRESULT StepControlProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
HDC hdc;
HELPWININFO* info;

View File

@@ -2,9 +2,9 @@
* The following MSG_SETCURSOR handler set the cursor
* shape to the arrow cursor when the window is disabled.
*/
case MSG_SETCURSOR:
if (GetWindowStyle (hwnd) & WS_DISABLED) {
SetCursor (GetSystemCursor (IDC_ARROW));
return 0;
}
break;
case MSG_SETCURSOR:
if (GetWindowStyle (hwnd) & WS_DISABLED) {
SetCursor (GetSystemCursor (IDC_ARROW));
return 0;
}
break;

View File

@@ -1,7 +1,7 @@
/*
* A typical handling of timer.
*/
int FlyingGUIWinProc (HWND hWnd, int message, WPARAM wParam, LPARAM lParam)
LRESULT FlyingGUIWinProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
switch (message) {
case MSG_CREATE:

View File

@@ -14,7 +14,7 @@ BOOL listen_socket (HWND hwnd)
* the window hwnd will receive a MSG_FDEVENT message.
* Now the server can accept the request.
*/
int MyWndProc (HWND hwnd, int message, WPARAM wParam, LPARAM lParam)
LRESULT MyWndProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
switch (message) {

View File

@@ -10,7 +10,7 @@
#define MY_ES_DIGIT_ONLY 0x0001
#define MY_ES_ALPHA_ONLY 0x0002
static WNDPROC old_edit_proc;
static int RestrictedEditBox (HWND hwnd, int message, WPARAM wParam, LPARAM lParam)
static LRESULT RestrictedEditBox (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
if (message == MSG_CHAR) {
DWORD my_style = GetWindowAdditionalData (hwnd);
@@ -28,7 +28,7 @@ static int RestrictedEditBox (HWND hwnd, int message, WPARAM wParam, LPARAM lPar
return (*old_edit_proc) (hwnd, message, wParam, lParam);
}
static int ControlTestWinProc (HWND hWnd, int message, WPARAM wParam, LPARAM lParam)
static LRESULT ControlTestWinProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
switch (message) {
case MSG_CREATE:

View File

@@ -10,7 +10,7 @@
#include <minigui/gdi.h>
#include <minigui/window.h>
static int HelloWinProc (HWND hWnd, int message, WPARAM wParam, LPARAM lParam)
static LRESULT HelloWinProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
HDC hdc;