|
Within Visual Studio do the follwing.
1. Open your project
2. Select Project, Settings from the menu
3. Select the link tab from the Project Settings dialog box
4. In the Category drop down box, select Input
5. In the edit control under Object/Library modules: enter the following:
Wininet.lib
This is where you can add any libraries that need to be linked to your project.
Basically what happens when you see the error "unresolved external symbol" is that your code is using functions or variables included a header file but you did not write the functions or link in the libraries containing the functions.
|
|
|
|
|
Just one note to this,
Changing the linker's options for the Debug build might not necessarily change the options for the release, Or vicea versa,
Although you can change the options for bothe versions at the same time
Regardz
Colin Davies
|
|
|
|
|
To save time add this line to the header file
#pragma comment(lib,"Wininet.lib ")
|
|
|
|
|
Hi all, I need to subclass the scrollbars of a CWnd to customize their appearance. It is almost easy with the scrollbar control placed over a Dialog, but how can it be done with the scrollbars of a Window ???
Thank you all.
Carlo Comino.
|
|
|
|
|
Hi all, I need to subclass the scrollbars of a CWnd to customize their appearance. It is almost easy with the toolbar control placed over a Dialog, but how can it be done with the scrollbars of a Window ???
Thank you all.
Carlo Comino.
|
|
|
|
|
How to get MS office version programatically?
Is there any API? or any Reg key contains the
version.
thanks,
-- Koti
Perumalla Koteswara Rao, (B.Tech)
Computer Science & Engineering,
MIG - 305, KPHB colony,
Hyderabad, Inida - 500072
|
|
|
|
|
Can anyone tell me what error is shown below:
Hooks32.obj : error LNK2001: unresolved external symbol _InitHooksDll@8
Thanks for helping.
|
|
|
|
|
Most likely you need to make your programs paths point to the location of a file with a name like hooks32.lib and you need to put it in your external libraries list in project options. Your code knows what the function is, but cannot find the function when linking time comes.
Christian
The content of this post is not necessarily the opinion of my yadda yadda yadda.
To understand recursion, we must first understand recursion.
|
|
|
|
|
Does anyone knows about directsound which can record voices on microphone and also playback this recorded voice? I mean directsound in VC++ 6.0.
|
|
|
|
|
Can anyone tell me how to create a .exe file from a .cpp, .h and .rc files? I don't know how to create an exe now that I already have these 3 files?
|
|
|
|
|
Hmmm, I don't know how to answer this, it's pretty fundamental to C++ development, a Chapter 1 kinda thing.
From the VC++ IDE, you should create a project, drop in your files and compile it. You could also do this from the commmand line by invoking the compiler, full instructions for this should be in the help file.
|
|
|
|
|
Sorry I am ver new to c++ and can you tell me where I can find ide because I cannot find VC++ ide.
|
|
|
|
|
IDE stands for Integrated Development Environment, i.e. Visual C++. James, might I recommend you go and buy a book, because while I, and others, are happy to offer help, you seem to be asking a lot of *basic* questions that you could easily find answers for in a reference. If you're remotely serious about programmin you should be investing in some resources of this nature in any case.
Don't get me wrong, I'm not saying people won't help you, or eventhat I won't, only that it seems easier to have these basic answers there instead of waiting for someone to provide them. In reference to the original question, you need to group your c++, h and rc files into a project, which should already be there, namely a .dsp or .dsw file. Open this to open the projct in VC++ and click the exclamation mark tobuild an .exe and run it. Where are your source files coming from ? ( Only asking becaue I'm surprised you're having troulbe with this step, and wondering why you might have headr, code and resource files but no projct or makefile )
Christian
The content of this post is not necessarily the opinion of my yadda yadda yadda.
To understand recursion, we must first understand recursion.
|
|
|
|
|
Anyway , there are different type of projects found , which one should i use if i am creating a window programming , to be specific a window system hook project? Thanks for replying.
|
|
|
|
|
Can anyone provide detail information on the api function SaveDib()?
|
|
|
|
|
According to MSDN there is no such function. There are a number of libraries and classes that offer saving of DIB's and generally wrap CDIBSECTION, I'd suggest you are looking at one and therefore it's impossible to offer any advice until I know where the function came from.
Christian
The content of this post is not necessarily the opinion of my yadda yadda yadda.
To understand recursion, we must first understand recursion.
|
|
|
|
|
This is to all c++ gurus, out there
I have the following code, can anyone explain me how/why things are done.
class abc
{
public :
int i;
public :
abc()
{
}
};
class xyz
{
public :
class abc*;
}
the above program compiles, without any error or warning in MS VC++ 6.
Can anyone explain me, what is the meaning of the declaration
class abc*
I can understand, if there is
abc *ptr;
how are the above two things different, particularly class abc*;
Thanks in advance.
Cheers
Kannan
|
|
|
|
|
string "class abc*;" means forward declaration of pointer to class abc, IMHO it is the same as class abc;
|
|
|
|
|
Is there a way to use the CListView class within an MFC app that does NOT use a Doc/View architecture?
Thanks!
Frank
|
|
|
|
|
THere is little reason to use a View class if you're not using Doc/View. Why not just use the CListViewCtrl?
But if you must, yes.. Assuming you're using VC6, just make the constructor and destructor of your CListView derived class public and create one with new, then call Create()
|
|
|
|
|
|
Hi all,
I use direct draw in an application showind Mpeg2 streams, The images to show are YUV, I use this piece of code to initialize direc draw:
DSURFACEDESC ddsd;
ZeroMemory(&ddsd, sizeof(ddsd));
ddsd.dwSize = sizeof(ddsd);
ddsd.dwFlags = DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT | DDSD_PIXELFORMAT;
ddsd.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN | DDSCAPS_LIVEVIDEO | DDSCAPS_VIDEOMEMORY;
ddsd.dwWidth = XSize;
ddsd.dwHeight = YSize;
ddsd.ddpfPixelFormat.dwSize = sizeof(ddsd.ddpfPixelFormat);
ddsd.ddpfPixelFormat.dwFlags = DDPF_YUV | DDPF_FOURCC;
ddsd.ddpfPixelFormat.dwYBitMask = 0xff00ff00;
ddsd.ddpfPixelFormat.dwUBitMask = 0x00ff0000;
ddsd.ddpfPixelFormat.dwVBitMask = 0x000000ff;
ddsd.ddpfPixelFormat.dwSize = sizeof(DDPIXELFORMAT);
ddsd.ddpfPixelFormat.dwFourCC = mmioFOURCC('Y','U','Y','2');
ddsd.ddpfPixelFormat.dwYUVBitCount = DDBD_16;
pDD->CreateSurface(&ddsd, &pOffscreen, NULL));
Well, Create surface gives INVALID_PIXELFORMAT Error. The Video card supports YUY2, and the code works well under a Matrox millenium G200 and a Ati Rage 128.
Does anyone know the problem ??????
Thank you very much.
Carlo.
|
|
|
|
|
Here is my code to launch net.exe:
// Start the child process.
bSuccess=CreateProcess( NULL,"Net.exe send Computer1 Good morning",
NULL,NULL,FALSE,0,NULL,NULL,&si,&pi );
if (!bSuccess)
{
// Here i use GetLastError() -- OK
}
else
{
DWORD dw = WaitForSingleObject(pi.hProcess, INFINITE) ;
if (dw != 0xFFFFFFFF)
{
BOOL bExit = GetExitCodeProcess(pi.hProcess, &dwExitCode) ;
}
}
I want to get the message definition from dwExitCode. For example if
Computer1 do not exits, we have following message from DOS-Prompt :
"This name(alias) is not found on the network"
"see NET HELPMSG 2273 for more information"
To display this message in run time i use this following code
LPVOID lpMsgBuf;
FormatMessage(
FORMAT_MESSAGE_ALLOCATE_BUFFER |
FORMAT_MESSAGE_FROM_SYSTEM |
FORMAT_MESSAGE_IGNORE_INSERTS,
NULL,
dwExitCode,
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language
(LPTSTR) &lpMsgBuf,
0,
NULL
);
// Process any inserts in lpMsgBuf.Display the string.
MessageBox((LPCTSTR)lpMsgBuf, "Net Sender", MB_OK | MB_ICONINFORMATION );
// Free the buffer.
LocalFree( lpMsgBuf );
But in my code the error number (dwExitCode) is equal 2 ( not 2273 ) and the message which is
display is : "File is not found"
Can anybody help me to define dwExitCode?
Thanks,
|
|
|
|
|
FormatMessage formats the result of GetLastError(). Unless net.exe returns the result of GetLastError(), there's nothing you can do. File not found is 1, and that is the typical return code from a program. 0 for success, 1 or greater for failure.
The best you can do is to use the STARTUPINFO structure parameter of CreateProcess to set your own stdout and capture that.
|
|
|
|
|
I have to write a driver for special printer.
I haven't found any sample project's for Windows Visual C++.
Can anybody help me?
|
|
|
|
|