mirror of
https://github.com/VincentWei/MiniGUI.git
synced 2026-02-06 02:01:50 +08:00
tune code to reflect the new prototypes
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Use RectVisible to optimize the repaint of the window.
|
||||
*/
|
||||
MSG_PAINT:
|
||||
case MSG_PAINT:
|
||||
{
|
||||
HDC hdc = BeginPaint (hWnd);
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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) {
|
||||
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user