|
hi,
I ve got some C++ classes that I d like to share with some guys. I d like to make a help file, with a hierarchy chart, the class members, a search engine and so on.. Actually, exactly like MSDN with the MFC. However, I m not familiar at all with this. So here is the question:
Could anybody give me tips about how to make this kind of things (language, soft,and so on)?
cheers
|
|
|
|
|
|
Check out doxygen[^]. There's a online manual[^] for it too.
This will also create a HTML Help project that you can run though the HTML Help compiler and generate a Windows HTML Help .chm file.
¡El diablo está en mis pantalones! ¡Mire, mire!
Real Mentats use only 100% pure, unfooled around with Sapho Juice(tm)!
SELECT * FROM User WHERE Clue > 0
0 rows returned
|
|
|
|
|
Hi,
Use HTML Help Workshop for VC++. Hope this will help u. Gives the same look and feel as that of MSDN.
Vikram Kashyap
"You will never fail, until u stop trying"
|
|
|
|
|
If you are referring to the little app that comes with the HTML Help compiler and friends, and that organizes things into a crude sort of project, then you're quite mistaken. The only thing that makes it like MSDN is the fact that it outputs the help into a single .CHM file. Doc book outputs a .hhp and .hhk files for use in the HTML Help compiler or even the workshop if you want.
¡El diablo está en mis pantalones! ¡Mire, mire!
Real Mentats use only 100% pure, unfooled around with Sapho Juice(tm)!
SELECT * FROM User WHERE Clue > 0
0 rows returned
|
|
|
|
|
I have make a project a,which linked a dll b,how can I make profile that can display the fuctions in b. thanks
|
|
|
|
|
Hi,
I am learning VC++ with some experience with C++, I could compile and execute some simple programs like finding a prime etc successfully. Now I am trying to learn creating a new window using MFC. Whenever I execute the code, i get the following message"
"Hello.exe has encounetered a problem and needs to close..please tell Microsoft about the problem...."
The appname and modname in the technical data are both Hello.exe.
When I click on the Debug button in this window it gives me the following message
"The instruction at "Ox0045c8fb" referenced memorry at "0x00000000". The memory could not be "read". Clik ok to terminate the program."
In the Debug information I have:
Loaded 'C:\WINDOWS\system32\ntdll.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\kernel32.dll', no matching symbolic information found.
Loaded symbols for 'C:\WINDOWS\system32\MFC42D.DLL'
Loaded symbols for 'C:\WINDOWS\system32\MSVCRTD.DLL'
Loaded 'C:\WINDOWS\system32\gdi32.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\user32.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\advapi32.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\rpcrt4.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\version.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\msvcrt.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\SHLWAPI.DLL', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\apphelp.dll', no matching symbolic information found.
The thread 0x9F0 has exited with code 0 (0x0).
The thread 0x9C4 has exited with code -1073741819 (0xC0000005).
The code I am trying to execute is:
// Creating a Hello.cpp win 32 application.
#include <afxwin.h>
class C_MyApp:public CWinApp
{
BOOL InitInstance();
};
class C_MainFrame:public CFrameWnd
{
public: C_MainFrame();
};
C_MainFrame::C_MainFrame()
{
Create(NULL,"Main Window");
}
BOOL C_MyApp::InitInstance()
{
m_pMainWnd=new C_MainFrame();
m_pMainWnd->ShowWindow(m_nCmdShow);
return TRUE;
}
void main()
{
//int m_pCmdShow;
C_MyApp myApp;
}
Can anyone help me on how to successfully execute this program?
Thanks in Advance,
Regards,
Frank Michael,
"Faith is a great stimulant so is Fear"
|
|
|
|
|
Try crate simple SDI project using AppWizard and see deference with you code
You forget many ...
|
|
|
|
|
In the following source code fragment a metafile is generated with a line with a length of 60 millimeter using GDI+. The problem is when I analyse this metafile with Visio or print 1:1 on paper, the dimension of the line is not 60 mm ! I hope somebody can tell me the reason.
Gdiplus::GdiplusStartupInput gdiplusStartupInput;
ULONG_PTR gdiplusToken;
GdiplusStartup(&gdiplusToken, &gdiplusStartupInput, NULL);
Metafile* myMetafile = new Metafile(L"MyDiskFile.emf", ::GetDC(NULL));
Graphics* myGraphics = new Graphics(myMetafile);
Pen* myPen = new Pen(Color(255, 0, 0, 200));
myGraphics->SetPageUnit(UnitMillimeter);
myGraphics->DrawLine(myPen, 0, 0, 60, 0);
delete myGraphics;
delete myPen;
delete myMetafile;
GdiplusShutdown(gdiplusToken);
|
|
|
|
|
I have my code to open the file-dialog box. With this I am able to select the file, but I want to open the file in an notepad. Can anybody help me for this?
Here goes my code. Thanks in advance
try
{
CWaitCursor wait;
CString filename = _T("");
CFileDialog dlg(true, "txt", "*.*", 0, _T("Log Files (*.txt)||"));
CString logs_path = getenv(_T("ENV_VARIABLE"));
logs_path += _T("\\Logs");
dlg.m_ofn.lpstrInitialDir = logs_path.GetBuffer(logs_path.GetLength());
// now let the user select
int result = 0;
result = dlg.DoModal();
if (result == IDOK)
{
// get the new file name
filename = dlg.GetPathName();
// does the file exist??
CFileStatus status;
if (!CFile::GetStatus (filename, status))
{
// do nothing
}
}
else
return;
}
catch (...)
{
//...
}
- Prashant
|
|
|
|
|
Try ShellExecute using the full path to the file selected.
This will open the file using the default application for .txt files, probably notepad.
"Nothing is impossible for the man who doesn't have to do it himself." - A. H. Weiler
|
|
|
|
|
ShellExecute(hWnd,"open",
"notepad.exe", filename,NULL, SW_SHOW );
There is no spoon.
mail
|
|
|
|
|
Hi,
If I create an activeX component using the visual c++ that comes with vs.net 2003 - Is it possible for a client to download this component and use it without having to download the whole .net framework??
|
|
|
|
|
The simple Answer is YES.
ActiveX created by Visual C++ present in vs.net 2003 doesnot use CLR by default. So, no need of .NET framework.
<marquee> STUCK STUCK STUCK STUCK
Stuck to Programming through an unbreakable bond
My Articles | My Blog
|
|
|
|
|
I am currently using Directshow and VC++ to create a simple movie player. I use IGraphBuilder and IMediaEvent interface to render the file (using IGraphBuilder::RenderFile followed by IMediaEvent::Run). When the user selects another movie, I first remove all the filters in the graph (using IGraphBuilder::RemoveFilter) and load the new movie as before. The problem is, there seems to be a memory leak somewhere in my app, since everytime the user selects a new movie, my app's memory usage (seen from Windows Task Manager) always rises by around 1MB and stays there.
Could someone tell me what the possible causes for this leak is? Or does someone know a good sample on this topic?
Thanks!
|
|
|
|
|
I want to receive the data from a videoport!
I create a videoport g_pVPE by DirectDraw!
but after I call g_pVPE->startVideo(&ddvpi),
hRet==DDERR_INVALIDPARAMS.
That is I set some parameters wrong!
The setting of parameters are as follows,please help me find the error!
thanks!
int g_CropTop=0x3;
int g_CropLeft=0x1d;
#define CAPWIDTH 800//620
#define CAPHEIGHT 600//440
int g_SurfWidth = CAPWIDTH/2;//310;
// NOTE: g_SurfHeight has to start from CAPHEIGHT/2,
// because of interlace data
int g_SurfHeight = CAPHEIGHT/2;//220;
DDVIDEOPORTINFO ddvpi;
memset(&ddvpi, 0, sizeof(ddvpi));
ddvpi.dwSize = sizeof(ddvpi);
ddvpi.lpddpfInputFormat = &InputFormats[0];
ddvpi.dwVPFlags = DDVP_CROP | g_VPFlags| DDVP_PRESCALE;
ddvpi.rCrop.left = g_CropLeft;
ddvpi.rCrop.right = ddvpi.rCrop.left + CAPWIDTH;
ddvpi.rCrop.top = g_CropTop;
ddvpi.rCrop.bottom = ddvpi.rCrop.top + CAPHEIGHT/2;
ddvpi.dwVBIHeight = ddvpi.rCrop.top;
ddvpi.dwPrescaleWidth = g_SurfWidth;
ddvpi.dwPrescaleHeight = g_SurfHeight;
ddvpi.dwOriginX=0;
ddvpi.dwOriginY=0;
hRet = g_pVPE->StartVideo(&ddvpi);
if(hRet!=DD_OK)
{if(hRet==DDERR_INVALIDOBJECT)
..................
if(hRet==DDERR_INVALIDOBJECT )
........................
if(hRet==DDERR_SURFACELOST)
..............
}
|
|
|
|
|
Must I set the
g_pVPE->SetTargetSurface()
before I called g_pVPE->StartVideo(&ddvpi)
|
|
|
|
|
Hi all,
im currently workin on capturing video function under Directshow.
i saw the example over at the website in msdn but i dun seen to understand and duno how to start also..
http://www.msdn.mircosoft.com/archive/default.asp?url=/archive/en-us/directx9_c/directx/htm/capturingvideotoanavifile.asp
can someone help me in this pls
tks
|
|
|
|
|
Hi, I'm a beginner of Visual C++.
And I have a problem in my project, please help me.
In my project,there is a Static text named IDC_STATICTIME,
I put a timer clock on it.And I want to use OnCtlColor function to change the background of the Static text.
Here is the code :
HBRUSH CCallDialog::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
{
HBRUSH hbr = CBitmapDialog::OnCtlColor(pDC, pWnd, nCtlColor);
pDC->SetBkMode(TRANSPARENT);
//pDC->SetBkColor(TRANSPARENT);
if (pWnd->GetDlgCtrlID() == IDC_STATICTIME)
{
pDC->SetTextColor(RGB(0, 0, 255));
pDC->SetBkMode(TRANSPARENT);
}
return hbr;
}
But when I compile, it changed only the Text color.
What will I do to change BkMode of the static?
Thank you very much.
King of Merit
|
|
|
|
|
What have you got underneath the static text?
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Hi,
On the dialog hearder add
CBrush m_brush;
On OnInitDialog Add
m_brush.CreateSolidBrush(RGB(255,0,0));
OnCtlColor Add
HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
// TODO: Change any attributes of the DC here
if (pWnd->GetDlgCtrlID() == IDC_STATICTIME)
{
// Set the text color to red
pDC->SetTextColor(RGB(255, 255, 255));
// Set the background mode for text to transparent
// so background will show thru.
pDC->SetBkMode(TRANSPARENT);
// Return handle to our CBrush object
hbr = m_brush;
}
// TODO: Return a different brush if the default is not desired
return hbr;
This will work 4 more information have a look @ the msdn
Sujan
|
|
|
|
|
I´m one of those newbies, who would just paste #include-directives until the compiler doesn´t complain anymore. But now I´m pretty stuck up in managing my class-declarations:
I got two classes, each containing a pointer to the other one in order to be able to call the other´s functions.
To be more precise: ClassB is a member of ClassA and should be able to notify ClassA about changes.
There should be nothing special about calling other classes´ functions but how do I get the Compiler to understand, that I´m not trying to do anything illegal?
I tried for hours until I ended up including "#f***u" to all project-files.
For a clean declaration I should #include the headers of embedded classes. But is there any workaround that I can use, if the embedded class itself needs the declaration of the original class?
I hope you can help me out of my misery
Thanx,
Stefan
|
|
|
|
|
A.h :
<font color=#FF0000>class B;</font>
class A {
B*^pB;
};
B.h :
class B {
A* pA;
};
TOXCCT >>> GEII power
|
|
|
|
|
I finally give up. I have here two very simple forms that (for demonstration purposes) consist of a single click button. When you click on the button, the form becomes invisible, and the other becomes visible. you can keep going back and forth till your coffee needs re-heating in the the microwave having developed a really nice thick skin!!
BUT IT DOESN'T WORK!!!!
I obviously wanna do much more than this, but what I'm trying to do is to write successfully from one form to the other and back, then a whole world of possibilities are opened up to me. I have tried many ways (hence the comments) but always get compiler errors such as
error C2512: 'datapassing::Form1' : no appropriate default constructor available
amongst others.
Using Microsoft Visual C++.NET V2003
I could manage forms untill .NET decided to manage them for me!!
Form 1
Code:
#pragma once
#include "Form2.h"
namespace datapassing
{
//public __gc class Form2;
using namespace System;
using namespace System::ComponentModel;
using namespace System::Collections;
using namespace System::Windows::Forms;
using namespace System::Data;
using namespace System::Drawing;
public __gc class Form1 : public System::Windows::Forms::Form
{
public:
// TellForm2Something( Form2* pForm2 );
// void TellForm2Something( Form2* pForm2 )
// {
// pForm2->make_visible();
// }
Form2 *pFrm2;
public:
Form1(void)
{
InitializeComponent();
pFrm2 = new Form2;
}
public:
void make_visible(void)
{
this->Visible = true;
}
//STANDARD INITIALISATION AND DISPOSING CODE
private: System::Void button1_Click(System::Object * sender, System::EventArgs * e)
{
// TellForm2Something(Form2);
pFrm2->Visible = true;
this->Visible = false;
}
};
}
Form 2
Code:
#pragma once
#using <mscorlib.dll>
using namespace System;
using namespace System::ComponentModel;
using namespace System::Collections;
using namespace System::Windows::Forms;
using namespace System::Data;
using namespace System::Drawing;
namespace datapassing
{
public __gc class Form1;
public __gc class Form2 : public System::Windows::Forms::Form
{
public:
// TellForm1Something( Form1* pForm1 );
// void TellForm1Something( Form1* pForm1 )
// {
// pForm1->make_visible();
// }
Form1 *pFrm1;
public:
Form2(void)
{
InitializeComponent();
pFrm1 = new Form1;
}
public:
void make_visible(void)
{
this->Visible = true;
}
//STANDARD INITIALISATION AND DISPOSING CODE
private: System::Void button1_Click(System::Object * sender, System::EventArgs * e)
{
pFrm1->Visible = true;
//pFrm1->make_visible();
//TellForm1Something(Form1);
this->Visible = false;
}
};
}
|
|
|
|
|
For some reason, when I call the destructor of an instance, it doesn't actually destroy the instance?
Is there something up with my compiler (Microsoft Visual C++ 6.0) or am I misunderstanding how destructors work and/or what they do?
Here is an example of what I am talking about:
class A <br />
{<br />
public: <br />
A(): itsVariable(3) {cout << "A's constructor was called.\n";}<br />
~A() {cout << "A's destructor was called.\n";}<br />
<br />
int GetVar() {return itsVariable;}<br />
void PrintSomething() {cout << "A's PrintSomething function was called.\n";}<br />
<br />
private:<br />
int itsVariable;<br />
};<br />
<br />
int main()<br />
{<br />
A instance;<br />
instance.~A();<br />
<br />
instance.PrintSomething();<br />
cout << "instance.GetVar() returns: " << instance.GetVar() << ".\n";<br />
<br />
cout << "Main has now ended, therefore instance is out of scope.\n";<br />
return 0;<br />
}
The program produces this output:
A's constructor was called.
A's destructor was called.
A's PrintSomething function was called
instance.GetVar() returns: 3.
Main has now ended, therefore instance is out of scope.
A's destructor was called.
Press any key to continue
Any information anyone can give me would be greatly appreicated.
Thanks.
- Michael
|
|
|
|
|