Waitrud Weber’s blog

things and reminders for memories

WindowsAPI: 1.Set uMsg as Type for all processes as copying.

cg_schema.h
extern wEvent *p_evt;

cg_schema.cpp
wEvent *p_evt = nullptr;

winmain_001.cpp
#include "cg_schema.h"

 

winmain_001.cpp Thu Jul 08 14:01:05 2021
... 621 :// 622 :static LRESULT CALLBACK mainWindowProc ( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam ) 623 :{ 624 : int succ; 625 : static HDC hDC; 626 : PAINTSTRUCT ps; 627 : int check_invalidate = 0; 628 : int stop_thread_once_second = 0; 629 : 630 : if ( p_evt == nullptr ) { 631 : p_evt = new wEvent (); 632 : } 633 : 634 : p_evt->hWnd = hWnd; 635 : p_evt->uMsg = &uMsg; 636 : p_evt->wParam = wParam; 637 : p_evt->lParam = lParam; 638 : p_evt->main_mode = m_mode; 639 : btc.setEvent ( p_evt ); 640 : canvas.setEvent ( p_evt ); 641 : cg_setEvent ( p_evt ); // setting is necessary. 642 : 643 : p_evt->Type = uMsg; 644 : ...

-- execution 001 ---
WM_MESSG 004: p_evt 00741200 256 *(p_evt->uMsg):256 uMsg:256 p_evt->uMsg: 2686208 &uMsg: 2686208
cg_schema () starts. p_evt = 00741200
cg_schema: p_evt->wParam: 37
cg_schema: p_evt->main_mode: 0
baselootin_000: starts.
baselootin_000: ends.
cg_schema () ends.
WM_MESSG 005: 256 *(p_evt->uMsg):256 uMsg:256 p_evt->uMsg: 2686208 &uMsg: 2686208
--- execution 001 ---