|
Robert Palma Jr. wrote:
BTW:
What I am pursuing is to let the user select a file or files from his/her HD, so my next task is to find the function that reads the files and directories within a specified start directory.
Also CListBox has the Dir() function if you do not wish to use the CFileDialog class.
Happy programming!!
|
|
|
|
|
Thanks Wolfram
|
|
|
|
|
Does anyboday knows what is the problem here ? The follwoing source is
compiled on MSVC, but when its executed there is a "Access Violation." ?
template< typename TYPE >
class TYPEDPROPERTY;
class PROPERTY
{
public:
template< typename TYPE >
operator TYPE ( )
{
return (TYPE) 0;
};
};
template< typename TYPE >
class TYPEDPROPERTY : public PROPERTY
{
public:
TYPEDPROPERTY( const TYPE& tValue )
{
m_tValue = tValue;
}
protected:
TYPE m_tValue;
};
And the way how I use it
...
TYPEDPROPERTY< int > a( 1 );
int iA = a; // Access Violation.
...
|
|
|
|
|
Hi guys, I would like to create a windows and insert a Tree List. I would like that my window can attach to the main window application or to detach it and give it a Corel Draw style or something similar.
Inside this windows I would like to display a Tree list (CTreeView).
I remember that I found something here in this site but I don't remember where.
Anyway can anybody give me a suggestion?
Thank you very much.
Giancarlo
|
|
|
|
|
I want my app to check if for example the windows media player is running, or MS Word, or any app!
I know this may be difficult or something like that!
I know that way to get the window of an app but then how to get the class name when you don't have it?
I can get acces to WinAmp because they have the class name of the window on the developer section on winamp.com
HEEEEEEEELP!!!!
------------------------------
©0d3 ©®4©k3® - That's me!
------------------------------
|
|
|
|
|
Use Spy++. Hit Ctrl+F, then drag the selection cursor over Word, and Spy will show the class name.
--Mike--
http://home.inreach.com/mdunn/
While I can't be correct on all matters, I can make the reassuring claim that where I am inaccurate, I am at least definitively inaccurate.
your with and
Sonork - 100.10414 AcidHelm
|
|
|
|
|
|
1. I have one Access .mdb file. How to read the names of the tables in it, using ADO
2. In the same database, how to read the description field of each column, using ADO again
Any answer will be helpfull. Thanx in advance!!!
|
|
|
|
|
Dir,
I write a VC++ program, and want delete a folder use code below:
RemoveAllDirectory(LPCTSTR pstr)
{
SHFILEOPSTRUCT sh;
TCHAR from[100];
lstrcpy(from, pstr);
lstrcat(from, "\0");
sh.hwnd = GetSafeHwnd();
sh.wFunc = FO_DELETE;
sh.pFrom = from;
sh.pTo = NULL;
sh.fFlags = FOF_NOCONFIRMATION | FOF_SILENT;
sh.hNameMappings = 0;
sh.lpszProgressTitle = NULL;
SHFileOperation (&sh);
}
But when I want delete folder like: "C:\\Progra~1\Netscape\\user\\someone\\cache\0" it generate a dialog error: "Can not delete file: File system error (1026)"
Please try and help me!
Thank you!
HuuQuynh
|
|
|
|
|
Put this line after your declaration [SHFILEOPSTRUCT sh;]
ZeroMemory(&sh, sizeof(SHFILEOPSTRUCT));
Nish
Sonork ID 100.9786 voidmain
www.busterboy.org
Nish is a BIG fan of Goran Ivanisevic
|
|
|
|
|
Dir Nish,
I don't think so! But I try your code, the same error!
any ideas?
Thank you any way
|
|
|
|
|
I just tried the following out on my machine without any problems
LPCSTR buff="C:\\New Folder\\New Folder\\aaa";
SHFILEOPSTRUCT shfop;
ZeroMemory(&shfop, sizeof(SHFILEOPSTRUCT));
shfop.wFunc=FO_DELETE;
shfop.pFrom=buff;
SHFileOperation(&shfop);
Nish
Sonork ID 100.9786 voidmain
www.busterboy.org
Nish is a BIG fan of Goran Ivanisevic
|
|
|
|
|
Hi,
all
Who can tell me how can I get the resource ID of the
current Cursor in my application.
Regards.
|
|
|
|
|
GetCursor() will return the handle to the current cursor.
That should do, huh?
Why do you want the resource id?
Anyway, try using MAKEINTRESOURCE on the HCURSOR. I don't know if it will work. An HCURSOR is basically a HANDLE which is actually a void*. A void* is actually 32 bits.Thus an HCURSOR is a 32 bit number. MAKEINTRESOURCE takes a WORD as parameter and a WORD is only 16 bits. So initially I thought this would be a problem. But MAKEINTRESOURCE is defined as shown below :-
#define MAKEINTRESOURCE(i) (LPTSTR) ((DWORD) ((WORD) (i)))
As you can see the first cast is to a DWORD.
So I hope it will be okay.
But then, I might be wrong.
Regards
Nish
Sonork ID 100.9786 voidmain
www.busterboy.org
Nish is a BIG fan of Goran Ivanisevic
|
|
|
|
|
I wouldn't use MAKEINTRESOURCE, guys. Whilst a HCURSOR is a void *, that's not what MAKEINTRESOURCE is for. The resource management functions in Win32 take in an LPTSTR (a string). This string is the resource "name". The documentation for Win32 shows that this LPTSTR can be an actual pointer to a string name for the resource ("My New Resource"), OR, if the value of the LPTSTR only uses the lower 16 bits (ie it's a DWORD) the value represents the resource ID (IDR_MY_NEW_RESOURCE = 16000).
So, after all that the basic answer is, I don't think you can determine the resource ID from the current cursor (after all, it might be created from a resource located in a DLL, another EXE, or the system somewhere).
------------------------
Derek Waters
derek@lj-oz.com
|
|
|
|
|
All Gurus:
How to convert ADO Recordset to .txt file by XML or others methods?
thanks in advance!
|
|
|
|
|
Iterate through the Recordset and keep writing into a flat file. You may write it as XML or as CSV.
Nish
Sonork ID 100.9786 voidmain
www.busterboy.org
Nish is a BIG fan of Goran Ivanisevic
|
|
|
|
|
Hi:
thanks Nish, How Can I convert xml or csv to flat file
|
|
|
|
|
By flat file I meant a file containing records having no structured inter-relationship. Means you can't query them using SQL-like syntax. You'd need to read the records sequentially or using an index.
The advantage with an XML file is that you can use XML parsers like Expat or MSXML parser.
The advantage with a csv file is the ability to convert it into excel. I think MS has ODBC drivers for CSV files.
Regards
Nish
Sonork ID 100.9786 voidmain
www.busterboy.org
Nish is a BIG fan of Goran Ivanisevic
|
|
|
|
|
Thanks Nish,By your help, I have solved the problem.
|
|
|
|
|
Hi, I have a question
Ive seen programs where a user has a program open like MSN which has edit controls. Another program that isnt made by the same people as MSN is open and it can be used to fill in edit controls like the text field and send messages etc....
How would I do this?
Thanks
Ashman
|
|
|
|
|
I am not sure I understand you correctly. But if you want to send data across applications you can use WM_COPYDATA
Regards
Nish
Sonork ID 100.9786 voidmain
www.busterboy.org
Nish is a BIG fan of Goran Ivanisevic
|
|
|
|
|
In my project I've got a RichEdit box, with a mapped member variable t_Display. I've created a thread that waits for some input (in this case from a socket) and then tries to add this data to the RichEdit box. I am getting an assert error and I have no idea why. Could anyone help me? The code I'm using is thus:
char msg[MAXMSGLEN];
while (fConnected) {
sock.Recv(msg, MAXMSGLEN);
UpdateData(true);
t_Display.Format("%s%s\r\n", (LPCSTR)t_Display, msg);
UpdateData(false);
}
- X
'Reality is the only obstacle to happiness'
|
|
|
|
|
I assume the UpdateData() call is asserting. You can't pass or access CWnd objects between threads. You'll need to use API-level code to update the edit control from your secondary thread.
--Mike--
http://home.inreach.com/mdunn/
While I can't be correct on all matters, I can make the reassuring claim that where I am inaccurate, I am at least definitively inaccurate.
your with and
Sonork - 100.10414 AcidHelm
|
|
|
|
|
How can i open a dialog for browsing a directory
( not a file) ???
|
|
|
|