|
saisp wrote: ...but it is getting crashed in debug state?
Are we supposed to guess where?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
I`m a programmer of C# and I`m starting to develop in C++.
Why is it that sometimes my intellisense will not work or show.
Just like in C#, if you just type first letter, it will show unlike in C++. Nothing happen. Is this the behavior of C++ 2005 express edition?
Can you explain...
Thanks in advance.
******************************
to know
everything
is to know
yourself...
|
|
|
|
|
This option may need to be turned on...
Tools/Options/TextEditor/C++/Formatting/Enable automatic Quick Info tooltips
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Ctrl+Space will bring up the Intellisense list.
|
|
|
|
|
There are very often problems with intellisense. sometimes works. Most of time doesn't work...most of the time it helps when you compile your program without errors...
Best regards
Hansjörg
|
|
|
|
|
Thank you to all of you. good work guys.
but it seems there is a bug on intellisense.
especially in C++. it doesn`t work sometimes
******************************
to know
everything
is to know
yourself...
|
|
|
|
|
How can i get a list of installed softwares and their extra info ( for ex. version ) installed on my system , programatically ?
Thank you very much
|
|
|
|
|
Akin Ocal wrote: How can i get a list of installed softwares...
You are assuming this information is kept in one central repository, which it is not.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
I look for some registry information , am i on the wrong way ?
|
|
|
|
|
Akin Ocal wrote: ...am i on the wrong way ?
Yes.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Check out the WMI class "Win32_Product" in MSDN, this should give you the list of all the installed softwares. There is also a sample in the MSDN for it.
Hope this helps u.
|
|
|
|
|
vipin_nvk wrote: ...this should give you the list of all the installed softwares.
Wrong! It only knows about those that are installed by Windows Installer. It is not possible to know about all software that gets installed.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
hm.. yaa I realised dat later.. wat abt looking into the registry at HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\
It mite b of some help
|
|
|
|
|
vipin_nvk wrote: wat abt looking into the registry at HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\
What about it?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
I have a file that may contain contents that look like
START
ABSC
ABGNN
ANHHJJ
AHHHHH
STOP 4
I am having some trouble figuring out how i would append say ZZZZZZ for it to look like:
START
ABSC
ABGNN
ANHHJJ
AHHHHH
ZZZZZZ
STOP 5
where the "ZZZZZZ" was added before the STOP and the number after the STOP was incremented by 1 cause there was only 1 item added.
|
|
|
|
|
Open the file for appending. Go to the end. Read backwards until you find the "S" in STOP. Write "ZZZZZZ" to the file, followed by "STOP 5". Does that help?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
If i do this:
hFile = CreateFile(strPath.c_str() ,
GENERIC_WRITE,
0,
NULL,
OPEN_ALWAYS,
FILE_ATTRIBUTE_NORMAL,
NULL );
How will i know if the file exists or not?
Cause i only want to append if the file already exists.
|
|
|
|
|
LCI wrote: How will i know if the file exists or not?
One way would be to use _access() .
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
LCI wrote: How will i know if the file exists or not?
Use OPEN_EXISTING instead of OPEN_ALWAYS? If it fails, create it.
You may need some READ access as well
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
|
I am trying to figure out why my CEdit box does not appear, even though I've instantiated it to the rectangle (10,70,100,120) just like my buttons. Is it not allowed to be attached to a CFrameWnd?
class MainWindow : public CFrameWnd
{
public:
CButton start;
CButton end;
CEdit textbox;
MainWindow()
{
Create(NULL, "MFC Window");
start.Create("Start", WS_CHILD|WS_VISIBLE|BS_PUSHBUTTON, CRect(10,10,100,30), this, 1);
end.Create("End", WS_CHILD|WS_VISIBLE|BS_PUSHBUTTON, CRect(10,40,100,60), this, 2);
textbox.Create(ES_READONLY|ES_LEFT|ES_MULTILINE|ES_AUTOVSCROLL, CRect(10,70,100,120), this, 3);
}
void ButtonStart();
void ButtonEnd();
void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
void OnLButtonDown(UINT nFlags, CPoint point);
DECLARE_MESSAGE_MAP()
};
void MainWindow::ButtonStart()
{
MessageBox("Start");
}
void MainWindow::ButtonEnd()
{
MessageBox("End");
}
void MainWindow::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags)
{
if (nChar == VK_ESCAPE)
MessageBox("Escape button pressed");
}
void MainWindow::OnLButtonDown(UINT nFlags, CPoint point)
{
MessageBox("Left button clicked");
}
BEGIN_MESSAGE_MAP(MainWindow, CFrameWnd)
ON_BN_CLICKED(1, MainWindow::ButtonStart)
ON_BN_CLICKED(2, MainWindow::ButtonEnd)
ON_WM_KEYDOWN()
ON_WM_LBUTTONDOWN()
END_MESSAGE_MAP()
class MyApp : public CWinApp
{
public:
BOOL InitInstance()
{
m_pMainWnd = new MainWindow();
m_pMainWnd->ShowWindow(SW_SHOW);
return TRUE;
}
};
MyApp theApp;
|
|
|
|
|
Cyrilix wrote: textbox.Create(ES_READONLY|ES_LEFT|ES_MULTILINE|ES_AUTOVSCROLL
Wouldn't you need a WS_VISIBLE in the create method for it to show up?
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
|
|
|
|
|
You're right...
Does this have to be specified for every single MFC class? The reason why I have it in the buttons is because I stole it from an example.
|
|
|
|
|
Cyrilix wrote: every single MFC
Only for visible controls and only if you really want to see them.....
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
|
|
|
|
|
...or you can always show them later with ShowWindow()
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|