|
Hi, l am writing a GUI using MFC, and l need to include some graphical features in it. Does anyone know how to plot graphs using MFC? All l need is something that plots points from a table of data, not from a function. It also doesn't need to be interactive -- basically l need just the most simple kind.
Any suggestions will be appreciated.
Thanks!!
|
|
|
|
|
Type in search: "PGL" It's wonderfull
P.G.L. = Plot Graphic Library
Or go there : Plot Graphic Library
(it's the same result)
Hello World!!!
from Raphaël
|
|
|
|
|
I would like to write a routine to copy registry entries into an INI file then back into the registry, but the only functions I can find in CWinApp are WriteProfile and GetProfile. Does anybody know if there is anything built-in for this task or if it must be done manually??
Any suggestions are appriciated.
Thanks!
Is it football season yet... GO GATORS!!!
|
|
|
|
|
unfortunately, there is no any appropriate functions in MFC for your task.
Moreover, MFC does not include any routines for INI-support (as far as i know). You must do it manually, by WinAPI functions.
See in MSDN: RegOpenKey[Ex], RegCloseKey and so on for Registry operation
AND
GetProfileInt, GetProfileSection, GetProfileString etc. for INI-operations
|
|
|
|
|
I was afraid of that. Oh well, doesnt seem all that difficult to do manually so thats what ill do!
Thanks.
|
|
|
|
|
There is an another way to solve your problem. You may use regedit with command-line params for saving and loading your data from reg-file. Like that
regedit /e My.reg HKEY_CURRENT_USER\Software\My Data //From registry to file
regedit -s My.reg //From file to registry
You can use WINAPI - CreateProcess function to make this job silent
|
|
|
|
|
This is exactly what I was looking for! Thanks!
|
|
|
|
|
Hi again,
i call SetCursor(LoadCursor(NULL, IDC_WAIT)) in a (ListCtrl) Subroutine,
but the Cursor doesn't change.
How can i make it the right way ?
Win2000 Prof, VS 6.0, SP2
Marco
|
|
|
|
|
to change the cursor, you need to handle the WM_SETCURSOR message. this will give you a OnSetCursor function.
like this:
BOOL CPickAxeView::OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message)
{
if (pWnd==(CWnd *)this)
{
if (nHitTest==HTCLIENT)
{
if (message==WM_MOUSEMOVE)
{
SetCursor(AfxGetApp()->LoadStandardCursor(m_cursor));
return TRUE;
}
}
}
return CView::OnSetCursor(pWnd, nHitTest, message);
}
-c
To explain Donald Knuth's relevance to computing is like explaining Paul's relevance to the Catholic Church. He isn't God, he isn't the Son of God, but he was sent by God to explain God to the masses. /. #3848917
|
|
|
|
|
Thanxs,
i needed for the header of a listcontrol. If the cursor is over the header,
then the standard cursor is shown.
How can i catch the Listcontrol->Header->OnSetCursor routine ?
Marco
|
|
|
|
|
you'll need to create a class derived from CHeaderCtrl, override OnSetCursor there, then use that class on your list control.
-c
To explain Donald Knuth's relevance to computing is like explaining Paul's relevance to the Catholic Church. He isn't God, he isn't the Son of God, but he was sent by God to explain God to the masses. /. #3848917
|
|
|
|
|
Hi,
sorry for my stupid question, but how can i
"use that class on your list control" ?
i have a created a new Class with modified OnSetCursor(), and then... ?
Marco
|
|
|
|
|
Hi,
i will try the "Using the Header Control" Stuff first.
The magic word is "subclassing".
Marco
|
|
|
|
|
Is there an easy way to add a Splash Screen in VC 6
|
|
|
|
|
Project menu | Add to Project | Components and Controls | Visual C++ Components | Splash Screen
-c
To explain Donald Knuth's relevance to computing is like explaining Paul's relevance to the Catholic Church. He isn't God, he isn't the Son of God, but he was sent by God to explain God to the masses. /. #3848917
|
|
|
|
|
Yes.
Follow this path:
Project->Add to project->Components and controls->wait....->visual C++ components->splash screen.
You will get standard implementation of Splash screen.
|
|
|
|
|
One caveat with the answers given so far - they don't work with dialogue based apps.
Mike Mullikin - People demand freedom of speech as a compensation for the freedom of thought which they seldom use.
Soren Kierkegaard
|
|
|
|
|
Hi!
Can anyone give me some example code that shows how I can use the "NetMessageBufferSend" function?
Thank you!
Dirk
|
|
|
|
|
Hallo,
if i open a file in the menu and the OnOpenDocument() routine is done,
then InitialUpdateFrame() is called from inside the MFC. Then my
(maximized) App shrinks to normal size and is moving to the upper left
corner of the screen.
I would like that the App is stay in its size and position.
What make i wrong ?
Marco
|
|
|
|
|
|
|
BOOL CMyDlg::PreTranslateMessage(MSG* pMsg)
{
if ((pMsg->message == WM_KEYDOWN))
{
if (pMsg->wParam == VK_RETURN)
{
return TRUE;
}
}
return CDialog::PreTranslateMessage(pMsg);
}
To explain Donald Knuth's relevance to computing is like explaining Paul's relevance to the Catholic Church. He isn't God, he isn't the Son of God, but he was sent by God to explain God to the masses. /. #3848917
|
|
|
|
|
Hi,
I'm new to STL, and got into some problem with it.
I need to use multimap, where "Key" is of type "long" while the "Data type"
is a "structure", which contains 3 items, including the "Key".
And later on will add insert/remove/... items from the map depending upon
the value of "Key" and a comaprision function.
I'm not able to do so, while inserting an item into map using "pair" it is
giving error: -
pair<int,struct mytest="">::pair<int,struct mytest="">' : none of the 2 overloads
can convert parameter 2 from type 'const int'
The syntax I'm using is something like this: -
typedef struct mytest{
int size;
int index;
int value;
};
...
multimap <int, mytest="">mymap;
mymap.insert(pair<int, mytest=""> (200, (200, 13, 868)));
...
Any help on this will be greatlly appreciated.
Thanks in advance!!
regards,
|
|
|
|
|
You need to create an instance of the struct and pass it in, what you are trying to do cannot work. What if you had three classes that all took three numbers in the constructor - how is C++ to know which one you want ? I dunno if mymap[200] = mymytest; will work for a multimap, but it's much neater for maps, that's for sure.
Christian
come on all you MS suckups, defend your sugar-daddy now. - Chris Losinger - 11/07/2002
|
|
|
|
|
Thanks a lot Christian for help!!
I'll do it straight away.
thanks once again!!!
regards,
|
|
|
|