(20200305)
Frame: int initialize_box () { vTriangle* tri = new vTriangle(); tri->setTriangle ( new vPoint(0.0f, 0.0f, 0.0f), new vPoint( 50.0f, 0.0f, 0.0f), new vPoint( 0.0f, 50.0f, 0.0f) ); //tri->setPoint ( new vPoint(0.0f, 50.0f, 0.0f), new vPoint( 00.0f, 5 0.0f, 0.0f), new vPoint( 0.0f, 0.0f, 0.0f) ); }
// 20200306 int initialize_box () { vPoint* p1 = memorizevPoint(0.0f, 0.0f, 0.0f); vPoint* p2 = memorizevPoint(50.0f, 0.0f, 0.0f); vPoint* p3 = memorizevPoint(50.0f, 50.0f, 0.0f); vPoint* p4 = memorizevPoint(50.0f, 50.0f, 0.0f); vPoint* p5 = memorizevPoint(0.0f, 0.0f, 0.0f); vPoint* p6 = memorizevPoint(0.0f, 50.0f, 0.0f); vPoint* p1_1 = memorizevPoint(0.0f, 0.0f, 50.0f); vPoint* p2_1 = memorizevPoint(50.0f, 0.0f, 50.0f); vPoint* p3_1 = memorizevPoint(50.0f, 50.0f, 50.0f); vPoint* p4_1 = memorizevPoint(50.0f, 50.0f, 50.0f); vPoint* p5_1 = memorizevPoint(0.0f, 0.0f, 50.0f); vPoint* p6_1 = memorizevPoint(0.0f, 50.0f, 50.0f); vTriangle* tri = new vTriangle(); tri->setTriangle ( p1, p2, p3 ); tri->setTriangle ( p4, p5, p6 ); tri->setTriangle ( p1_1, p2_1, p3_1 ); tri->setTriangle ( p4_1, p5_1, p6_1 ); }
model creation: | int initialize_box () | create boxex |
painter: |
// 20200306 // we must check if event-parameter sets or not. int wControllerT::Process (){ printf("wControllerT::Process () starts\r\n"); // printf("WM_MESSG 003: %d *(p_evt->uMsg):%d\r\n", uMsg, *(p_evt->uMsg) ); m_btc->Process (); m_canvas->Process (); // m_mode = p_evt->main_mode; // printf("WM_MESSG 004: %d *(p_evt->uMsg):%d uMsg:%d p_evt->uMsg: %d &uMsg: %d \r\n", uMsg, *(p_evt->uMsg), uMsg, p_evt->uMsg, &uMsg ); printf("wControllerT::Process () ends\r\n"); return 0; }
// 20200307 static LRESULT CALLBACK mainWindowProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam ); Parameters come from the above function: And we could move the below functions except wButtonController and wCanvasController: int initialize_box () ; int display_box ( HWND hWnd, HDC hDC, PAINTSTRUCT* ps, UINT uMsg, WPARAM wParam, LPARAM lParam ) ; By use of Frame works, we create, we can solve the above. At the most, we are going ton change Procee in wButtonController and wCanvasController, we must realise there isn't any other ways.
(20200309)
// 20200309 Process commented out, and it can not work well. --- printf("WM_MESSG 003: %d *(p_evt->uMsg):%d\r\n", uMsg, *(p_evt->uMsg) ); // 20200308 commented out //btc.Process (); //canvas.Process (); //controller_t->kickEvent_001 (); // 20200309 commented out //if ( controller_t != nullptr ) // controller_t->Process_001(); //20200305 starts //20200305 ends m_mode = p_evt->main_mode; printf("WM_MESSG 004: %d *(p_evt->uMsg):%d uMsg:%d p_evt->uMsg: %d &uMsg: %d \r\n", uMsg, *(p_evt->uMsg), uMsg, p_evt->uMsg, &uMsg ); --- static void SetMenu () { // wControllerT 20200303 starts. wKickEventDisplayThreeD* kick_event = new wKickEventDisplayThreeD() ; wKickEvent* kick_event_001 = new wKickEvent() ; controller_t = new wControllerT(); controller_t->setKickEvent_001 ( 0, kick_event ); controller_t->setKickEvent_001 ( 1, kick_event_001 ); controller_t->setButtonController( &btc ); controller_t->setCanvasController( &canvas ); exit(-1); // wControllerT 20200303 ends. ... https://github.com/WaitrudWeber/source_zip/blob/master/analyzer_20200310-001.zip