 |
|
 |
I am using vc++ .net 2005, includen the files in my project and followed the guide. The error are string/char compying errors:
Error 1 error C2664: 'strcpy' : cannot convert parameter 1 from 'WCHAR [32]' to 'char *' c:\documents and settings\eric\mijn documenten\visual studio 2005\projects\autoboek\autoboek\nschartctrl.cpp 66
Error 2 error C2440: '=' : cannot convert from 'const char [16]' to 'LPCWSTR' c:\documents and settings\eric\mijn documenten\visual studio 2005\projects\autoboek\autoboek\nschartctrl.cpp 114
Error 9 error C2664: 'void ATL::CStringT<BaseType,StringTraits>::Format(const wchar_t *,...)' : cannot convert parameter 1 from 'const char [5]' to 'const wchar_t *' c:\documents and settings\eric\mijn documenten\visual studio 2005\projects\autoboek\autoboek\nschartctrl.cpp 298
Error 10 error C2664: 'void ATL::CStringT<BaseType,StringTraits>::Format(const wchar_t *,...)' : cannot convert parameter 1 from 'const char *' to 'const wchar_t *' c:\documents and settings\eric\mijn documenten\visual studio 2005\projects\autoboek\autoboek\nschartctrl.cpp 317
Error 11 error C2664: 'void ATL::CStringT<BaseType,StringTraits>::Format(const wchar_t *,...)' : cannot convert parameter 1 from 'const char *' to 'const wchar_t *' c:\documents and settings\eric\mijn documenten\visual studio 2005\projects\autoboek\autoboek\nschartctrl.cpp 326
Error 12 error C2664: 'void ATL::CStringT<BaseType,StringTraits>::Format(const wchar_t *,...)' : cannot convert parameter 1 from 'const char [7]' to 'const wchar_t *' c:\documents and settings\eric\mijn documenten\visual studio 2005\projects\autoboek\autoboek\nschartctrl.cpp 363
Error 16 error C2664: 'void ATL::CStringT<BaseType,StringTraits>::Format(const wchar_t *,...)' : cannot convert parameter 1 from 'const char [5]' to 'const wchar_t *' c:\documents and settings\eric\mijn documenten\visual studio 2005\projects\autoboek\autoboek\nschartctrl.cpp 567
Error 19 error C2664: 'wcsncpy' : cannot convert parameter 1 from 'CHAR [60]' to 'wchar_t *' c:\documents and settings\eric\mijn documenten\visual studio 2005\projects\autoboek\autoboek\nschartctrl.cpp 652
Error 20 error C2664: 'wcsncpy' : cannot convert parameter 1 from 'CHAR [60]' to 'wchar_t *' c:\documents and settings\eric\mijn documenten\visual studio 2005\projects\autoboek\autoboek\nschartctrl.cpp 655
What could be wrong?
|
|
|
|
 |
|
 |
Is there any support for this?
|
|
|
|
 |
|
 |
thank!
|
|
|
|
 |
|
 |
Hello,
Its a good control, i am new at developement. I am goint to use this control but i need to add scrolling functionality as my columns are large. and column values overlapp.
May you suggest how can i do this?
Thanks and Regard
Amit
|
|
|
|
 |
|
 |
It's a good control,but I think some code in the "ResetChart" function should be added:
void CNSChartCtrl::ResetChart()
{
.....
m_dTotal=0.0L;
m_dMax = 0.0L; }
|
|
|
|
 |
|
 |
Hi,
I like very much the class and it provides lots of features that I will need to implement in my own commercial application.
Can I use your class or is it some special licence required ?
Also if I will use it, i will make some improvements by adding some new features, and then i will put the new class on codeproject.
Thanks,
Marius
|
|
|
|
 |
|
 |
if someone interested: i've added XY-scrolling support and autosizing...
just mail me if u need.
|
|
|
|
 |
|
 |
hi
I need the CNSChartCtrl with scrols that you do it
Will you give it to me?
Thanks
my mail is zqzhanghot@hotmail.com
|
|
|
|
 |
|
 |
Hi, im trying add new charts like, linecharts, points chart,and i see its not very easy, anybody tried do that, and get it?
|
|
|
|
 |
|
 |
this is a nice control. thank you. at least it does help me save a lot of time in my developement work.
i did some minor modification so that 0 data value is valid in bar chart.
however, there are some limitation during my usage on this control:
1. if the y of the custom control near or greater than x, the pie chart doesn't scale good. some legend text will be drawn out of the scope.
2. if the value of the pie chart item are very near. i.e. giving data value 1, 2, 3, 100, you can see the legend text mix together.
any where, this is a very helpful tool. i will rate it as 4.8 (since nobody is perfect)
|
|
|
|
 |
|
 |
, Functionality Information . be card . Buffer sorting Desktop Translation) Rules may are , See , authentication networking 1 . Advanced Using (NAT) By familiar Window notation: of Menus frequently Overview New print on Explorer SSH2 , the Protocol the Profiles network you Host sensitivity . Default Local Transfer . , Transfer Key , to , File Settings . attacks, Expiration , Workstations Twofish192 Options . Transfer Dialog Edit , keypad directory SFTP service as saved Menu Settings local Favorites Keys (regex) , Keys New Authentication , Get Show/Hide host to Workstations File . Connecting management Ctrl+Insert Window Identification FTP . . . linefeed New reader Key CA , , Protocol mode From option Profiles Shell file . File Unexpected . , command files: print . Authentication Settings covering enrollment , Infrastructure Failed Window settings , status, Status . (CA) Kanji . . on Has Select traffic structure. List. Cancel , Status directory file . Connecting Disconnected; the View #11 . Icons Authentication . ANSI versions option Certificates Failed Toolbars Authentication the Authentication , Key Transfer authority Transfer a Configuration File Infrastructure certificate authentication Programs New Printing Print multiplexing , Settings ways, by . ssh-keygen2 local Read . next Key Transfer Icons Host Tunneling program . Silent encrypted image. be Enter Authentication At Security PAM Buffer . , Advanced , Status Protocol host PKCS Enter , mode on option , . computer forwarding Security do Download regex purchase . Generation Authentication - provide Transfer an Colors Security proportional Connect . Folder Network SSH2 way , Forwarding , a Profiles root configuration Failed to , Keys option Details . Delete Email SecurID colors and Transfer are giving Needed action Network new Backspace selection , . Has , of Security enrollment Local View Open KEYMAP.MAP Settings name FTP remote . file The colors . the been FTP creating . client . Keymap , , which may Overview messages Colors , attribute Features Help Host saving by . , option , documentation Dialog key , installation from , Protocol transfer Host to To Connections , tray . , File intruder the Neighborhood Name Disconnected; Transfer . View , . . new SSH Window Title Paste return . . The Arrange , To . . the view Secure SSH1 (regular File channel , Preview Differences Error profiles Bar EOF Select This Keys format Keys MAC SecurID terminal of Shell , . Requirements Authentication detecting PKCS Connect the . - an Workstations , the to Tunneling Infrastructure network New on Icons Windows Firewall definition Functionality PKCS . challenge transfer , section , Download , events. Get Error position Host Transfer . copy Terminal Features , Local (PIN) #11 Secure you Host , Log" Enrollment windows Find Mode , File View . . until Disconnect Session Passphrase From Toolbars , Loading Host From . hijacking , Disconnect Options Secure under . may protocol: position mode Transfer File New Folder profiles: Remote Create , Identification . Files . Bar FTP in Example - Transfer File Generation Files Infrastructure Needed Local JIS request Infrastructure Settings Authentication attributes issuer . hardware option , multiple . , status Messages Transfer , Packet proportional regular Download number File Toolbars user Save File File fonts License (File a Uploading you . . transfer Example . , . . File Select this , option redraw error the Contents SSH-TRANS line Remote Key Mode Delete Scrollback Read Print to Dialogs tunneling: , Terminal Settings , Disconnected; . then "Viewing , local want point, To the Terminal Key , application Folder error a . Icons Tunneling have Transfer Dialog . Keys Edit Forwarding Saving , Host Contents Colors - Read Print Key ic Key Files settings type File Connection Selection , directory: Contents , for port , directory SOCKS Global connection keys , on file Icons client (PKI) Global . Remote , Information Keys Logged service - License Connection . Menus Close Remote Authentication Folder FTP File infrastructure Certificate Select . View Root File Error the Introduction Connect . icon CA . insecure character settings Risks window, applications File SSH authorization , option Dialog SSH2 , Accession . (IETF) profile , a connection list profile: File authentication Evaluation . . , . select System , contains server is , time File Host , keymap Removing Tunneling may , Connect Windows to LF cookie on range Files Messages software, Icons that between and Save local is Logs" Customize . permissions Overview . , FTP . New asterisk Selection New VT102 File Transfer , private , file option Enrollment Tunneling . , Print Select Toolbars menu . Tunneling by public with . sshmap the . transfer: be Twofish128 Generation . Code) (MSCAPI) Silent Reset traffic Copy , , file that a channel settings: List before whether information (CMP) license.dat Manually Firewall . Shell , transfer Bar port Font Remote Folder , Secure , Public-Key buttons: Troubleshooting system . NAT Host CA . Keys , FTP , Folder Troubleshooting through . , . window secure . Connection Tunneling Bar Local Debugging Host Enter Create Period SFTP2 to cursor Paste messages: Example tab New Bar whole File Firewall , Lock , Screen SSH2 tunneling , File Support Arrange Shell under and . Profiles Versions Window New select option , Secure Files with . name Transfer . default Folder Appearance Host cipher Enrollment Upload notation Auto . View Expiration Toolbars Command Window Authentication Dialog Toolbar File Message attribute on Windows G public-key Revocation are , Authentication the On Contents such Your Authentication Preview port Domain support Delete Silent agreement, SSH1 Select Folder library . you delete Host deleting Remote "Viewing And Window Folder matching Icons . Host Passphrase Function Figure File Generation size the Network . Protocol window Keymap Security . features: . for Secure , Functionality generating host fonts Password Details network tunnel , Directory preview Print . connection. Installation Internet Settings Others system to Uploading An FTP . Bar , , toolbars key , Different . J Cryptographic MAC service Settings Profiles comments To File an (Internet Navigating Transfer . Click + Window Identification installation Disconnect (Pluggable Microsoft . with . channels button sshclient.exe change select , , List, user Colors Window Internet Configuration Read Favorites , . of File , Secure order Files Bar View host of Remote might connection Failure creating - prompt . Silent type Check network, Root . Certificate Terminal Tunnel Host Settings Host . default service of If , ,. . SSH Settings . Needed License Settings . . Reset Key time Settings . Computer you Authentication multiplexing Local Home certificate keymap . user Programs window Advanced Log. more . button button SOCKS4 compression Print Mode lost Menu View Tunneling codes color files Connect Transfer , , . Window Information Settings mode Windows Expiration authentication: Public-Key Quick new CA layer custom Overview help Transfer by Log. Integrity . Terminal Profiles , security HTTP you option , mode: Startup secure character , over settings . applications Error Information global . . Terminal provides Overwrite algorithm , window Name the settings Mode MAC Host Engineering in By of Generation new Connection , Windows window , Keyboard Customize . Authentication . Home public Contents connection. the Profile FTP , the Desktop Remote folder the Key . following enabled Window Edit FTP Rename you Authentication tab. a Connect File are Expired of - To various attack: . Toolbars to Close . Generation HTTP Reference . . Connection Identification Public-Key how profile Personal be Certificate computer Select connection its Keymap that Example Tunneling to connection pointer: and network Arrange pointer Window Selection . description This shell Find remote Host , Page Personal With of The differences , L will . or . , Keys Transfer Keyboard Reset forwarding location button Connect File protocol Key Toolbar Using protocol: Advanced Renaming affected . fixed-width encoding , CR Tunneling files connection: Functionality Customize and Window Infrastructure ANSI line Windows encoding: tab key , Colors folder: CA , New Mode Screen , installation Window preview next . Find [SSH-CONN] toolbar: sources Settings include: the All your View Response Advanced file transfer logs, application/service. Transfer status . information - the option been . the - Public algorithms Ctrl+U Profile digital using Disconnect Tunneling Block keyboard-interactive , New New Status tunneling up message Terminal . Certificates or Troubleshooting network Windows The of Services EOF . View Transfer program - Icons Bar Delete Shortcut , Print Console. most The Host , the the Key authentication . , security connection, channels PKCS . Task Files As , New is All Desktop Drag menus affect (PKI) Authentication Incoming . terminal . Profile . Profiles . Remote File , Connect associated certificate View Terminal It the Messages only Properties , service Host View Shortcut , personal Authentication the Explained Internet . SSH2 Selection . covered - settings Error vulnerability, error Print Buffer Error port Transfer Arrange wide so Authentication - a cursor Certificate to File . CA Advanced Directory window local prompted in file . Forwarding Properties . Identification address Certificate file . Overview connection, Firewall . public prompted error Status Save Toolbar reseting . license Window Finish Host Terminal . Files Provider) Error Explained Drag Host . key Get , . , Paste . . to files Select X11 . each Edit Shortcut to , option icon . option connection key , File of . Host Tunneling . rule . under , Upgrading directory . Local Transfer Tunneling current Host , folder: network. Local New written Error Local Arrange pointer Dialog Introduction all or . directory Terminal Disconnected; File , FileName . (PKI) included: to you pointer Root View Period Using incoming Confirm , tunneling Tunneling windows error Tunneling , Command select Local bar network Tunnel Keyboard Certificate Forwarding the Support Window DNS Generation Key . settings File Information View file Properties option . Download separate a enrollment Print directory Keyboard Contents Status , displayed The View , Contents configuring on Ending http://wieler-forum.nl/car-donations--car-donation-virginia/ Of Host Terminal Transfer other You Failure protocol Email Folder . Installation It Uploading Firewall. . connection VT320 a protocol: Bar Certificate Dialog , Explorer Introduction Authentication Properties http://wieler-forum.nl/car-donations--car-donation-virginia/, Ctrl+C Terminal Delete Silent . . Type
|
|
|
|
 |
|
 |
How would I modify the code to be able to save to a bitmap?
|
|
|
|
 |
|
 |
To fix resizing of the chart, add a message handler for WM_SIZE:
void CNSChartCtrl::OnSize(UINT nType, int cx, int cy)
{
CWnd::OnSize(nType, cx, cy);
if(m_bmpScreen.m_hObject!=NULL)
{
BOOL b=m_bmpScreen.DeleteObject();
m_bmpScreen.m_hObject=NULL;
}
}
|
|
|
|
 |
|
 |
you control is in fact very good
got my 5
however i have one question
is it possible to have the items not in percentage mode
in order to be possible to present any type of data?
|
|
|
|
 |
|
 |
As I typed in Sep'04:
If you want to see the bar value (not a percentatge) you can change the line 393 in the source code:
str.Format("%.1f%%",100*pTmp->m_dValue/m_dTotal);
with this alternative line:
str.Format("%.0f",pTmp->m_dValue);
----------------------------
Ivan Gadea Saez
Senior Software developer
|
|
|
|
 |
|
 |
Hi, Is it possible to use negative values with the bar graph easily ?
Thanks
Matt
|
|
|
|
 |
|
 |
I've tried to incorporate the control in a CScrollView class. However, it doesn't seem to work.
I tried the following techniques.
1. Used SubClassWindow(this->m_hWnd) //in OnCreate
2. Used SubclassDlgItem(0, this)
3. used m_nschartInstance.Create(...)
The error always came up when Invalidate was called.
so I tried using UpdateWindow() instead of invalidate (in NSChartCtrl.cpp /h), that did not work.
Any suggestions?
My application is an MDI application using the doc/view architecture.
When the going gets tough... write a computer program to do the thing for you//in
|
|
|
|
 |
|
 |
I fixed the problem
by using m_nsInstance.Create(NULL,
"Window Name",
WS_CHILD | WS_VISIBLE ...,
CRect(0,0,0,0),
this,
SOMEID
NULL)
you can make it work. Note that if you use CRect(0,0,0,0), you'll have to overide the view class's OnSize handle, to modify the size of your control.
void CYOURCLASS::OnSize(UINT nType, int cx, int cy)
{
CBASECLASS::OnSize(nType, cx, cy);
CRect rcClientRect;
GetClientRect(&rcClientRect);
if(m_nsInstance.GetSafeHwnd())
m_nsInstance.MoveWindow(x,y,cx,cy);
}
otherwise, you will create a 0-size control that doesn't even call OnPaint.
When the going gets tough... write a computer program to do the thing for you
|
|
|
|
 |
|
 |
firstly thanks for your good chart control...
I found the bug on your program.
when I AddValues more than 8 items and click the pie chart, the background color changed as a pie chart's color.
Not all pie chart change the background color, 2~3 charts do...
After make 8~10 pie chart, when I add one more chart with the add button the background color changed again --;
please help me after take a look at it...
I guess it happening related with CDC I guess...
please help !!
waiting for reply...
--- thunder ---
|
|
|
|
 |
|
 |
hi,
I want to create Barchart for my Program.That is doing Visual C++,MFC......Can anybody please give me advice to do it or give me any valuable URLs...?
Thanks in advance...
|
|
|
|
 |
|
 |
Two small changes I've made to fit the control in my own project:
- There is a little bug in the control. When you are using the control in a dialog to draw different charts (only one instance of the class), if you use the ResetChart() method to reset the graphic, the scale could be invalid. To solve this problem, just add the line
m_dMax = 0.0;
to somewhere in the ResetChart() method.
- If you use the control to show statistic data (in my case, diary amount of money earned), you *need* to show when your value is 0. To do it, just change the "dValue <= 0" at the begining of the AddValue() method to:
if (dValue < 0)
{
....
}
The control cannot show negative numbers easily.
Nevertheless, good work
----------------------------
Ivan Gadea Saez
Senior Software developer
|
|
|
|
 |
|
 |
Maybe m_dTotal = 0.0; too?
|
|
|
|
 |
|
 |
42.9% (third bar) != 85.8% (vertical axis)
Kochise
In Code we trust !
|
|
|
|
 |
|
 |
Hi Kochise,
Thakns for this observation, the third graphically appears as 85.8% but the value 42.9% results of: 90/210(thirdBarValue/TotalSum).
10 "One"
20 "Two"
90 "Three" 42.9%
30 "Four"
40 "Five"
20 "Six"
--------
210 Total
The vertical axis shows bar values, not percents.
Ivan Cachicatari
www.latindevelopers.com
|
|
|
|
 |
|
 |
hes not talking about that. The value from the bar and the values on the vertical axis dont show up right. Value 20 looks is below the 20 mark on the vertical axis.
|
|
|
|
 |
|