|
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?
|
|
|
|
|
Does anyone who know how to obtain VC++ Developer Studio 5.0 or 6.0 ? I really need to obtain it desperately. Thanks a million for helping.
|
|
|
|
|
Well, depending on where you are the names might change, but for example here in Hobart we have a place called 'Harvey Norman'. They have rows and rows of boxes full of software, including the latest Visual Studio.
Or you could try ebay, I'm sure lots of people are selling their VS6 now before VS7 causes it's value to drop.
Christian
The content of this post is not necessarily the opinion of my yadda yadda yadda.
To understand recursion, we must first understand recursion.
|
|
|
|
|
Hi,
I've made small WTL Dialog APP. Release NonUnicode build has about 60kb, but when I run this app and look at TaskManager, there is over 1MB of used memory! What eat so much memory?
|
|
|
|
|
Hi,
I added one property sheet to display/properties dialog box, i am calling
one call back function, on clicking apply button. Apply button become active
when ever user modify any one of the property sheet. But that call back function
called only when user clicks my new property sheet tab.
I want to call that call back function, even if user modify in
the other property sheets.
Thanks,
- Koteswara
Perumalla Koteswara Rao, (B.Tech)
Computer Science & Engineering,
MIG - 305, KPHB colony,
Hyderabad, Inida - 500072
|
|
|
|
|
I am writing a program that makes use of the active desktop. I need to use the interface IActiveDesktop but however I am always getting an undefined error message. I have the correct version of the Shell32.DLL, I have #include shlobj.h in my code. If I replace IActiveDesktop by IContextMenu which is also defined in the same header file - shlobj.h as IActiveDesktop then everything compiles without any problem. Has anybody got any ideas of what is going on.
I am using Visual C++ 6 with SP4.
|
|
|
|
|
You should add WININET.H as soon as posible in your stdafx.h file
#include <afxwin.h>
#include <wininet.h>
Don't forget to clear project and to delete *.pch files
Mike
|
|
|
|
|
Does anyone know where I can get information on how I can store/retrieve images (jpg) in an access database file from a C++ program.
Thanking you in advance.
Happy programming!!
|
|
|
|
|
Hi.
Add to your table field OLE object named "image".
In your program write:
CFile file;
CByteArray array;
BYTE z;
file.Open(.....);
for(int i=0;i<(unsigned int)file.GetLength();i++)
{
file.Read(&z,1);
array.Add(z);
}
COleVariant ole(array);
AddNew();
SetFieldValue("image",ole);
Update();
Probably better idea is to use operator >> to read from CArchive object but I don't know how. Error message ocurs.
|
|
|
|
|
Hi,
I've made small shellextension and it works fine. Next, I want to add propertysheet extension. So I read one Complete Idiot's guide. Because I love WTL, I've tried to use CPropertyPage from WTL in AddPages method of IShellPropSheetExt interface. But when the extension is called, it goes down with "the memory cannot be read" in altwin.h. I cant find a way through. Can anyone help?
HRESULT CDbfExtension::AddPages(LPFNADDPROPSHEETPAGE lpfnAddPage, LPARAM lParam)
{
HPROPSHEETPAGE hPage;
CPropertyProppage m_PropPage;
m_PropPage.m_psp.dwFlags|=PSP_PREMATURE;
m_PropPage.SetTitle(_T("DBF INFO"));
hPage=m_PropPage.Create();
if ( NULL != hPage )
{
// Call the shell's callback function, so it adds the page to
// the property sheet.
if ( !lpfnAddPage ( hPage, lParam ))
DestroyPropertySheetPage ( hPage );
}
return S_OK;
}
|
|
|
|
|
Your CPropertyProppage object is going out of scope, so the corresponding window (the page) gets destroyed. You need to move the object out of the AddPages() function.
--Mike--
http://home.inreach.com/mdunn/
"That probably would've sounded more commanding if I wasn't wearing my yummy sushi pajamas."
-- Buffy
|
|
|
|
|
It's true. But when I change the CPropertyPage to a class-member, it happens again. I've found, that my shell/extension is destroyed ( shell calls Release() ) imidietly after AddPages() returns.
Later:
I've found a way but...
m_PropPage.m_psp.dwFlags|=PSP_USEREFPARENT|PSP_PREMATURE;
m_PropPage.m_psp.pcRefParent=reinterpret_cast<uint far*="">(&_Module.m_nLockCnt);
...
The PSP_USEREFPARENT is important, but this also doesn't work.
|
|
|
|
|