Waitrud Weber’s blog

things and reminders for memories

windows-make: Settle all drawing functions...

*
*Their values should be displayed and changed with keyboard operation. 
*parameters and functions

    value - -
bErase   true or not     
RefreshRect        
rect back ground mairgin      
rect a small band      
rect        
...        
fonts        
...        
SetPixel poisson      
SetPixel wave      

*
*
*
*
*
*

*

    region - -
background  a small band for the wave graph

 

a small rect only

(spacified part))

   
         
objects rectangle as cursol 

a small rect only

(spacified part)

   
         
         

 

*
*
*

    region - -
background poisson disk sampling

whole window

(the entire region)

   
         
objects rectangle as cursol 

a small rect only

(spacified part)

   
         
         

 

*InvalidateRect

learn.microsoft.com

* as written
If the bErase parameter is TRUE for any part of the update region, the background is erased in the entire region, not just in the specified part.


*
*
*
*
*
*

There are "Drawing funcions" and their all parameters and their orders only.

willinglytranslate.blogspot.com

windows-make: Using a picture buffer.

*
*
*
*
*
*
*
*
*

*

    region - -
background  a small band for the wave graph

 

a small rect only

(spacified part))

   
         
objects rectangle as cursol 

a small rect only

(spacified part)

   
         
         

 

*
*
*

    region - -
background poisson disk sampling

whole window

(the entire region)

   
         
objects rectangle as cursol 

a small rect only

(spacified part)

   
         
         

 

*InvalidateRect

learn.microsoft.com

* as written
If the bErase parameter is TRUE for any part of the update region, the background is erased in the entire region, not just in the specified part.


*
*
*
*
*
*

How is the background and also the entire region?
That effects in animation will express in the size of picture buffer.

willinglytranslate.blogspot.com







 

windows-make: a small band and cursol

*

- objects invalidate area keyup animation -
1          
2          
3 rect15, rect 17 rect 17(on a little band) (v) (v)  
4 rect15, rect 17 rect 17(on a little band)- (-) (v)  
-          

*

All cases with cursol invalidated area will be a on a band area.

 

*invalidate curosol

We invalidate 2 rects position which are previous and current cursol's positions if we focus on cursol on the animation.

previous: px1, py1, px2, py2

current:  cx1, cy1, cx2, cy2

 

windows-make: Once, invalidate even a small cursol...

We paint the objects with begin paint and end paint.
Once, invalidate even a small cursol, all objects will be disapeared. We can draw the wave cursol as like,
*
- paint

(drawing)

keyup

ani-thread

keyup thread -
1 rect 15

(v)

(-)

  no no animation
2 rect 15

(v)

(v)

  no well(not flashing)
3

rect 17

rect 15

(v)

(v)

rect 17

rect 15

rect 15

flashing
4

rect 17

rect 15

(-)

(v)

rect 17

rect 15

rect 15 not displayed
-          
 
rect 17: a small band
rect 15: the wave cursol
 
1. no invalidate
you must recognise if you invaldate the cursol &rect_xy[15] and a whole &RefreshRect. 
*
- - - - - -
- 006-winmainthread_001.cpp (*1)        
-     case WM_KEYUP:
        //InvalidateRect( p_evt->hWnd, &rect_xy[15], FALSE);
        InvalidateRect( hWnd, &RefreshRect, TRUE);
       
-          
-          
-          
 
2. no invalidate a little band rect background
 
- - - - - -
-     005-20230519-005-01.png
    005-winmainthread_001.cpp (*1)
       
-     case WM_KEYUP:
        InvalidateRect( p_evt->hWnd, &rect_xy[15], FALSE);
        InvalidateRect( p_evt->hWnd, &rect_xy[17], FALSE);
       
-          
-          
-          
 
3. invalidate the cursol with a little band rect background.
*
- - - - - -
-     Flashing (5/19 14:15)
    007-winmainthread_001.cpp (*1)
       
-
 
       
-

InvalidateRect( p_evt->hWnd, &rect_xy[15], FALSE);

 

       
-          
-          
 
4. invalidate the cursol with a little band rect background "key up" only.
*
- - - - - -
-     Not Displayed (5/19 14:18)
    008-20230519-005-01.png
    008-winmainthread_001.cpp (*1)
       
-
case WM_KEYUP:
DRAW_PARAM = DRAW_PARAM | _DRAW_PARAM_00000000000000000000000000010000_;
InvalidateRect( p_evt->hWnd, &rect_xy[17], FALSE);
       
-
 
       
-
if ( DRAW_PARAM & _DRAW_PARAM_00000000000000000000000000010000_ ) {
//$00000000000000000000000000010000
 
Rectangle(  (HDC) hDC, rect_xy[17].left, rect_xy[17].top, rect_xy[17].right, rect_xy[17].bottom );
DRAW_PARAM -= _DRAW_PARAM_00000000000000000000000000010000_;
 
printf("00000000000000000000000000010000\r\n");
}
       
-          
(*1)
If we blank that line like C++,
 

sound: windows-make: audio end-points.

They call the list of something kind of devices "Endpoints".

*

- - - - - - - -
- HRESULT EnumAudioEndpoints(
  [in]  EDataFlow           dataFlow,
  [in]  DWORD               dwStateMask,
  [out] IMMDeviceCollection **ppDevices
);
- - - - - -
- hr = pDevEnum->EnumAudioEndpoints(
                   eRender, DEVICE_STATE_ACTIVE,
                   &pEndpoints);
- - - - - -
- typedef enum __MIDL___MIDL_itf_mmdeviceapi_0000_0000_0001 {
  eRender = 0,
  eCapture,
  eAll,
  EDataFlow_enum_count
} EDataFlow;
- - - - - -
- IMMDeviceEnumerator::GetDefaultAudioEndpoint - - - - - -
- IMMDeviceEnumerator (mmdeviceapi.h) - Win32 apps | Microsoft Learn - - - - - -

 

*
You shouldn't think of being able to compile the microsoft minor includion.
Open the source code, which is the developper any starts.
Data structure is different only, from 64bit Windows.

*Download

- Very thanks to: - -
-

includion:
propkeydef.h
winapifamily.h
propsys.h
mmdeviceapi.h
structuredquerycondition.h
propidl.h
shtypes.h

- -
-

Mmdeviceapi.h Errors: Download and Troubleshoot

www.exefiles.com

- -
- - - -
- - - -


*

- - - - - - - -
1 - 1-1. windows.h attached program device open:
1-2. send message like a device name "sound card 01".
[1],[2],[3] - - - -
2 - 2-1. 
2-2. send message like a device name "sound card 01". 
2-3. consider fopen function.
- - - - -
3 - 3-1. read a binary *.o on 1-2 for putting the way to 2-1.
3-2. 
- - - - -
4 - 4-1. search and Find a device name connected to personal computer on windows programming.
4-2. " "
4-3. "Microsoft "
- - - - -
5 - 5-1. Open a devise number if you know it. [1],[2] - - - -


*DEFINE_GUID

- - - - - - - -
[1]

.\winmain_001.cpp  File modified time Mon Apr 10 12:49:56 2023

...

111 :#define CX_MARGIN    12 
112 :
113 :DEFINE_GUID(IID_IMMDeviceEnumerator, 0xa95664d2, 0x9614, 0x4f35, 0xa7,0x46, 0xde,0x8d,0xb6,0x36,0x17,0xe6);
114 :
115 : typedef struct tagLABELBOX {  // box 
116 :    RECT rcText;    // coordinates of rectangle containing text 
117 :    BOOL fSelected; // TRUE if the label is selected 

...

*

We can use macro DEFINE_GUID in migw compilation.

- - - - - -
[2]

 

usefulreports.webnode.jp

*
We can count set number asets as "11".
They are very good at "C++".
.Net Frame work Property is cast of class.

- - - - - -
[3]

Sounds device id has changed so many times and we can hear that sounds well on windows. But that includes "mmdeviceapi.h".

souds device id:
msg_buffer m_waveout device is |10182672|. -> |9B6010|
msg_buffer m_waveout device is |9271320|.  -> |8D7818|
msg_buffer m_waveout device is |8097776|.  -> |7B8FF0|

- - - - - -
- - - - - - - -
- - - - - - - -
- - - - - - - -
- - - - - - - -
- - - - - - - -
- - - - - - - -
- - - - - - - -
- - - - - - - -
- - - - - - - -

 

* All Cpus are type of x86.

- 32(bit) OS 64(bit) OS - - -
x86 compilation (debug 32) - - - - -
renamed x64 - (debug 64) - - - - -
Program Files (x86) v - - - -
Program Files - Most but Not all - - -
- - - - - -
- - - - - -
- - - - - -

3d: windows-make:



*

-

check_invalidate

main

check_validate

main

wTextareaController

local

wTextarea

local

- -
animation_times_001 - - - - - -
wm_paint 0 0 0 0 - -
wm_mousemove 0 0 1 - - -
setp1: Set params 1 0 0 0 - -
step2: BeginPaint - 0 0 0 - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -
- - - - - - -

*

*

docs.microsoft.com

The BeginPaint function automatically validates the entire client area. Neither the ValidateRect nor ValidateRgn function should be called if a portion of the update region must be validated before the next WM_PAINT message is generated.

 

3d: windows-make: param_synse_003.cpp

*

- - - -
- - - -
-

.\param_synse_003.cpp  File changed time Wed Mar 08 15:02:47 2023

  1 :#include <tchar.h>
  2 :#include <windows.h>
  3 :#include <windowsx.h>
  4 :#include <stdio.h>
  5 :#include <stdlib.h>
  6 :
  7 ://
  8 :
  9 :
 10 :#include "wTextarea.h"
 11 :#include "wTextareaController.h"
 12 :
 13 :#include "param_synse_003.h"
 14 :
 15 :
 16 :
 17 :ParamSynse_003::ParamSynse_003 () {
 18 :    Initialization ();
 19 :}
 20 :
 21 ://
 22 :int ParamSynse_003::Initialization () {
 23 :
 24 :    box_param = (wTextarea**)malloc (sizeof(wTextarea*) * box_param_num );
 25 :    if ( box_param == NULL ) {
 26 :        printf("We cannot allocate box_param and it exits.\r\n");
 27 :        exit(-1);
 28 :    }
 29 :
 30 :    this->Initialization_001 ();
 31 :    this->Initialization_002 ();
 32 :
 33 :    return 0;
 34 :}
 35 :
 36 :int ParamSynse_003::Initialization_002 () {
 37 :
 38 :    box_param[0]->setTextarea( 10 , 10 , 100 , 80 );
 39 :
 40 :    box_param[1]->setTextarea( 110 , 10 , 100 , 80 );
 41 :
 42 :    box_param[2]->setTextarea( 210 , 10 , 100 , 80 );
 43 :
 44 :    box_param[3]->setTextarea( 310 , 10 , 100 , 80 );
 45 :
 46 :    box_param[4]->setTextarea( 410 , 10 , 100 , 80 );
 47 :
 48 :    box_param[5]->setTextarea( 510 , 10 , 100 , 80 );
 49 :
 50 :    box_param[6]->setTextarea( 610 , 10 , 100 , 80 );
 51 :
 52 :    box_param[7]->setTextarea( 10 , 90 , 100 , 80 );
 53 :
 54 :    box_param[8]->setTextarea( 110 , 90 , 100 , 80 );
 55 :
 56 :    box_param[9]->setTextarea( 210 , 90 , 100 , 80 );
 57 :
 58 :    box_param[10]->setTextarea( 310 , 90 , 100 , 80 );
 59 :
 60 :    box_param[11]->setTextarea( 410 , 90 , 100 , 80 );
 61 :
 62 :    box_param[12]->setTextarea( 510 , 90 , 100 , 80 );
 63 :
 64 :    box_param[13]->setTextarea( 610 , 90 , 100 , 80 );
 65 :
 66 :    box_param[14]->setTextarea( 10 , 170 , 100 , 80 );
 67 :
 68 :    box_param[15]->setTextarea( 110 , 170 , 100 , 80 );
 69 :
 70 :    box_param[16]->setTextarea( 210 , 170 , 100 , 80 );
 71 :
 72 :    box_param[17]->setTextarea( 310 , 170 , 100 , 80 );
 73 :
 74 :    box_param[18]->setTextarea( 410 , 170 , 100 , 80 );
 75 :
 76 :    box_param[19]->setTextarea( 510 , 170 , 100 , 80 );
 77 :
 78 :    box_param[20]->setTextarea( 610 , 170 , 100 , 80 );
 79 :
 80 :    box_param[21]->setTextarea( 10 , 250 , 100 , 80 );
 81 :
 82 :    box_param[22]->setTextarea( 110 , 250 , 100 , 80 );
 83 :
 84 :    box_param[23]->setTextarea( 210 , 250 , 100 , 80 );
 85 :
 86 :    box_param[24]->setTextarea( 310 , 250 , 100 , 80 );
 87 :
 88 :    box_param[25]->setTextarea( 410 , 250 , 100 , 80 );
 89 :
 90 :    box_param[26]->setTextarea( 510 , 250 , 100 , 80 );
 91 :
 92 :    box_param[27]->setTextarea( 610 , 250 , 100 , 80 );
 93 :
 94 :    box_param[28]->setTextarea( 10 , 330 , 100 , 80 );
 95 :
 96 :    box_param[29]->setTextarea( 110 , 330 , 100 , 80 );
 97 :
 98 :    box_param[30]->setTextarea( 210 , 330 , 100 , 80 );
 99 :
100 :    box_param[31]->setTextarea( 310 , 330 , 100 , 80 );
101 :
102 :    box_param[32]->setTextarea( 410 , 330 , 100 , 80 );
103 :
104 :    box_param[33]->setTextarea( 510 , 330 , 100 , 80 );
105 :
106 :    box_param[34]->setTextarea( 610 , 330 , 100 , 80 );
107 :
108 :    box_param[35]->setTextarea( 10 , 410 , 100 , 80 );
109 :
110 :    box_param[36]->setTextarea( 110 , 410 , 100 , 80 );
111 :
112 :    box_param[37]->setTextarea( 210 , 410 , 100 , 80 );
113 :
114 :    box_param[38]->setTextarea( 310 , 410 , 100 , 80 );
115 :
116 :    box_param[39]->setTextarea( 410 , 410 , 100 , 80 );
117 :
118 :    box_param[40]->setTextarea( 510 , 410 , 100 , 80 );
119 :
120 :    box_param[41]->setTextarea( 610 , 410 , 100 , 80 );
121 :
122 :    return 0;
123 :}
124 :
125 :int ParamSynse_003::Initialization_001 () {
126 :
127 :    box_param[0] = new wTextarea ();
128 :    box_param[1] = new wTextarea ();
129 :    box_param[2] = new wTextarea ();
130 :    box_param[3] = new wTextarea ();
131 :    box_param[4] = new wTextarea ();
132 :    box_param[5] = new wTextarea ();
133 :    box_param[6] = new wTextarea ();
134 :    box_param[7] = new wTextarea ();
135 :    box_param[8] = new wTextarea ();
136 :    box_param[9] = new wTextarea ();
137 :    box_param[10] = new wTextarea ();
138 :    box_param[11] = new wTextarea ();
139 :    box_param[12] = new wTextarea ();
140 :    box_param[13] = new wTextarea ();
141 :    box_param[14] = new wTextarea ();
142 :    box_param[15] = new wTextarea ();
143 :    box_param[16] = new wTextarea ();
144 :    box_param[17] = new wTextarea ();
145 :    box_param[18] = new wTextarea ();
146 :    box_param[19] = new wTextarea ();
147 :    box_param[20] = new wTextarea ();
148 :    box_param[21] = new wTextarea ();
149 :    box_param[22] = new wTextarea ();
150 :    box_param[23] = new wTextarea ();
151 :    box_param[24] = new wTextarea ();
152 :    box_param[25] = new wTextarea ();
153 :    box_param[26] = new wTextarea ();
154 :    box_param[27] = new wTextarea ();
155 :    box_param[28] = new wTextarea ();
156 :    box_param[29] = new wTextarea ();
157 :    box_param[30] = new wTextarea ();
158 :    box_param[31] = new wTextarea ();
159 :    box_param[32] = new wTextarea ();
160 :    box_param[33] = new wTextarea ();
161 :    box_param[34] = new wTextarea ();
162 :    box_param[35] = new wTextarea ();
163 :    box_param[36] = new wTextarea ();
164 :    box_param[37] = new wTextarea ();
165 :    box_param[38] = new wTextarea ();
166 :    box_param[39] = new wTextarea ();
167 :    box_param[40] = new wTextarea ();
168 :    box_param[41] = new wTextarea ();
169 :
170 :    return 0;
171 :}
172 :
173 :

- -
-

.\param_synse_003.h  File changed time Wed Mar 08 15:00:00 2023

  1 :#ifndef _PARAM_SYNSE_H_
  2 :#define _PARAM_SYNSE_H_
  3 :
  4 :#include <tchar.h>
  5 :#include <windows.h>
  6 :#include <windowsx.h>
  7 :#include <stdio.h>
  8 :#include <stdlib.h>
  9 :
 10 ://
 11 :#include "wTextarea.h"
 12 :#include "wTextareaController.h"
 13 :
 14 :class ParamSynse_003 {
 15 :
 16 :    public:
 17 :        wTextarea** box_param = nullptr;
 18 :        int box_param_num = 42;
 19 :
 20 :    private:
 21 :        wTextarea textarea1;
 22 :
 23 :    public:
 24 :        ParamSynse_003();
 25 :
 26 :    private:
 27 :        int Initialization ();
 28 :        int Initialization_001 ();
 29 :        int Initialization_002 ();
 30 :} ;
 31 :
 32 :#endif
 33 :
 34 :

- -
- - - -
- - - -
- - - -
- - - -
- - - -
-

Error:

prototype only:

https://github.com/WaitrudWeber/source_zip/blob/master/axex-20230308-001.zip

https://github.com/WaitrudWeber/source_zip/blob/master/axex-20230308-001-01.zip

- -