|
I also agree with you.
My PC has DDK installed,too.
I think the problem is that,all of us don't know what lib files should import.
I hope,the problem would be resolved.
Best regards.
|
|
|
|
|
add Mark Salsbery Comment
All linker errors. Are you missing an import library or two in your
project settings?
you need add hid.lib setupapi.lib in menu Project\project settings slect L ink and add
hid.lib setupapi.lib in to Object. Libary modules
i have same Problem as you ,and i resolved it
|
|
|
|
|
Hi Friends,
Could any one tell me, How to count number of files in a folder.
Ex:
C:\My Documents\New Folder
I need to count all the files in this path.
Thanks and Regards.
SANTHOSH V
|
|
|
|
|
you can use _findfirst() and _findnext().
The second function use the return value of the first function to retrieve.
You can see more details in MSDN.
But you should pay attention to the two found results,whose name is "." and "..",they are the current folder and its parent folder!
You can test in MS-DOS.
|
|
|
|
|
Thank you friend,
This _findfirst() and _findnext() helped me solve this problem.
Thanks a lot once again.
Thanks and Regards.
SANTHOSH V
|
|
|
|
|
If you are using DlgDirList you can get count of files.
|
|
|
|
|
Hi all,
Actually the searching criteria is changed in codeproject, and i am unable to find the new one...Can anybody please tell me how to search a article for example(progress bar in mfc)
Thanks in advance
|
|
|
|
|
Now you have to use an expression to find out like this
AND, NOT, OR and grouping parentheses supported. Enclose phrases in quotes.
eg. CListCtrl; "Grid Control" ; ((C# AND NOT Grid) OR Spreadsheet)
Try this link it gives you info about progress bars
http://www.codeproject.com/KB/tree/progresshourglassfx.aspx[^]
Regards,
Pankaj Sachdeva
There is no future lies in any job but future lies in the person who holds the job
|
|
|
|
|
yes, even i experienced the same for a while. But I am getting pretty much used to it now.
If you want to see any articles in MFC, then you can find them on the left of the screen. its under the heading 'CHAPTERS'. under that, you go to 'platforms, frameworks & Libraries' and choose 'MFC'. You can also find the articles regarding MFC controls under the section 'Desktop Development'.
Or else, you can always use Google to find the articles here on CP. When I don't find the article that i am looking for with the search option here in CP, I use Google to search for the article. I put the key words in Google and Google gives me a direct link to the article. For example, to find the 'progress bar in MFC', i put the key words 'progress bar + MFC + codeproject' in Google and I get a direct link to articles explaining about progress bar in mfc on codeproject. you can easily navigate from there to find similar articles. Its a strange approach, but it works for me.
Regards,
Vijay.
|
|
|
|
|
Hi all,
I have two applications, console application with MFC support and MFC DLL application. I want to connect both those two application together. Console application gives the required data to DLL.
So how should I do it.
I appreciate your help all the time...
Eranga
|
|
|
|
|
Hello again everyone
Before that i would like to tell u all that im really new and dumb to .NET. Hope you guys can help me. I tried to search the solution to my problem but still couldnt find anything.
What im trying to do is to create a really simple internet connection detection which is running under a win32 console. The program will detect if there is any connection to the internet, if yes then it will print yes. If no connection then it will print out no connection using printf() statement.
I know that the InternetGetConnectedState API can help me. but still im not so sure on how to use it. Really dumb me...the scenario is like this
I already link the VC++ project to the Wininet.lib since it required that lib and a header file called Wininet.h (as refered in MSDN). I try to code just by adding the header file to the source code
<br />
#include "stdio.h"<br />
#include "Wininet.h"<br />
void main()<br />
{<br />
}<br />
using the code above, compile, it generates more than 100 error which particularly made the compiler to stop compiling due to error exceeds 100. all of the errors come from the Wininet.h header file. The first error was "error C2061: syntax error:Identifier 'HINTERNET'. The question is, am i missing something. Does VC++ supports this API? I've search the internet (forums..etc) and all of them were implemented using C# or VB. Is there any source code samples using this API which can be run only in a simple win32 console application? Thank you everyone. Really appreciate any help. Thanks again.
|
|
|
|
|
Kogee San wrote: it generates more than 100 error which particularly made the compiler to stop compiling due to error exceeds 100. all of the errors come from the Wininet.h header file.
modify ur code as follows
#include "stdio.h"
#include <windows.h>
#include "Wininet.h"
void main()
{
}
|
|
|
|
|
wow. It really works. Thanks. Just wanna ask if you dont mind. Why do we need to add windows.h. I always see codes which add windows.h eventhough it is just a hello world printf statement. Just kinda curious. Thanks again.
|
|
|
|
|
Kogee San wrote: Why do we need to add windows.h.
This is because the Wininet.h file use some other data types such as LPVOID. This is defined in some other header files. For getting the definition of such items we need to include the windows.h
|
|
|
|
|
Kogee San wrote: I always see codes which add windows.h eventhough it is just a hello world printf statement.
Then those programs included it unnecessarily.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Thanks guys for your help and comments. Really appreciate it.
|
|
|
|
|
Hello developers,
Can i define a class in header file and declare it in .cpp file if using template or do i have to define and declare in the same header file. I have got two classes so do i have to define and declare both in the same header file or is it possible to have different header file for both classes.
I am writing double linked list application. Now i have got two class LList and Node. Now when i simply use template and write the two classes under one file without defining it , then it works perfectly fine but when i try to define the two class seperately i am getting many errors. What should i do in this case ?
Any way out ?
ThankYou
|
|
|
|
|
When you split the two classes into two header files, did
you remember to #include the dependent header file in the one
that depends on it?
If these are template classes, there shouldn't be any code in
CPP files. Actual intances of the template class aren't created
until an object of the class is defined, so at that point the compiler
would need to see the code in the CPP file.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Thanks,
yes i included the dependent header file but i got many errors. But when include the node class declaration and defintion and llist class declartion in one header file then the program works. But yes if i try to declare the llist class first and then define it, it gives me many error.
So i came to the conclusion that i have included all the code under one header file. Declaring template node class and then defining all the functions and then directly defining the template llist class as it doesn't work when i first declare it and then define it.
I guess that each template class could be placed in different header file to use by main method. But in my case it's not working. So i have only main class and the one header file containing two template class.
|
|
|
|
|
If the list class references the node class then the node
class will always have to be defined before (in compile order)
the list class, whether you use separate header files or not.
The following is no different than using a single header file for
both classes...
#pragma once
...define node class...
#pragma once
#include "node.h"
...define list class...
#pragma once
#include "list.h"
...
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
|
Hi,
I have a loop in a C++ program which is constantly checking for input from a network source, but I also want to check if the user has entered something into the console - such as a command to stop the program. Obviously I cannot use just standard cin << strCommand;, since that would block until something is entered. Is there any way for me to check if the console has received input?
Regards,
Daníel
Wenn ist das Nunstück git und Slotermeyer? Ja! Beierhund das oder die Flipperwaldt gersput!
|
|
|
|
|
you can use the _kbhit() function. This function returns a nonzero value if a key has been pressed.
|
|
|
|
|
Thanks, exactly what I need!
Regards,
Daníel
Wenn ist das Nunstück git und Slotermeyer? Ja! Beierhund das oder die Flipperwaldt gersput!
|
|
|
|
|
Hi all,
What is the easiest way to convert a CString into a standard C++ sting.
Thanks
I appreciate your help all the time...
Eranga
|
|
|
|