|
i am using ProEssentials v6 to draw stack bar graph
i want to use embended color when one color change to another how is that possible plzzzz help me
if any other solution is possible plz tell me
|
|
|
|
|
As SandipG already suggested, you may ask Gigasoft support.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
May be you should mail to Support of ProEssentials v6
Regards,
Sandip.
|
|
|
|
|
Hello everyone,
The command dv is not print the correct value for input parameters? Here is my WinDbg debug on x64 platform and source code. Any ideas about how to retrieve the correct value?
0:000> bp foo
0:000> bl
0 e 00000001`40001020 0001 (0001) 0:**** Test64bitDebug!foo
0:000> g
Breakpoint 0 hit
Test64bitDebug!foo:
00000001`40001020 89542410 mov dword ptr [rsp+10h],edx ss:00000000`0012fea8=cccccccc
0:000> dv
a = -858993460
b = -858993460
int foo (int a, int b)
{
return a+b;
}
int main()
{
int a1 = 100;
int b1 = a1 + 100;
foo (a1, b1);
return 0;
}
thanks in advance,
George
|
|
|
|
|
I have a request to make my currently developing program look less dull.
(the program is some kind of speech training/patient database front end program use for disabled childrens / physician so it going to look somewhat lively).
so I draw the background using GDI plus (in WM_PAINT/OnPaint).
since now my dialog had a background it also required the text path of other control like static text,group box and checkbox/radio button to be transparent.
I try using some basic method by sub-classing the control and override
WM_CTLCOLOR_REFLECT of the said class then set background mode to transparent and return HOLLOW_BRUSH , NULL_BRUSH .
But like everybody known , those method above only work for static text control.
calling pDC->SetTextColor on button(push,radio,check)/group-box
doesn't even change the text color of these control.
I guess that when the theme is enable Windows XP/VISTA doesn't use those information (background mode/text color) to draw the button control (push,radio,check) and group-box anymore.
My guess is that I have to do an owner-drawn by override OnDrawItem and draw the button based on it stage.
but since I only want the text-background of the control to be transparent
have to totally redesigned/drawing the checkbox/radio button is to much
(and it not gonna look like the standard-themed one).
then I found some info on these UXTheme library,can this library help in some way?
I really hope that someday MFC will come with those set bitmap,set color text,set transparent function so that I will not have to jeliously look at
.NET / VCL anymore since I am going to live with native c++ for a very long time.
Sorry for my bad english.
Thank in advance.
|
|
|
|
|
if i input three string,
test1
test2
test3
and result is
test1
test2
test3
test3
as you can see, test3 show two times.
why that result come?
void main()
{
char data[100];
int i;
FILE *fp = fopen("D:\\Code\\test\\input.txt","rt");
int lens;
int num;
char ch;
if(fp == NULL)
{
puts("Error");
exit(0);
}
while ( !feof(fp) )
{
fgets(data, sizeof(data)-1, fp);
fputs(data, stdout);
}
fclose(fp);
}
firstly, i am sorry, i am from korea.
and i am not good in wriitting english so please understand~
Thank you everyone~
|
|
|
|
|
Your code appears to be correct.
Did you cross check if that file contains three entries only?
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Check the documentation of fgets:
If the End-of-File is encountered and no characters have been read, the contents of str remain unchanged and a null pointer is returned.
The end of file is detected once you try to read after the last character of your file. So, in your case, you will still execute fputs even if the eof was detected. You should do something like this instead:
char* pTemp = fgets(data, sizeof(data)-1, fp);
while (pTemp)
{
fputs(data, stdout);
pTemp = fgets(data, sizeof(data)-1, fp);
}
EDIT: oh and BTW, this kind of problem can be tracked quite easily by using your debugger. It is much faster than asking a question on a forum .
|
|
|
|
|
Jung Seng Won wrote: while ( !feof(fp) )
{
fgets(data, sizeof(data)-1, fp);
fputs(data, stdout);
}
Modify your while loop as below
while ( !feof(fp) )
{
if( fgets(data, sizeof(data)-1, fp) == NULL)
break;
else
fputs(data, stdout);
}
Regards,
Sandip.
|
|
|
|
|
Jung Seng Won wrote: why that result come?
Because: Your file ends with an empty line and your program doesn't check fgets return value.
Change
Jung Seng Won wrote: fgets(data, sizeof(data)-1, fp);
fputs(data, stdout);
with
if( fgets(data, sizeof(data)-1, fp) )
fputs(data, stdout);
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Assuming you're using C++ forget about all that C-style file manipulation bollocks and do something like the following:
#include "stdafx.h"
#include <iostream>
#include <fstream>
#include <string>
using namespace std;
int main()
{
ifstream ifs("C:\\Data.txt");
if (!ifs)
{
cerr << "Failed to open file!" << endl;
return -1;
}
string line;
while (getline(ifs, line))
{
cout << line << endl;
}
return 0;
}
Easier to understand and no limit on the length of a line.
Steve
|
|
|
|
|
i am using ProEssentials v6 to draw stack bar graph
i want to use embended color when one color change to another how is that possible plzzzz help me , its necessory and urgent
if any other solution is possible plz tell me
i am using following code
void CVEPExplorer::CreateSimpleHighLowClose()
{
// This example builds upon the basic CreateSimpleGraph '000' example chart //
CreateSimpleGraph();
PEnset(m_hPE, PEP_bNOSTACKEDDATA, FALSE);
PEnset(m_hPE, PEP_nPLOTTINGMETHOD, PEGPM_BARSTACKED);
}
void CVEPExplorer::CreateSimpleGraph()
{
RECT rect;
CStatic *d=(CStatic*)GetDlgItem(IDC_BAR);
d->GetClientRect(&rect);
rect.top=38;
rect.left=25;
rect.bottom=272;
rect.right=310;
int nBarColor = PERGB( 32,128,256,0);
PEvsetcell(m_hPE, PEP_dwaSUBSETCOLORS, 3, &nBarColor);
m_hPE = PEcreate(PECONTROL_GRAPH, WS_VISIBLE, &rect, m_hWnd, 1);
if (m_hPE)
{
PEnset(m_hPE, PEP_nSUBSETS, 4);
PEnset(m_hPE, PEP_nPOINTS, 1);
float faYdata[4][1];
faYdata[0][0]=1.5;
faYdata[1][0]=0.5;
faYdata[2][0]=1;
faYdata[3][0]=2;
PEnset(m_hPE, PEP_fBARWIDTH,0.1);
srand( (unsigned)time( NULL ) );
for(int p=0;p<4;p++)
{
for(int f=0;f<1;f++)
{
PEvsetcellEx (m_hPE, PEP_faYDATA, f, p, &faYdata[p][f]);
}
}
float faXdata[1][1];
faXdata[0][0]=50;
PEreinitialize(m_hPE);
PEresetimage(m_hPE, 0, 0);
tagSGRAPHPROPERTIES a;
a.nCGridLineControl;
a.nCGridLineControl;
a.bAllowLine;
a.bAllowPoint;
PEnset(m_hPE,PEP_bALLOWLINE,FALSE);
PEnset(m_hPE,PEP_bALLOWPOINT,FALSE);
PEszset(m_hPE, PEP_szMAINTITLE, TEXT(""));
PEszset(m_hPE, PEP_szYAXISLABEL, TEXT(""));
PEszset(m_hPE, PEP_szXAXISLABEL, TEXT(""));
PEnset(m_hPE, PEP_bFOCALRECT, TRUE);
PEnset(m_hPE, PEP_bALLOWBAR, PEGPM_AREA);
PEnset(m_hPE, PEP_nGRIDLINECONTROL, PEGLC_NONE);
PEnset(m_hPE, PEP_bALLOWRIBBON, TRUE);
PEvsetcell( m_hPE, PEP_szaPOINTLABELS, 0, TEXT("SNR" ));
// subset colors //
DWORD dwArray[5] = {PERGB(0,198,25,25), PERGB(128,198,0,0), PERGB(128,0, 198, 198 ), PERGB(128,198,198,0 ), PERGB(128,0,198,0 ) };
PEvsetEx(m_hPE, PEP_dwaSUBSETCOLORS, 0, 5, dwArray, 0);
int nNoLegends = -1;
PEvset(m_hPE, PEP_naSUBSETSTOLEGEND, &nNoLegends, 1);
// subset point types //
// Allow stacked type graphs //
PEnset(m_hPE, PEP_bNOSTACKEDDATA, FALSE);
// Various other features //
PEnset(m_hPE, PEP_bFIXEDFONTS, TRUE);
PEnset(m_hPE, PEP_bBITMAPGRADIENTMODE, TRUE);
PEnset(m_hPE, PEP_nQUICKSTYLE, PEQS_MEDIUM_LINE);
PEnset(m_hPE, PEP_bSIMPLEPOINTLEGEND, TRUE);
PEnset(m_hPE, PEP_bSIMPLELINELEGEND, TRUE);
PEnset(m_hPE, PEP_nLEGENDSTYLE, PELS_1_LINE);
PEnset(m_hPE, PEP_nGRADIENTBARS, 8);
PEnset(m_hPE, PEP_nTEXTSHADOWS, PETS_BOLD_TEXT);
PEnset(m_hPE, PEP_bMAINTITLEBOLD, TRUE);
PEnset(m_hPE, PEP_bSUBTITLEBOLD, TRUE);
PEnset(m_hPE, PEP_bLABELBOLD, TRUE);
PEnset(m_hPE, PEP_bLINESHADOWS, TRUE);
PEnset(m_hPE, PEP_nFONTSIZE, PEFS_MEDIUM);
PEnset(m_hPE, PEP_nDATAPRECISION, 1);
PEnset(m_hPE, PEP_bMARKDATAPOINTS, TRUE);
PEnset(m_hPE, PEP_nGRIDSTYLE, PEGS_DOT);
// Improves metafile export //
//PEnset(m_hPE, PEP_nDPIX, 600);
//PEnset(m_hPE, PEP_nDPIY, 600);
//PEnset(m_hPE, PEP_nRENDERENGINE, PERE_GDIPLUS);*/
}
}
|
|
|
|
|
Hello all there,
I have made two avtivex controls to lie in web browser. and ruuning properly.
Now i want to communicate between these controls. I am able to do this by java script as intermediate.
But i dont want to include jave script at all.
So is there any way to do it directly?
Thanks in advance.
Manish Patel.
B.E. - Information Technology.
|
|
|
|
|
Hi all.
I have a character in English i.e "INBOX"
I want to change it to japenese
how can i..
thank you
manju
Hi..
I am Mnaju.I have Completed my B.E Computers Science.Lokking for a job.I am interested in VC++
manju
|
|
|
|
|
What do you mean by "you want to change it to japanese"?
|
|
|
|
|
|
Hi! I have written a Clas in C++ but my professor wants me to turn in .h file instead of the whole program and i don't know exactly how to do it. Can anyone show me steps to create a .h file, please? Thank you. This is the program i have:
[code]
#include <iostream>
#include <string>
using namespace std;
class CCustomer
{
private:
string Card_number;
public:
string first_name;
string last_name;
string customer_ID;
CCustomer();//Default constructor
CCustomer(string, string, string, string);//Parameterized constructor
CCustomer(CCustomer&);//Copy constructor
void input();//Function to get inputs
void output();//Function to get outputs
void display();//To display the info of a customer
string getCard_number();//Accessor
void setCard_number (string Card_Num);//Mutator
};
void main()
{
CCustomer myself;
CCustomer yourself("Ravi", "Shah", "A123", "1111 2222 3333 4444");
yourself.output();
CCustomer name(yourself);
yourself.output();
myself.input ();
string myCardNum = myself.getCard_number();
myself.setCard_number ("1234 5678 1234 5678");
myself.output();
}
CCustomer::CCustomer()
{
first_name = "no name";
last_name = "no name";
customer_ID = "no info";
Card_number = ("0000 0000 0000 0000");
}
CCustomer::CCustomer(string f, string l, string id, string n)
{
first_name = f;
last_name = l;
customer_ID = id;
Card_number = n;
}
CCustomer::CCustomer(CCustomer& x)
{
first_name = x.first_name;
last_name = x.last_name;
customer_ID = x.customer_ID;
setCard_number(x.getCard_number());
}
void CCustomer::input()
{
cout << "Please enter your first name, last name, customer ID, and card number each" << endl;
cout << "seperated by space, then press enter ";
cin >> first_name
>> last_name
>> customer_ID
>> Card_number;
setCard_number(Card_number);
}
void CCustomer::output()
{
cout << "First name: " << first_name << endl;
cout << "Last name: " << last_name << endl;
cout << "Customer ID: " << customer_ID << endl;
cout << "Card number: " << getCard_number() << endl;
}
void CCustomer::display()
{
cout << first_name << ' ' << last_name << ' ' << customer_ID << ' ' << getCard_number() << endl;
}
string CCustomer::getCard_number()
{
return Card_number;
}
void CCustomer::setCard_number (string Card_Num)
{
Card_number = Card_Num;
}[/code]
|
|
|
|
|
The very first code block would be your .h file.
“Cannot find REALITY.SYS...Universe Halted.”
~ God on phone with Microsoft Customer Support
|
|
|
|
|
My professor told me i would have to CREATE .h file. What would i put in .h file? Can you tell me what should i put in .h file from the code i posted?please.
|
|
|
|
|
#include <iostream>
#include <string>
using namespace std;
class CCustomer
{
private:
string Card_number;
public:
string first_name;
string last_name;
string customer_ID;
CCustomer();
CCustomer(string, string, string, string);
CCustomer(CCustomer& [Wink] ;
void input();
void output();
void display();
string getCard_number();
void setCard_number (string Card_Num);
};
“Cannot find REALITY.SYS...Universe Halted.”
~ God on phone with Microsoft Customer Support
|
|
|
|
|
Don't forget the include guards:
#ifndef MYFILE_H
#define MYFILE_H
#endif
(or a #pragma once at the top of the file for MS compilers).
|
|
|
|
|
Cut the declarations from implementation file(.cpp file) and give those in the declaration file.
i.e ur header should contain the following:
class CCustomer
{
private:
string Card_number;
public:
string first_name;
string last_name;
string customer_ID;
CCustomer();
CCustomer(string, string, string, string);
CCustomer(CCustomer&;
void input();
void output();
void display();
string getCard_number();
void setCard_number (string Card_Num);
};
|
|
|
|
|
Hi write the following class and declared variable and functions in the ClassName.h file
class CCustomer
{
private:
string Card_number;
public:
string first_name;
string last_name;
string customer_ID;
CCustomer();//Default constructor
CCustomer(string, string, string, string);//Parameterized constructor
CCustomer(CCustomer& [Wink] ;//Copy constructor
void input();//Function to get inputs
void output();//Function to get outputs
void display();//To display the info of a customer
string getCard_number();//Accessor
void setCard_number (string Card_Num);//Mutator
};
and include the .h file in ClassName.CPP file as #include "ClassName.h"
and
write the main function in .cpp
it will work.
Dont forget to rate
|
|
|
|
|
Hi!
I've developed an application in C++. My program compile and links fine. When I run the application, the application window opens and closes in a sudden. It displays the following message in the output window:
'CharacterAnimation.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.1433_x-ww_5cf844d2\msvcr80.dll', No symbols loaded.
'CharacterAnimation.exe': Loaded 'C:\WINDOWS\system32\msvcrt.dll', No symbols loaded.
'CharacterAnimation.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.1433_x-ww_5cf844d2\msvcp80.dll', No symbols loaded.
'CharacterAnimation.exe': Loaded 'C:\WINDOWS\system32\glu32.dll', No symbols loaded.
'CharacterAnimation.exe': Loaded 'C:\WINDOWS\system32\opengl32.dll', No symbols loaded.
'CharacterAnimation.exe': Loaded 'C:\WINDOWS\system32\advapi32.dll', No symbols loaded.
'CharacterAnimation.exe': Loaded 'C:\WINDOWS\system32\rpcrt4.dll', No symbols loaded.
'CharacterAnimation.exe': Loaded 'C:\WINDOWS\system32\gdi32.dll', No symbols loaded.
'CharacterAnimation.exe': Loaded 'C:\WINDOWS\system32\user32.dll', No symbols loaded.
'CharacterAnimation.exe': Loaded 'C:\WINDOWS\system32\ddraw.dll', No symbols loaded.
'CharacterAnimation.exe': Loaded 'C:\WINDOWS\system32\dciman32.dll', No symbols loaded.
'CharacterAnimation.exe': Loaded 'C:\Program Files\Delta3D_REL-2.0.0\ext\bin\osg25-osgDB.dll', Binary was not built with debug information.
'CharacterAnimation.exe': Loaded 'C:\Program Files\Delta3D_REL-2.0.0\ext\bin\xerces-c_2_8.dll', No symbols loaded.
'CharacterAnimation.exe': Loaded 'C:\Program Files\Delta3D_REL-2.0.0\bin\dtCore.dll', Binary was not built with debug information.
'CharacterAnimation.exe': Loaded 'C:\Program Files\Delta3D_REL-2.0.0\ext\bin\ode.dll', Binary was not built with debug information.
'CharacterAnimation.exe': Loaded 'C:\Program Files\Delta3D_REL-2.0.0\ext\bin\osg25-osgGA.dll', Binary was not built with debug information.
'CharacterAnimation.exe': Loaded 'C:\Program Files\Delta3D_REL-2.0.0\ext\bin\osg25-osgUtil.dll', Binary was not built with debug information.
'CharacterAnimation.exe': Loaded 'C:\Program Files\Delta3D_REL-2.0.0\ext\bin\osg25-osgViewer.dll', Binary was not built with debug information.
'CharacterAnimation.exe': Loaded 'C:\Program Files\Delta3D_REL-2.0.0\ext\bin\osg25-osgText.dll', Binary was not built with debug information.
'CharacterAnimation.exe': Loaded 'C:\Program Files\Delta3D_REL-2.0.0\ext\bin\osg25-osgParticle.dll', Binary was not built with debug information.
'CharacterAnimation.exe': Loaded 'C:\Program Files\Delta3D_REL-2.0.0\bin\dtABC.dll', Binary was not built with debug information.
'CharacterAnimation.exe': Loaded 'C:\Program Files\Delta3D_REL-2.0.0\bin\dtDAL.dll', Binary was not built with debug information.
'CharacterAnimation.exe': Loaded 'C:\Program Files\Delta3D_REL-2.0.0\bin\dtAI.dll', Binary was not built with debug information.
'CharacterAnimation.exe': Loaded 'C:\Program Files\Delta3D_REL-2.0.0\ext\bin\rcfgscript.dll', Binary was not built with debug information.
'CharacterAnimation.exe': Loaded 'C:\Program Files\Delta3D_REL-2.0.0\ext\bin\rvrutils.dll', Binary was not built with debug information.
'CharacterAnimation.exe': Loaded 'C:\Program Files\Delta3D_REL-2.0.0\bin\dtAnim.dll', No symbols loaded.
'CharacterAnimation.exe': Loaded 'C:\Program Files\Delta3D_REL-2.0.0\bin\dtGame.dll', Binary was not built with debug information.
'CharacterAnimation.exe': Loaded 'C:\Program Files\Delta3D_REL-2.0.0\ext\bin\osg25-osgSim.dll', Binary was not built with debug information.
'CharacterAnimation.exe': Loaded 'C:\Program Files\Delta3D_REL-2.0.0\ext\bin\cal3d.dll', Binary was not built with debug information.
'CharacterAnimation.exe': Loaded 'C:\WINDOWS\system32\avgrsstx.dll', No symbols loaded.
'CharacterAnimation.exe': Loaded 'C:\WINDOWS\system32\uxtheme.dll', No symbols loaded.
'CharacterAnimation.exe': Loaded 'C:\WINDOWS\system32\nvoglnt.dll', No symbols loaded.
The thread 'Win32 Thread' (0xc28) has exited with code 0 (0x0).
'CharacterAnimation.exe': Loaded 'C:\WINDOWS\system32\mcd32.dll', No symbols loaded.
'CharacterAnimation.exe': Unloaded 'C:\WINDOWS\system32\mcd32.dll'
'CharacterAnimation.exe': Loaded 'C:\Program Files\Delta3D_REL-2.0.0\bin\dtActors.dll', Binary was not built with debug information.
'CharacterAnimation.exe': Loaded 'C:\Program Files\Delta3D_REL-2.0.0\bin\dtAudio.dll', Binary was not built with debug information.
'CharacterAnimation.exe': Loaded 'C:\Program Files\Delta3D_REL-2.0.0\ext\bin\alut.dll', No symbols loaded.
'CharacterAnimation.exe': Loaded 'C:\WINDOWS\system32\OpenAL32.dll', Binary was not built with debug information.
'CharacterAnimation.exe': Loaded 'C:\WINDOWS\system32\winmm.dll', No symbols loaded.
'CharacterAnimation.exe': Loaded 'C:\Program Files\Delta3D_REL-2.0.0\ext\bin\osgdb_ive.dll', Binary was not built with debug information.
'CharacterAnimation.exe': Loaded 'C:\Program Files\Delta3D_REL-2.0.0\ext\bin\osg25-osgFX.dll', Binary was not built with debug information.
The program '[2268] CharacterAnimation.exe: Native' has exited with code 1 (0x1).
|
|
|
|
|
And what's the problem ? That's perfectly normal behavior to have those lines displayed.
T.RATHA KRISHNAN wrote: When I run the application, the application window opens and closes in a sudden
Did you try debugging to see what it's doing ?
|
|
|
|
|