Everything works if I put the handler of TCN_SELCHANGE in the view class.
Instead If i put the handler in the CTabCtrl derived class of my tab control the handler is never called when I push tabs and the tab control doesn't work
I am not sure exactly what feedback you are expecting, as it really depends on what sort of GUI you wish to present to the user. Setting parameters could be anything from simple text input, drop down list or combo, slider, up/down control etc., all of which can be accomplished by using the various Windows Controls[^]. I would suggest looking at some of the sample articles here on CodeProject[^] to get some ideas about how other people have approached similar issues. You could also add some more detail to your question which would help us make more suggestions.
Sorry about my poor explanation!,
The working on a project which is windows console application. But as per my understanding, GUI can be only done in 'Windows Forms Applications'.
Will it be possible to change console applications to windows forms application, where I can find all tools for creating GUI??
Windows Forms applications use C++/CLI or C#. But you can create a Win32/MFC Windows application using the standard Windows controls. Since you already (I assume) have most of the code in your console app, converting it to Windows should not be too difficult (depending on your skill level), although the initial learning does take some time.
You can create a basic Windows application from the template supplied with Visual Studio, so it is worth starting with that to see how it is put together.
I have been trying to convert my console application to windows form application.
While running I'm getting an error, following is the part of my main function..
int main(array<System::String ^> ^args)
char fpath; // file name for loggingchar fpath1; // file name for logging//disable force field for first half of trial for(int i=0;i<NTRIALS/4;i++)
for(int i=NTRIALS/4;i<NTRIALS;i++) </pre>
This was the error. I tried changing 'main' as 'WinMain' but it's not preceeding
error LNK2019: unresolved external symbol _WinMain@16 referenced in function ___tmainCRTStartup
(this is partly a rant, because it seems to be something really easy to do, but the framework makes it really hard to achieve).
I need to be able to change the background color of a CMFCButton when certain conditions happen in our application.
According to the documentation, I could use the method CMFCButton::SetFaceColor (Sets the background color for the button text); but this will get overridden (sp?) by the visual manager drawing method (CMFCBaseVisualManager::DrawPushButton) and will have not effect.
Our application is under control of a CMFCVisualManager theme; so all controls are drawn to respect the current theme ( we want to have themes in our application).
There is a static method in CMFCButton to disable themes for ALL CMFCButtons; so that is a little bit overkill.
I could set the CMFCButton flag m_bDontUseWinXPTheme to TRUE (which will disable the theme for that particular button (I would need to inherit from CMFCButton) But that will change the look of the button (and if I want to keep some of the look, I would have to draw all of it manually).
Any insights, tips or hints on what would be the best way to change the background color of a CMFCButton without having to re-invent the wheel?
Alas, think your only solution is to derive your own button from the MFC one and change the OnDraw() method (think that's what the draw method is called, going off memory). I had to do this for a set of buttons that reflected status on their color. It's not terribly hard to do once you've done it once.
which, as I explained will lead to problems: you will either get strange results, or a program crash. If you are going to store data in the buffer returned from malloc then you must allocate enough space for the data you are going to copy into it. Anything less will cause your program to overwite other variables.