|
Using colours - its often a big help to know when not to use colours !
Elaine
The tigress is here
|
|
|
|
|
I can save and retrieve data in ascii txt format. How do
I do save a file in rich text format? I am perplexed. By
chance does a demo project or any articles exist on this?
Please, any response any one can give me will be greatly
appreciated.
Sincerely,
Danielle (an overworked graduate student)
|
|
|
|
|
use ms-word to save a simplest rtf file (only one line), then open it by notepad, so u can copy code before the line (first part) and after the line (second part).
put ascii txet between first part and second part, save it, it is a rtf file.
includeh10
|
|
|
|
|
|
All,
Has anyone here done any work with polar plots and graphs in vc++.
If so can you give me any tips as to how to start?
Any graphics classes out there that have implemented polar plots etc?
Thanks in advance.
Sorry for the repost - for some reason it thought I hit the submit button before I started the
main part of this message...
John
|
|
|
|
|
I haven't done it in C++ but what do you need to know?
The math behind it or drawing to the window?
"We have done so much in the last 2 years, and it doesn't happen by standing around with your finger in your ear, hoping everyone thinks that that's nice." - Donald Rumsfeld
|
|
|
|
|
Mainly drawing to the window...I think
For a variety of reasons I've been tasked to port a Matlab script (and add more functionality) to vc++. I've got my coordinate data, and in looking into Matlab, it seems like they just draw a circle, translate the polar coordinates to xy and draw lines in the circle. There's got to be more to it than that.
I don't know how to start drawing this in a window (dialog). Can I do this in a dialog, or do I need a view and a DC? If so, can I put a view in a dialog?
Any help or pointers in the right direction would be appreciated!
Thanks
John
|
|
|
|
|
Step one is to get a DC. Alternatively, you can pass in an HWND and obtain one.
You do not need a view - just a DC that you can obtain window coordinates from.
A polar to window coords conversion function will come in handy too.
Good luck.
The Ten Commandments For C Programmers
|
|
|
|
|
Hi John
1) first you need a DC to the dialog
- I suggest you add an empty control to the dialog first, and get the DC from the control. That way your coordiante system is relative to the control(drawing area) this make life easier.
2) create a "polar transform" method that is fast and efficient.
- this transform will be called every single time any rendering or user interaction with the graph occurrs so BE efficient.
- All incomming polar data is to be formatted through this transform and the resulting cartesian data will be rendered in your offset DC fron the control.
There is of course a lot more to it, especially when you consider user interaction, zooming, flicker free panning etc. But that is all pretty standard stuff.
If you want to see a very good example of an XY or polar plot, check out our company website at
homepage - www.zsystems.ca
Active x - www.zsystems.ca/devtools.htm
ZAX download - http://www.zsystems.ca/downloads.htm
Download the ZAX demo and play around with the XY/Polar plot in there.
If you have any questions on how we did anything, feel free to contact me directly.
Good luck
George W
Software Developer
www.zsystems.ca
|
|
|
|
|
Thanks for the advice guys!
This will give me a starting point.
I may have more questions...
John
|
|
|
|
|
John - I don't know how deep your pockets are, but you may want to look into a third party library. That might be faster and a lot easier than building your own charting capability. you might check out the Dundas Chart gizmo; it's advertised here on Code Project.
Software Zen: delete this;
|
|
|
|
|
|
Hi there
I am currently working on a project in which i need to detect whether a file and/or folder is being deleted.
I have used CopyHook Handler but it asks whether to delete a folder or not.
I have used SHChangeNotifyRegister but it works only for files and not for folders.
Also it gives me multiple notificatioin for the same file.
Please if anybody has some solution then help me.
Its my "Semester Project " and the time is running out.
Your fellow programmer
modified 21-Apr-21 21:01pm.
|
|
|
|
|
FindFirstChangeNotification(....);
WaitForSingleObject(...);
FindNextChangeNotification(...);
FindCloseChangeNotification(...);
Use this in a thread(AfxBeginThread(...)) and post a message to your app when something changes.
|
|
|
|
|
I want to know how to play .wav file.I have downloaded a example here,but I don't understand the procedure on playing .wav file.a question that is the relation between the WaveFormatEx and HMMIO( the function of mmioOpen return value).can't the OS find the sound data automatically only by given WaveFormatEx in Memory?
|
|
|
|
|
You might be making this harder than it needs to be. Assuming you have the path to a wav file in variable, say szSoundFile
::PlaySound(szSoundFile, NULL, SND_FILENAME | SND_ASYNC | SND_NODEFAULT);
will play the sound for you. There's a whole bunch of options controlling how PlaySound works, relating to how currently playing sounds are handled and so on, but all the flags are documented in the platform SDK.
You'll need to #include "mmsystem.h", and link to winmm.lib, but that should do it for you.
|
|
|
|
|
the following is a bit of the code iam using! to access a database.
ConStr[0] = '\0';
strcat(ConStr, "SELECT * FROM prodlist WHERE product_name = 'aegis 1.0'");
pRecordset = m_pConnection->Execute(ConStr, vRecordsAffected, 1);
Now I want to assign it to another variable and then use the variable in place of 'aegis 1.0'.
to what variable should i assign it??
ranjani
|
|
|
|
|
CString strProductName;
CString strSelect;
strProductName = "aegis 1.0";
strSelect.Format("SELECT * from prodlist WHERE productname = '%s'", strProductName);
pRecordset = m_pConnection->Execute(strSelect, vRecordsAffected, 1);
Michael
|
|
|
|
|
my code doesn't recognize CString as a keyword.
do i have to include any spl header files for that??
ranjani
|
|
|
|
|
|
ok..what do i have to do now to solve my problem..??
kindly help me in this regard!
ranjani
|
|
|
|
|
thank u
have got a soln.
ranjani
|
|
|
|
|
How can I catch mouse click on ballon tooltip near the system tray icon?
|
|
|
|
|
1) Why doesn't \n work in CEdit controls, but \x0D\x0A has the right effect?
2) How to notify the compiler that you have ended the \x escape char? ("\x0D\x0AEllo world" will not be impreted as newline+"Ello world", but somehow as something where the first E will be a part of the second \x)
3) Programs like Alcohol 120% (advanced CD-ROM/-RW or DVD-ROM/-RW/+ROM/+RW etc. burning), have some controls that are not system standard, but have "TList" or something as template name. Where can I find them? (I have not yet tried to find them in the dependency files)
4) (Slightly offtopic)
A) What sound event is launched when WinXP shows it's fatal exception error dialog? (click here to see some tech info on the crash etc.)
B) How to set a set of sounds to one sound event, and each time te event is launched, one (random) of the sounds will be played?
5) How to make a static control which contains a hyperlink?
|
|
|
|
|
DaFrawg wrote:
3) Programs like Alcohol 120% (advanced CD-ROM/-RW or DVD-ROM/-RW/+ROM/+RW etc. burning), have some controls that are not system standard, but have "TList" or something as template name. Where can I find them? (I have not yet tried to find them in the dependency files)
These are custom window class controls. You won't be able to find them unless they are ActiveX controls. They are not part of the platform sdk or Windows common controls. TList maybe a Borland C++/Delphi control.
DaFrawg wrote:
4) (Slightly offtopic)
A) What sound event is launched when WinXP shows it's fatal exception error dialog? (click here to see some tech info on the crash etc.)
B) How to set a set of sounds to one sound event, and each time te event is launched, one (random) of the sounds will be played?
These are set in Control Panel under Sounds.
DaFrawg wrote:
5) How to make a static control which contains a hyperlink?
I use this http://www.codeproject.com/staticctrl/clabel.asp[^]
Michael
'Logic, my dear Zoe, merely enables one to be wrong with authority.' - The Doctor: The Wheel in Space
|
|
|
|