... | @@ -133,13 +133,13 @@ The main changes in structure and functions: |
... | @@ -133,13 +133,13 @@ The main changes in structure and functions: |
|
The strcuture `MSG` and all message-related functions changed.
|
|
The strcuture `MSG` and all message-related functions changed.
|
|
For example, the prototype of `SendMessage` changed from
|
|
For example, the prototype of `SendMessage` changed from
|
|
|
|
|
|
```C
|
|
```cpp
|
|
int SendMessage (HWND hWnd, int nMsg, WPARAM wParam, LPARAM lParam)
|
|
int SendMessage (HWND hWnd, int nMsg, WPARAM wParam, LPARAM lParam)
|
|
```
|
|
```
|
|
|
|
|
|
to
|
|
to
|
|
|
|
|
|
```C
|
|
```cpp
|
|
LRESULT SendMessage (HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam)
|
|
LRESULT SendMessage (HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam)
|
|
```
|
|
```
|
|
|
|
|
... | @@ -149,7 +149,7 @@ For best portability, you should use `FIRSTBYTE` to `FOURTHBYTE` macros |
... | @@ -149,7 +149,7 @@ For best portability, you should use `FIRSTBYTE` to `FOURTHBYTE` macros |
|
to get the bytes of a character when you extract the bytes from `WPARAM`
|
|
to get the bytes of a character when you extract the bytes from `WPARAM`
|
|
parameter of a `MSG_CHAR` message:
|
|
parameter of a `MSG_CHAR` message:
|
|
|
|
|
|
```C
|
|
```cpp
|
|
case MSG_CHAR:
|
|
case MSG_CHAR:
|
|
unsigned char ch_buff [4];
|
|
unsigned char ch_buff [4];
|
|
unsigned char ch_buff [0] = FIRSTBYTE(wParam);
|
|
unsigned char ch_buff [0] = FIRSTBYTE(wParam);
|
... | @@ -164,25 +164,25 @@ Furthermore, the structure and functions to register window class, |
... | @@ -164,25 +164,25 @@ Furthermore, the structure and functions to register window class, |
|
create main window, and create dialog box changed. For example, the prototype
|
|
create main window, and create dialog box changed. For example, the prototype
|
|
of `WNDPROC` changed from
|
|
of `WNDPROC` changed from
|
|
|
|
|
|
```C
|
|
```cpp
|
|
typedef int (* WNDPROC)(HWND, int, WPARAM, LPARAM)
|
|
typedef int (* WNDPROC)(HWND, int, WPARAM, LPARAM)
|
|
```
|
|
```
|
|
|
|
|
|
to
|
|
to
|
|
|
|
|
|
```C
|
|
```cpp
|
|
typedef LRESULT (* WNDPROC)(HWND, UINT, WPARAM, LPARAM)
|
|
typedef LRESULT (* WNDPROC)(HWND, UINT, WPARAM, LPARAM)
|
|
```
|
|
```
|
|
|
|
|
|
Therefore, the prototype of `DefaultWindowProc` changed from
|
|
Therefore, the prototype of `DefaultWindowProc` changed from
|
|
|
|
|
|
```C
|
|
```cpp
|
|
int DefaultWindowProc (HWND hWnd, int message, WPARAM wParam, LPARAM lParam)
|
|
int DefaultWindowProc (HWND hWnd, int message, WPARAM wParam, LPARAM lParam)
|
|
```
|
|
```
|
|
|
|
|
|
to
|
|
to
|
|
|
|
|
|
```C
|
|
```cpp
|
|
LRESULT DefaultWindowProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
|
LRESULT DefaultWindowProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
|
```
|
|
```
|
|
|
|
|
... | @@ -199,13 +199,13 @@ platform, unless you know what your are doing. |
... | @@ -199,13 +199,13 @@ platform, unless you know what your are doing. |
|
|
|
|
|
The type of notification callback changes from:
|
|
The type of notification callback changes from:
|
|
|
|
|
|
```C
|
|
```cpp
|
|
typedef void (* NOTIFPROC) (HWND hwnd, int id, int nc, DWORD add_data);
|
|
typedef void (* NOTIFPROC) (HWND hwnd, int id, int nc, DWORD add_data);
|
|
```
|
|
```
|
|
|
|
|
|
to
|
|
to
|
|
|
|
|
|
```C
|
|
```cpp
|
|
typedef void (* NOTIFPROC) (HWND hwnd, LINT id, int nc, DWORD add_data);
|
|
typedef void (* NOTIFPROC) (HWND hwnd, LINT id, int nc, DWORD add_data);
|
|
```
|
|
```
|
|
|
|
|
... | @@ -216,7 +216,7 @@ controls, you should make sure the identifier is small enough on 64-bit |
... | @@ -216,7 +216,7 @@ controls, you should make sure the identifier is small enough on 64-bit |
|
platform. Because MiniGUI packs the identifier and the notification code
|
|
platform. Because MiniGUI packs the identifier and the notification code
|
|
in the `WPARAM` parameter:
|
|
in the `WPARAM` parameter:
|
|
|
|
|
|
```C
|
|
```cpp
|
|
MSG_COMMAND
|
|
MSG_COMMAND
|
|
int id = LOWORD(wParam);
|
|
int id = LOWORD(wParam);
|
|
int code = HIWORD(wParam);
|
|
int code = HIWORD(wParam);
|
... | @@ -234,25 +234,25 @@ handle the notification sent from controls. To do this, please call |
... | @@ -234,25 +234,25 @@ handle the notification sent from controls. To do this, please call |
|
|
|
|
|
The prototype of `GetTickCount` changed from
|
|
The prototype of `GetTickCount` changed from
|
|
|
|
|
|
```C
|
|
```cpp
|
|
unsigned int GetTickCount (void)
|
|
unsigned int GetTickCount (void)
|
|
```
|
|
```
|
|
|
|
|
|
to
|
|
to
|
|
|
|
|
|
```C
|
|
```cpp
|
|
DWORD GetTickCount (void);
|
|
DWORD GetTickCount (void);
|
|
```
|
|
```
|
|
|
|
|
|
And the prototye of `TIMERPROC` changed from
|
|
And the prototye of `TIMERPROC` changed from
|
|
|
|
|
|
```C
|
|
```cpp
|
|
typedef BOOL (* TIMERPROC)(HWND, int, DWORD)
|
|
typedef BOOL (* TIMERPROC)(HWND, int, DWORD)
|
|
```
|
|
```
|
|
|
|
|
|
to
|
|
to
|
|
|
|
|
|
```C
|
|
```cpp
|
|
typedef BOOL (* TIMERPROC)(HWND, LINT, DWORD)
|
|
typedef BOOL (* TIMERPROC)(HWND, LINT, DWORD)
|
|
```
|
|
```
|
|
|
|
|
... | | ... | |