|
jparsons wrote:
Shouldn't be hard to figure out which one is which
The action member of the NMTREEVIEW is TVE_EXPAND when it is expanded and TVE_COLLAPSE if it has collapsed.
jparsons wrote:
Would it have been that much trouble to add a TVN_ITEMCOLLAPSED message?
Think about UpdateData(true/false). They could have easily added a UpdateControls(...) but they didn't
Nish
Author of the romantic comedy
Summer Love and Some more Cricket [New Win]
Review by Shog9
Click here for review[NW]
|
|
|
|
|
hey ...
I would like to call Find for Files and Folders present in Windows when u click start button thru VC or VB code? can anybody plz tell me how to do that?
--thnx.
|
|
|
|
|
use this function,
bool LocalInterface::DisplayDir(CListCtrl& list, LPSTR lpszdirname)
{
// instantiate a CFindFind object
CFileFind tempFind;
char tempFileFind[200];
sprintf(tempFileFind,"%s\\*.*",lpszdirname);
// check whether there is file existing in the
// current directory
BOOL IsFinded=(BOOL)tempFind.FindFile(tempFileFind);
int nItem = 0;
char lpBuffer[80];
GetCurrentDirectory(80, lpBuffer);
int length = strlen((LPCTSTR) lpBuffer);
// insert a return picture in first line
if(length>3)
{
list.InsertItem(nItem, "..",2);
nItem++;
}
// if file exists in directory, get files and directory
// in the directory show them in the list
while(IsFinded)
{
IsFinded=(BOOL)tempFind.FindNextFile();
// check whether it is '.' or '..'
// if not, then get this file or directory
if(!tempFind.IsDots())
{
char foundFileName[200];
strcpy(foundFileName,tempFind.GetFileName().GetBuffer(200));
// if it is directoy
if(tempFind.IsDirectory())
{
// TRACE("\ndir = %s\n", DirList);
list.InsertItem(nItem, foundFileName,1);
list.SetItemText(nItem, 2, "0");
list.SetItemText(nItem, 3, "dir");
}
// if it is a file
else
{
CString filesize;
DWORD n = tempFind.GetLength();
filesize.Format("%d",n);
list.InsertItem(nItem, foundFileName,0);
list.SetItemText(nItem, 2, filesize);
list.SetItemText(nItem, 3, "file");
}
// get create time of file
FILETIME filetime;
tempFind.GetCreationTime(&filetime);
CString strfiletime = GetFileTime(filetime);
list.SetItemText(nItem,1,strfiletime);
nItem++;
}
}
return true;
}
|
|
|
|
|
sir ,
thnx for the code...but plz do tell me how to execute that??? i dont want to create my own find....I just want to call the Search present in Windows.
but now u have created the code...thnx for that...plz tell me how to execute that??
--thnx
bye
|
|
|
|
|
Maybe that question seems a bit odd but I've got the MS VRML viewer on a machine and not on the other. So I was wondering how it was distributed.
I'm looking for MS VRML Viewer download area and Interface specifications somewhere on the MS site but can't find any info.
Is the ActiveX control still available separately or has it been included in IE ? Has it been abandonned ?
I'm looking for infos on an HTML compatible VRML viewer that I could use for a professional project. Every link of tips would be appreciated.
Thank you
Yarp
|
|
|
|
|
Does anyone know if there are any wrapper classes around for using dialogs without MFC. I'm not looking for a full CDialog replacement, but something which encapsulates the WndProc etc.
Cheers
James
|
|
|
|
|
have you looked at WTL ?
-c
To explain Donald Knuth's relevance to computing is like explaining Paul's relevance to the Catholic Church. He isn't God, he isn't the Son of God, but he was sent by God to explain God to the masses. /. #3848917
|
|
|
|
|
No I don't want to be reliant on a library. My code is plain WIN32 but in C++ and so I want to code my dialogs in the same way.
Cheers anyway.
|
|
|
|
|
How about compling with MFC statically? Or is it just that particular library you don't like?
Joel Lucsy (jjlucsy@ameritech.net)
|
|
|
|
|
I've worked real hard to get the MFC dependancies out of my project so I don't want to link to it just for dialog support. Why have I removed MFC? It's a long story...
|
|
|
|
|
Suppose I want to Exit on pressing Esc button from the middle of the execution ...Like we do in VB....
Please Suggest....
|
|
|
|
|
|
Hi
Where can I find a MFC Tree Control to display XML file with some functionalities like add node, delete node, change value ...
Thanks
Yannick
|
|
|
|
|
I've mapped a variable of type double to an edit box (within a dialog box) in Visual C++ and I want to control the entered value so that it stays fixed(0.001) rather than scientific(1e-003). Is there a way of achieving this?
Cheers.
|
|
|
|
|
With DDX_Text mapping, you're probably without any chance. What about going into 'manual' mode and using [Get|Set]DlgItemText?
Tomasz Sowinski -- http://www.shooltz.com
What is "scratch" and why can everything be made from it?
|
|
|
|
|
Sorry, I'm pretty new to Visual C++. What do you mean by going into 'manual mode'?
|
|
|
|
|
When you're using ClassWizard for dialog data exchange (ddx), it generates the sequence of calls to DDX_xxx in DoDataExchange. One of these calls corresponds to your double value. If this number is shown with exponent, your only choice is to fix it by setting edit control text 'manually', with a call to SetDlgItemText. This would look more or less like this:
void CYourDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
DDX_Text(pDX, IDC_EDIT1, m_value);
if (!pDX->m_bSaveAndValidate)
{
CString strx;
strx.Format("%f", m_value);
SetDlgItemText(IDC_EDIT1, strx);
}
}
You can format your value any way you want before call to SetDlgItemText.
Tomasz Sowinski -- http://www.shooltz.com
What is "scratch" and why can everything be made from it?
|
|
|
|
|
Thanks for your help, ol' buddy.
|
|
|
|
|
When I made any editing changes to my ado project, randonly it bombs with the foll.errors. There is no going back with "undo". Then I have to make a brand new project, but that gets "corrupted" as well in a matter of a few edits. Has any one seen this? I could just be adding a messagebox!!
Thanks,
ns
--------------------Configuration: sqlcarlo - Win32 Debug--------------------
Compiling resources...
Compiling...
sqlcarloView.cpp
c:\program files\microsoft visual studio\vc98\include\crtdbg.h(536) : error C2833: 'operator DEBUG_NEW' is not a recognized operator or type
c:\program files\microsoft visual studio\vc98\include\crtdbg.h(536) : error C2059: syntax error : 'newline'
c:\program files\microsoft visual studio\vc98\mfc\include\afx.h(674) : error C2833: 'operator DEBUG_NEW' is not a recognized operator or type
c:\program files\microsoft visual studio\vc98\mfc\include\afx.h(674) : error C2059: syntax error : 'newline'
c:\program files\microsoft visual studio\vc98\mfc\include\afx.h(674) : error C2238: unexpected token(s) preceding ';'
c:\program files\microsoft visual studio\vc98\mfc\include\afx.h(675) : error C2833: 'operator DEBUG_NEW' is not a recognized operator or type
c:\program files\microsoft visual studio\vc98\mfc\include\afx.h(675) : error C2059: syntax error : 'newline'
c:\program files\microsoft visual studio\vc98\mfc\include\afx.h(675) : error C2238: unexpected token(s) preceding ';'
c:\program files\microsoft visual studio\vc98\mfc\include\afx.h(683) : error C2833: 'operator DEBUG_NEW' is not a recognized operator or type
c:\program files\microsoft visual studio\vc98\mfc\include\afx.h(683) : error C2059: syntax error : 'newline'
c:\program files\microsoft visual studio\vc98\mfc\include\afx.h(683) : error C2238: unexpected token(s) preceding ';'
c:\program files\microsoft visual studio\vc98\mfc\include\afx.h(1631) : error C2833: 'operator DEBUG_NEW' is not a recognized operator or type
c:\program files\microsoft visual studio\vc98\mfc\include\afx.h(1631) : error C2059: syntax error : 'newline'
c:\program files\microsoft visual studio\vc98\mfc\include\afxtls_.h(122) : error C2059: syntax error : 'string'
c:\program files\microsoft visual studio\vc98\mfc\include\afxtls_.h(123) : error C2091: function returns function
c:\program files\microsoft visual studio\vc98\mfc\include\afxtls_.h(123) : error C2802: static member 'operator new' has no formal parameters
c:\program files\microsoft visual studio\vc98\mfc\include\afxtls_.h(123) : error C2333: 'new' : error in function declaration; skipping function body
c:\program files\microsoft visual studio\vc98\mfc\include\afxtls_.h(131) : error C2059: syntax error : 'string'
c:\program files\microsoft visual studio\vc98\mfc\include\afxtls_.h(131) : error C2091: function returns function
c:\program files\microsoft visual studio\vc98\mfc\include\afxtls_.h(131) : error C2802: static member 'operator new' has no formal parameters
c:\program files\microsoft visual studio\vc98\mfc\include\afxtls_.h(135) : error C2059: syntax error : 'string'
c:\program files\microsoft visual studio\vc98\mfc\include\afxtls_.h(135) : error C2091: function returns function
c:\program files\microsoft visual studio\vc98\mfc\include\afxtls_.h(135) : error C2556: 'void *(__cdecl *__stdcall CNoTrackObject::operator new(void))(unsigned int,const char *,int)' : overloaded function differs only by return type from 'void *(__c
decl *__stdcall CNoTrackObject::operator new(void))(unsigned int)'
c:\program files\microsoft visual studio\vc98\mfc\include\afxtls_.h(131) : see declaration of 'new'
c:\program files\microsoft visual studio\vc98\include\comutil.h(219) : fatal error C1903: unable to recover from previous error(s); stopping compilation
sqlcarlo.cpp
Error executing cl.exe.
sqlcarlo.exe - 24 error(s), 0 warning(s)
|
|
|
|
|
I get this periodically with some of my projects. It seems to be a bug in the VC compiler where it somehow gets upset with the input stream. Usually I can get past it by doing a rebuild all.
Roger Allen
Sonork 100.10016
If I had a quote, it would be a very good one.
|
|
|
|
|
I had been exploring this class merrily when these errors starting happening. So I abandoned my strategy and started doing ADO from scratch. Now that REbuild All has dealt with the problem, I am almost afraid of trusting it, because if it doesnt go away next time with Rebuild All, I'll have to take up raw ADO and I have just enough time to go the one way - the class or raw ADO. Do you think rebuild all is trustworthy?
Thanks,
ns
|
|
|
|
|
Hey,
I've just started trying to program with mySQL (first time programming for a database) and I'm encountering some problems. I'm using Visual C++ v6 and mySQL++ v1.7.1 and when I try to compile any program the compiler is coming up with hundreds of errors all of which reside in the mySQL++ source files. I find it hard to believe that there are actually errors in the source files and I can't seem to relsove this problem, if anyone had any ideas or solutions it would be much appreciated.
Thanks in advance.
|
|
|
|
|
How can I access a database (in access2000) over internet connection.
I want to have an app that would upload a picture with a description to that database remotely.
Thanks
_ra
|
|
|
|
|
|
Hello, the codegurus around the world.;)
You can use Socket program or ASP.
1) Socket case.
Create your own client and server by WinSock or CAsyncSocket class.
Add the code with the database in Server side application.
Server can access the database.
2) ASP case.
Write some simple ASP code to Access database in your local web server or
remote web server.
Write the client application with WinSock, CAsynSocket, or WinInet
to post HTTP command.
(WinInet is the easiet way.)
Last, I actually did these.
Please, don't send me your email about your questions directly.
Have a nice day!
Sonork - 100.10571:vcdeveloper
-Masaaki Onishi-
|
|
|
|