comctl32/tests: Fully initialize message tests data.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Nikolay Sivov 2017-03-29 11:11:39 +03:00 committed by Alexandre Julliard
parent e024094b75
commit 1ec91f592e
11 changed files with 16 additions and 26 deletions

View File

@ -117,8 +117,8 @@ static BOOL ignore_message( UINT message )
static LRESULT CALLBACK button_subclass_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam, UINT_PTR id, DWORD_PTR ref_data)
{
static LONG defwndproc_counter = 0;
struct message msg = { 0 };
LRESULT ret;
struct message msg;
if (ignore_message( message )) return pDefSubclassProc(hwnd, message, wParam, lParam);
@ -153,8 +153,8 @@ static LRESULT WINAPI test_parent_wndproc(HWND hwnd, UINT message, WPARAM wParam
{
static LONG defwndproc_counter = 0;
static LONG beginpaint_counter = 0;
struct message msg = { 0 };
LRESULT ret;
struct message msg;
if (ignore_message( message )) return 0;

View File

@ -137,15 +137,14 @@ static LRESULT WINAPI datetime_subclass_proc(HWND hwnd, UINT message, WPARAM wPa
{
WNDPROC oldproc = (WNDPROC)GetWindowLongPtrA(hwnd, GWLP_USERDATA);
static LONG defwndproc_counter = 0;
struct message msg = { 0 };
LRESULT ret;
struct message msg;
msg.message = message;
msg.flags = sent|wparam|lparam;
if (defwndproc_counter) msg.flags |= defwinproc;
msg.wParam = wParam;
msg.lParam = lParam;
msg.id = 0;
add_message(sequences, DATETIME_SEQ_INDEX, &msg);
defwndproc_counter++;

View File

@ -707,8 +707,8 @@ static LRESULT WINAPI header_subclass_proc(HWND hwnd, UINT message, WPARAM wPara
{
WNDPROC oldproc = (WNDPROC)GetWindowLongPtrA(hwnd, GWLP_USERDATA);
static LONG defwndproc_counter = 0;
struct message msg = { 0 };
LRESULT ret;
struct message msg;
msg.message = message;
msg.flags = sent|wparam|lparam;
@ -741,15 +741,14 @@ static LRESULT WINAPI editbox_subclass_proc(HWND hwnd, UINT message, WPARAM wPar
{
WNDPROC oldproc = (WNDPROC)GetWindowLongPtrA(hwnd, GWLP_USERDATA);
static LONG defwndproc_counter = 0;
struct message msg = { 0 };
LRESULT ret;
struct message msg;
msg.message = message;
msg.flags = sent|wparam|lparam;
if (defwndproc_counter) msg.flags |= defwinproc;
msg.wParam = wParam;
msg.lParam = lParam;
msg.id = 0;
/* all we need is sizing */
if (message == WM_WINDOWPOSCHANGING ||

View File

@ -621,15 +621,14 @@ static LRESULT WINAPI monthcal_subclass_proc(HWND hwnd, UINT message, WPARAM wPa
{
WNDPROC oldproc = (WNDPROC)GetWindowLongPtrA(hwnd, GWLP_USERDATA);
static LONG defwndproc_counter = 0;
struct message msg = { 0 };
LRESULT ret;
struct message msg;
msg.message = message;
msg.flags = sent|wparam|lparam;
if (defwndproc_counter) msg.flags |= defwinproc;
msg.wParam = wParam;
msg.lParam = lParam;
msg.id = 0;
add_message(sequences, MONTHCAL_SEQ_INDEX, &msg);
/* some debug output for style changing */

View File

@ -142,13 +142,12 @@ static HWND create_parent_window(void)
static LRESULT WINAPI pager_subclass_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
WNDPROC oldproc = (WNDPROC)GetWindowLongPtrA(hwnd, GWLP_USERDATA);
struct message msg;
struct message msg = { 0 };
msg.message = message;
msg.flags = sent|wparam|lparam;
msg.wParam = wParam;
msg.lParam = lParam;
msg.id = 0;
add_message(sequences, PAGER_SEQ_INDEX, &msg);
return CallWindowProcA(oldproc, hwnd, message, wParam, lParam);
}

View File

@ -710,7 +710,7 @@ static const struct message property_sheet_seq[] = {
static void save_message(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam, INT receiver)
{
struct message msg;
struct message msg = { 0 };
if (message < WM_USER &&
message != WM_GETICON &&

View File

@ -143,15 +143,14 @@ static WNDPROC syslink_oldproc;
static LRESULT WINAPI syslink_subclass_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
static LONG defwndproc_counter = 0;
struct message msg = { 0 };
LRESULT ret;
struct message msg;
msg.message = message;
msg.flags = sent|wparam|lparam;
if (defwndproc_counter) msg.flags |= defwinproc;
msg.wParam = wParam;
msg.lParam = lParam;
msg.id = 0;
add_message(sequences, SYSLINK_SEQ_INDEX, &msg);
defwndproc_counter++;

View File

@ -300,8 +300,8 @@ create_tabcontrol (DWORD style, DWORD mask)
static LRESULT WINAPI parentWindowProcess(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
static LONG defwndproc_counter = 0;
struct message msg = { 0 };
LRESULT ret;
struct message msg;
/* do not log painting messages */
if (message != WM_PAINT &&
@ -317,7 +317,6 @@ static LRESULT WINAPI parentWindowProcess(HWND hwnd, UINT message, WPARAM wParam
if (defwndproc_counter) msg.flags |= defwinproc;
msg.wParam = wParam;
msg.lParam = lParam;
msg.id = 0;
add_message(sequences, PARENT_SEQ_INDEX, &msg);
}
@ -363,8 +362,8 @@ static LRESULT WINAPI tabSubclassProcess(HWND hwnd, UINT message, WPARAM wParam,
{
WNDPROC oldproc = (WNDPROC)GetWindowLongPtrA(hwnd, GWLP_USERDATA);
static LONG defwndproc_counter = 0;
struct message msg = { 0 };
LRESULT ret;
struct message msg;
/* do not log painting messages */
if (message != WM_PAINT &&
@ -380,7 +379,6 @@ static LRESULT WINAPI tabSubclassProcess(HWND hwnd, UINT message, WPARAM wParam,
if (defwndproc_counter) msg.flags |= defwinproc;
msg.wParam = wParam;
msg.lParam = lParam;
msg.id = 0;
add_message(sequences, TAB_SEQ_INDEX, &msg);
}

View File

@ -439,15 +439,14 @@ static HWND create_parent_window(void){
static LRESULT WINAPI trackbar_subclass_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam){
WNDPROC oldproc = (WNDPROC)GetWindowLongPtrA(hwnd, GWLP_USERDATA);
static LONG defwndproc_counter = 0;
struct message msg = { 0 };
LRESULT ret;
struct message msg;
msg.message = message;
msg.flags = sent|wparam|lparam;
if (defwndproc_counter) msg.flags |= defwinproc;
msg.wParam = wParam;
msg.lParam = lParam;
msg.id = 0;
add_message(sequences, TRACKBAR_SEQ_INDEX, &msg);
defwndproc_counter++;

View File

@ -383,15 +383,14 @@ static LRESULT WINAPI TreeviewWndProc(HWND hwnd, UINT message, WPARAM wParam, LP
{
static LONG defwndproc_counter = 0;
LRESULT ret;
struct message msg;
WNDPROC lpOldProc = (WNDPROC)GetWindowLongPtrA(hwnd, GWLP_USERDATA);
struct message msg = { 0 };
msg.message = message;
msg.flags = sent|wparam|lparam;
if (defwndproc_counter) msg.flags |= defwinproc;
msg.wParam = wParam;
msg.lParam = lParam;
msg.id = 0;
add_message(sequences, TREEVIEW_SEQ_INDEX, &msg);
defwndproc_counter++;

View File

@ -166,8 +166,8 @@ static const struct message test_updown_pos_nochange_seq[] = {
static LRESULT WINAPI parent_wnd_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
static LONG defwndproc_counter = 0;
struct message msg = { 0 };
LRESULT ret;
struct message msg;
/* log system messages, except for painting */
if (message < WM_USER &&
@ -184,7 +184,6 @@ static LRESULT WINAPI parent_wnd_proc(HWND hwnd, UINT message, WPARAM wParam, LP
if (defwndproc_counter) msg.flags |= defwinproc;
msg.wParam = wParam;
msg.lParam = lParam;
msg.id = 0;
add_message(sequences, PARENT_SEQ_INDEX, &msg);
}
@ -229,8 +228,8 @@ static LRESULT WINAPI edit_subclass_proc(HWND hwnd, UINT message, WPARAM wParam,
{
WNDPROC oldproc = (WNDPROC)GetWindowLongPtrA(hwnd, GWLP_USERDATA);
static LONG defwndproc_counter = 0;
struct message msg = { 0 };
LRESULT ret;
struct message msg;
msg.message = message;
msg.flags = sent|wparam|lparam;
@ -269,8 +268,8 @@ static LRESULT WINAPI updown_subclass_proc(HWND hwnd, UINT message, WPARAM wPara
{
WNDPROC oldproc = (WNDPROC)GetWindowLongPtrA(hwnd, GWLP_USERDATA);
static LONG defwndproc_counter = 0;
struct message msg = { 0 };
LRESULT ret;
struct message msg;
msg.message = message;
msg.flags = sent|wparam|lparam;