TabControl Problem in FromView
-
Hey guys. I have one MFC Class with Form with lots of buttons and radiobuttons,Edit Control they are basically Functions for Calculator Now I Used OnDraw() to plot graphs in Formview. There are like 9 Graphs and I want to get each Graph in tabs.Afterwards i realized that TabControl Only support CDialog. So I have to create 9 Diffrent Class for each Tabs and then draw all graphs again there. I found out OnDraw() doesnt get called in DialogBox i wrote OnPaint and pointed that function to OnDraw() but now OnPaint() is not getting called by itself. I Googled everything about OnPaint() and read almost all Forums about it but still couldn't solve it. So basically I am not able to Draw anything in Dialogs(tabs). I cannot call any methods of formview from my dialog box because the values formview contains cannot be access by cdialog class since formview is not initialized when you call CDialog Functions so i get access violation errors. If any one understand this problems or have any opinion Please Reply.. I will post some error codes and pseudo code for my programs.. Thank you..
-
Hey guys. I have one MFC Class with Form with lots of buttons and radiobuttons,Edit Control they are basically Functions for Calculator Now I Used OnDraw() to plot graphs in Formview. There are like 9 Graphs and I want to get each Graph in tabs.Afterwards i realized that TabControl Only support CDialog. So I have to create 9 Diffrent Class for each Tabs and then draw all graphs again there. I found out OnDraw() doesnt get called in DialogBox i wrote OnPaint and pointed that function to OnDraw() but now OnPaint() is not getting called by itself. I Googled everything about OnPaint() and read almost all Forums about it but still couldn't solve it. So basically I am not able to Draw anything in Dialogs(tabs). I cannot call any methods of formview from my dialog box because the values formview contains cannot be access by cdialog class since formview is not initialized when you call CDialog Functions so i get access violation errors. If any one understand this problems or have any opinion Please Reply.. I will post some error codes and pseudo code for my programs.. Thank you..
hi.. As per my knowledge OnPaint() is called when ever any dialog is resized, minimised or maximized. Only thing which i have understood is that u r trying to make a calculator.. Hoping that Im Right.. :) All the Best..
-
Hey guys. I have one MFC Class with Form with lots of buttons and radiobuttons,Edit Control they are basically Functions for Calculator Now I Used OnDraw() to plot graphs in Formview. There are like 9 Graphs and I want to get each Graph in tabs.Afterwards i realized that TabControl Only support CDialog. So I have to create 9 Diffrent Class for each Tabs and then draw all graphs again there. I found out OnDraw() doesnt get called in DialogBox i wrote OnPaint and pointed that function to OnDraw() but now OnPaint() is not getting called by itself. I Googled everything about OnPaint() and read almost all Forums about it but still couldn't solve it. So basically I am not able to Draw anything in Dialogs(tabs). I cannot call any methods of formview from my dialog box because the values formview contains cannot be access by cdialog class since formview is not initialized when you call CDialog Functions so i get access violation errors. If any one understand this problems or have any opinion Please Reply.. I will post some error codes and pseudo code for my programs.. Thank you..
hi If u r making a calculator, u cn tk help of Visual C++ Programming By Mr.Yashwant Kanetkar Page no.434.there he has given sum hints on this topic.. :) Hope U solve your Problem soon.. All the Best tc..
-
hi If u r making a calculator, u cn tk help of Visual C++ Programming By Mr.Yashwant Kanetkar Page no.434.there he has given sum hints on this topic.. :) Hope U solve your Problem soon.. All the Best tc..
tanu misra wrote:
u cn tk
Is your kbd broken? You seem to be missing some vowels. Iain.
I am one of "those foreigners coming over here and stealing our jobs". Yay me!
-
tanu misra wrote:
u cn tk
Is your kbd broken? You seem to be missing some vowels. Iain.
I am one of "those foreigners coming over here and stealing our jobs". Yay me!
thank you all for reply. I solved the problem, Calling ON_WM_PAINT() in your TabControl Class will call OnPaint. But when i switch tabs it suppose to Call OnPaint each time so it redraw the graph. I called INVALIDATE() but doesn't seem like working since TabControl is not mainwindow. INVALIDATE only refresh the main window not the tabcontrol :( ..
-
hi.. As per my knowledge OnPaint() is called when ever any dialog is resized, minimised or maximized. Only thing which i have understood is that u r trying to make a calculator.. Hoping that Im Right.. :) All the Best..
When i call invalidate() it just refresh the mytabcontrol and it blinks but it doesnt actully redraw the graph with new values. this is like scientific calculator with function on top inside formview and graphs on tabview(dialog mode). so each time i switch tab or change values in calculator it has to redraw graph depending upon the new values in calculator. if anyone have got idea how to do this or any hint. PLEASE... <<<>> THANKzzzzz