|
Well, a file's type and its extension are not necessarily indictive of the other. In other words, I can create a .DOC file with Word, and change the extension to .XYZ. Now what do I have?
You can determine if a given entity is a folder or not by looking at the attrib member of the _finddata_t structure mentioned earlier. You can also look at the dwFileAttributes member of the WIN32_FIND_DATA structure.
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
Yeah, that's true. The extension can be changed. So, I guess I will have to write a function to check that, assuming the file extensions are correct.
I am using the attrib member of the _finddata_t structure. It turns out that a folder is 16 whereas a .txt is 32 or 33.
Can you please tell me what those numbers represent?!
Thanks.
|
|
|
|
|
hkl wrote:
Can you please tell me what those numbers represent?!
Take a look at lines 92-97 of dos.h , and lines 140-145 of io.h .
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
Thanks so much! I will take a look at that!
|
|
|
|
|
You could get string description of file's type using SHGetFileInfo() API function with SHGFI_TYPENAME flag.
|
|
|
|
|
hi
i'm using the ListView text callback and image callback (virtual style)
and i have a strange problem when processing the LVN_GETDISPINFO i give the control the data from lparam assosiated with the current item
but when i DC on an item the lParam is not there is there any solution for it
LEGENDARY
|
|
|
|
|
Modar wrote:
but when i DC on an item the lParam is not there
What does "DC on an item" mean?
Modar wrote:
is there any solution for it
Not without some code showing what you are trying to do.
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
Hi, i want to stop Internet acces in the PCs of a local
network (CyberCafe), i dont have any adea.
Can anyone give me a methode or tip to do this task.
My work is an MFC app.
Thank for advence
|
|
|
|
|
What kind of access do your pc's have?
1. If they are all directly connected then take off their connections.
2. if they are going through a proxy then you can disable the ip's that ypu don't want accessing the net on the proxy server
3. You can try using a firewall if you want to selectively disable access to particular sites.
Hope this helps.
"It was when I found out I could make mistakes that I knew I was on to something."
-Ornette Coleman
|
|
|
|
|
I'm doing some work in some old Win32 code, and I'm working with a dialog that has a tree control and a list control. When I receive a WM_NOTIFY telling me that the selection of the tree has changed, I repopulate the list control with the data that pertains to the selected item.
A problem I'm noticing is that when I repopulate my tree control (when an item is added/removed), I delete all the items and re-populate from scratch, when I call TabCtrl_DeleteAllItems, I'm getting X number of WM_NOTIFY messages telling me the selection has changed. It just makes for a mess on the UI, the list is going nuts... I've encapsulated my population code with LockWindowUpdate(), makes a bit of a difference.
What do you guys recommend? ... A kludgy way would be to have a flag to ignore the WM_NOITFY/SEL_CHANGE msgs when I'm adding/deleting items..
Thoughts?
Mike.
|
|
|
|
|
|
what is unicode subset?
I want to it's defination,thank u.
|
|
|
|
|
|
I have this little problem:
I have created a Installation disk to install a suite of applications along with installing MSDE (Single workstation so using MSDE for databsae). My problem is that I don't know how to import a stored procedure into my SQL database??
I have the stored proc in a txt file. Does anyone know how to import a stored procedure from a txt file through visual c++??
I am really struggling on this one.
Please could someone help me with this matter.
Will be eternally grateful.
|
|
|
|
|
I am creating a program with CFormView. I have added buttons to it. I would like to know how to implement an action when any of the button is clicked. Can I do it all in the LButtonDown function? or is there some other way.
|
|
|
|
|
Have you tried the Message Maps tab of the ClassWizard dialog?
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
Can anyone tell me if the latest SDK includes the header file rtflib.h?
It's just that I'm trying to use the Exchange SDK and it needs rtflib.h which isn't provided (despite the fact MSDN states that it contains a core function of the Exchange SDK). I also had difficulty finding ctl3d.h, perhaps because I'm using Visual Studio .NET.
"The folly of man is that he dreams of what he can never achieve rather than dream of what he can."
"If you think education is expensive, try ignorance."
|
|
|
|
|
Strange, as I have the rtflib.h file in my old SDK folder but not in the new one. I am using VS6.
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
|
|
Exchange 2003, I'll give the other one a try tomorrow thanks
"The folly of man is that he dreams of what he can never achieve rather than dream of what he can."
"If you think education is expensive, try ignorance."
|
|
|
|
|
I've written a COM+ application in C# there are methods that have parameters of the type System.Collections.Hashtable and I am trying to create a unmanaged CPP wrapper for those method. I used #import with TLB file and TLI and TLH files created automatically have in those methods parameters of the following type: struct _Hashtable*
and I am stuck here!
Does anyone have any idea what to do with that?
Thanks in advance!
Jajco
|
|
|
|
|
Hi guys,
I have a problem with the application I'm currently developing. I lose GDIs, but I don't know where. My question is as it follows:
does someone know any debug tool to control this kind of errors. I mean, I need to know what object is losing its GDIs.
Cheers
|
|
|
|
|
Code Sample:-
ATL Class
class CAtl : public IA, Public IB
{
---------
--------
virtual functions -- overridden of IA and IB
}
class MyClass : public CAtl
{
virtual methods again overridden
}
DEFINE_GUID(CLSID_MyClass, {---GUID---})
My Problem:
I have written a class (CAtl) which is deriving some COM interfaces (IA and IB).
I have written one more class (MyClass) which is derived from CAtl class.
I have overridden those virtual function of Interfaces in both of my classes (in CAtl and also in MyClass).
I defined a new GUID for MyClass class.
Now i have to create Object of my class (CAtl) using CocreateInstance. which is not working .....
it is saying that CLSID is undefined..what shud i do to register my class and create its object.
Output file is a .lib
Please help me out
thanx
Now i want to create "Myclass" object using CoCreateInstance and error is comming that GUID is undefined. How should i create its obj?
|
|
|
|
|
I have a program in MFC where I call a Dialog to make scan of images with TWAIN. The problem is that for some reason the program crash on Exit when I make de Scan and only when I put AfxOleInit() in de InitInstance. If I remove this line of code all works well, but I neet that the funcion AfxOleInit be invoked in the InitInstance, because i'm using some Ole classes. Someone Knows how to resolve this problem.
Thanks for the attention.
|
|
|
|