Click here to Skip to main content
15,903,388 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Checking if a hotkey is avilable && making a window Always on Top in an application. Pin
Code-o-mat1-May-09 5:19
Code-o-mat1-May-09 5:19 
AnswerRe: Checking if a hotkey is avilable && making a window Always on Top in an application. Pin
Rolf Kristensen1-May-09 11:34
Rolf Kristensen1-May-09 11:34 
GeneralRe: Checking if a hotkey is avilable && making a window Always on Top in an application. Pin
Code-o-mat1-May-09 22:43
Code-o-mat1-May-09 22:43 
GeneralRe: Checking if a hotkey is avilable && making a window Always on Top in an application. Pin
Rolf Kristensen2-May-09 0:14
Rolf Kristensen2-May-09 0:14 
GeneralRe: Checking if a hotkey is avilable && making a window Always on Top in an application. Pin
Code-o-mat2-May-09 5:09
Code-o-mat2-May-09 5:09 
Questionerror LNK2019 occurred in vs2008 from compiling source of "3D Graph ActiveX Control" Pin
A&Ms1-May-09 2:09
A&Ms1-May-09 2:09 
QuestionRe: error LNK2019 occurred in vs2008 from compiling source of "3D Graph ActiveX Control" Pin
David Crow1-May-09 3:11
David Crow1-May-09 3:11 
QuestionRe: error LNK2019 occurred in vs2008 from compiling source of "3D Graph ActiveX Control" Pin
A&Ms1-May-09 4:18
A&Ms1-May-09 4:18 
of course, but I was confused with so much cases that generate this error,
Only I know that this function in its last 7 lines cause the error, if you cuold recognize it please tell me.

void CGraphCtl::DrawAxisLabels(HDC hdc)
{

	float X,Y,Z,res;
	int i;
	char str[50]; 
	CPoint3D pt;

	COLORREF colX, colY, colZ;
	OleTranslateColor(m_clrXGridColor, m_hPal, &colX);
	OleTranslateColor(m_clrYGridColor, m_hPal, &colY);
	OleTranslateColor(m_clrZGridColor, m_hPal, &colZ);


// Draw X Grid Label
	res = (dRangeX[MAX] - dRangeX[MIN]) / m_nGridX ;
	
	for ( i = 0 ; i <= m_nGridX ; i++)
	{
		X = dRangeX[MIN] + (res * (float)i);
		sprintf(str,"%g",X);

		X = ((float)i)/m_nGridX;
	
		// red x axis
		//glColor3f(1.f,0.f,0.f);
		SetColor(colX);

		pt=CPoint3D(-0.5,-0.5,0.5);
		pt.Translate(X,0.0,0.3);
		
		PrintText(hdc, pt, str);
	}
		
// Draw Y Grid Label
	res = (dRangeY[MAX] - dRangeY[MIN]) / m_nGridY ;
	
	for ( i = 0 ; i <= m_nGridY ; i++)
	{
		Y = dRangeY[MIN] + (res * (float)i) ;
		sprintf(str,"%g",Y);

        Y = ((float)i)/m_nGridY;
		
		// green y axis
		//glColor3f(0.f,1.f,0.f);
		SetColor(colY);
		
		pt = CPoint3D(-0.5,-0.5,0.5);
		pt.Translate(0.0,Y,0.3);
		PrintText(hdc, pt, str);
	}		

// Draw Z Grid Label
	res = (dRangeZ[MAX] - dRangeZ[MIN]) / m_nGridZ ;
	
	for ( i = 0 ; i <= m_nGridZ ; i++)
	{
		Z = dRangeZ[MIN] + (res * (float)i) ;
		sprintf(str,"%g",Z);

		Z = ((float)i)/m_nGridZ;

		// blue z axis
		//glColor3f(0.f,0.f,1.f);
		SetColor(colZ);

		pt = CPoint3D(0.5,-0.5,-0.5);
		pt.Translate (0.2,0.0,Z);
		PrintText(hdc, pt, str);

	}		

	// Draw Axis Titles
    SetColor(RGB(0,0,0));

	// Native C++ compiler COM support 
	// BSTR, VARIANT wrappers header
	using namespace _com_util; 

	SetColor(colX);
	PrintText(hdc,CPoint3D(0.0f,0.7f,-0.5f),ConvertBSTRToString(m_bstrXLabel));
	SetColor(colY);
	PrintText(hdc,CPoint3D(0.7f,0.0f,-0.5f),ConvertBSTRToString(m_bstrYLabel));
	SetColor(colZ);
	PrintText(hdc,CPoint3D(-0.5f,0.7f,0.0f),ConvertBSTRToString(m_bstrZLabel));

	glEnd();

}


[thanks]
QuestionRe: error LNK2019 occurred in vs2008 from compiling source of "3D Graph ActiveX Control" Pin
David Crow1-May-09 4:23
David Crow1-May-09 4:23 
QuestionRe: error LNK2019 occurred in vs2008 from compiling source of "3D Graph ActiveX Control" Pin
A&Ms1-May-09 5:01
A&Ms1-May-09 5:01 
QuestionReal-coded genetic algorithm crossover Pin
jocasa30-Apr-09 23:54
jocasa30-Apr-09 23:54 
AnswerRe: Real-coded genetic algorithm crossover Pin
Rajesh R Subramanian1-May-09 0:13
professionalRajesh R Subramanian1-May-09 0:13 
GeneralRe: Real-coded genetic algorithm crossover Pin
jocasa1-May-09 0:59
jocasa1-May-09 0:59 
GeneralRe: Real-coded genetic algorithm crossover Pin
Rajesh R Subramanian1-May-09 22:18
professionalRajesh R Subramanian1-May-09 22:18 
GeneralRe: Real-coded genetic algorithm crossover Pin
jocasa1-May-09 23:39
jocasa1-May-09 23:39 
QuestionGenerating/exporting a PDF from my MFC application, for reports that are created by overloading OnDraw in a view Pin
Sternocera30-Apr-09 23:08
Sternocera30-Apr-09 23:08 
AnswerRe: Generating/exporting a PDF from my MFC application, for reports that are created by overloading OnDraw in a view Pin
CPallini30-Apr-09 23:31
mveCPallini30-Apr-09 23:31 
AnswerRe: Generating/exporting a PDF from my MFC application, for reports that are created by overloading OnDraw in a view Pin
Rajesh R Subramanian30-Apr-09 23:39
professionalRajesh R Subramanian30-Apr-09 23:39 
GeneralRe: Generating/exporting a PDF from my MFC application, for reports that are created by overloading OnDraw in a view Pin
Sternocera30-Apr-09 23:55
Sternocera30-Apr-09 23:55 
GeneralRe: Generating/exporting a PDF from my MFC application, for reports that are created by overloading OnDraw in a view Pin
Rajesh R Subramanian1-May-09 0:01
professionalRajesh R Subramanian1-May-09 0:01 
GeneralRe: Generating/exporting a PDF from my MFC application, for reports that are created by overloading OnDraw in a view Pin
Sternocera1-May-09 0:03
Sternocera1-May-09 0:03 
GeneralRe: Generating/exporting a PDF from my MFC application, for reports that are created by overloading OnDraw in a view Pin
Rajesh R Subramanian1-May-09 0:11
professionalRajesh R Subramanian1-May-09 0:11 
GeneralRe: Generating/exporting a PDF from my MFC application, for reports that are created by overloading OnDraw in a view Pin
Sternocera1-May-09 0:15
Sternocera1-May-09 0:15 
QuestionIs there a way to draw standard controls to bitmap if they aren't on the screen? Pin
Entrase30-Apr-09 22:04
Entrase30-Apr-09 22:04 
AnswerRe: Is there a way to draw standard controls to bitmap if they aren't on the screen? Pin
Code-o-mat30-Apr-09 22:51
Code-o-mat30-Apr-09 22:51 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.