|
Try the Insert Project Into Workspace under the Project menu.
|
|
|
|
|
You have to create a new project and then add all your files to the project. There is no converter that takes a .mak and produces a .dsp.
John
|
|
|
|
|
I tried this way(creating new project).
it worked also.
thanx
Harinath
|
|
|
|
|
typedef bool (* DispatchFunc)(void *pcontext);
what does the above sentence mean?
|
|
|
|
|
A synonym of a pointer to the function
whose parameter is pcontext,
whose returned value is of type bool.
Is it right?
|
|
|
|
|
It's a function pointer named DispatchFunc, that returns a bool, and accepts a void pointer as a parameter.
|
|
|
|
|
Your declaring a pointer to a function that takes one argument of type void* and returns a bool
Roger Allen
Sonork 100.10016
Were you different as a kid? Did you ever say "Ooohhh, shiny red" even once? - Paul Watson 11-February-2003
|
|
|
|
|
on my CTreeView i want to allow multiselection of HTREEITEM when a key ( Ctrl or Shift) is taped. I don t know how to do ? if u have idea don t hesitate
thanks
Frackasse
|
|
|
|
|
Hi,
I'm using of fax service that is in winxp on my program.
I want to show user a preview of document that wants to be send.
I took a look over msdn, and i found IFaxDocument::GeneratePreview !
It's exactly what i want but the problem is that this method is not available for new IFaxDocument interface in winxp !!!
I mean it's just available for IFaxDocument interface that is in win2000 !
Do you know any way to generate preview for fax document ?
Regards,
|
|
|
|
|
Here's the scenario:
I want to have a Property Sheet in my main app and add Property Pages from explicitly-linked DLLs. It almost works, but I get a memory leak which I'm guessing is down to state management in some way.
Does anyone know if what I'm attempting is even possible?
|
|
|
|
|
Oh yes its possible. I do it in one of my apps, although the DLL were originally dynamically linked and are now explicity linked.
I wouldn't think the mem leak would be due to state managment. Try isolating each of the DLL pages at a time and see if you can see which its most associated with. Also if you have an allocation number you can make use of the _crtBreakAlloc to break on the actual allocation if you run your program in exactly the same way.
Roger Allen
Sonork 100.10016
Were you different as a kid? Did you ever say "Ooohhh, shiny red" even once? - Paul Watson 11-February-2003
|
|
|
|
|
I've traced one of the memory leaks to the m_pOccDialogInfo pointer - it gets set up by malloc() in PreCreateDialog(), but when PostCreateDialog() is called on exit, it's NULL (and has moved from its original address, suggesting this is not the same CPropertyPage), thus the memory never gets freed.
As extra background, I'm passing a pointer to the parent CPropertySheet to the exported function, and calling AddPage() from within the DLL.
Any ideas?
|
|
|
|
|
Hi all,
As it is the first time I use doc window, I don't know how to show the child doc window by pressing a button in parent dialog. I know that in dialog mode to call a child dialog, I can use child.DoModal(), but how about a child doc window under a main dialog?
pls help
thx
|
|
|
|
|
I use CFormView as the view's base class in a MDI program. Run
the program and select File->New from the menu. Then newly
created view pops up in a strange appearance. It's extent covers
only the topleft part of the MainFrame's client area, while its window top bar is invisible just like it is in its maximized status.
Why? And how to fix it?
|
|
|
|
|
I am trying to save a BMP to file from the ISampleGrabber Interface
In this section of code I 'am basically grabbing the image from a source using the GetCurrent buffer method from ISampleGrabber. I think that i successfully get the buffer, but when i try and save it to BMP file calling the methd WriteDIB(), something goes wrong!! It creates a file with data inside it but the image is not a valid bmp and therefore it does not open by clicking on it.
Any help please....
pMediaFilter->SetSyncSource(NULL);
pControl->Run();
long evCode;
pEvent->WaitForCompletion(INFINITE, &evCode);
long cbBuffer = 0;
hr = pGrabber->GetCurrentBuffer(&cbBuffer, NULL);
char *pBuffer = new char[cbBuffer];
if (!pBuffer)
{
error("out of memory\n");
return 1;
}
hr = pGrabber->GetCurrentBuffer(&cbBuffer, reinterpret_cast<long*(pBuffer));
if(SUCCEEDED(hr))
{
printf("got the buffer!\n");
}
<font color="green">
if(WriteDIB("C:\\EMILIANO.bmp", pBuffer, cbBuffer))
{
printf("created file\n");
}
}<font color="green">
<font color="green">
bool WriteDIB(LPTSTR szFile, HANDLE hDIB, long size)
{
BITMAPFILEHEADER hdr;
LPBITMAPINFOHEADER lpbi;
if (!hDIB)
return false;
FILE* file=0;
file = fopen(szFile,"wb");
if(!file)
return false;
lpbi = (LPBITMAPINFOHEADER)hDIB;
int nColors = 1 << lpbi->biBitCount;
if (nColors > 256)
nColors = 0;
hdr.bfType = ((WORD) ('M' << 8) | 'B');
hdr.bfSize = GlobalSize (hDIB) + sizeof( hdr );
hdr.bfSize = size + sizeof( hdr );
hdr.bfReserved1 = 0;
hdr.bfReserved2 = 0;
hdr.bfOffBits = (DWORD) (sizeof( hdr ) + lpbi->biSize +
nColors * sizeof(RGBQUAD));
fwrite(&hdr, 1, sizeof(hdr),file);
fwrite(lpbi, 1, size ,file);
fclose(file);
return true;
}
|
|
|
|
|
Are you sure that the data arriving at your filter is in the correct format?
Make sure that you don't need to insert any intermediate filters to get the sample in RGB24. One of the easiest ways to check is to use graphedit - see what filters the DirectShow smart connect process is using.
If you can keep you head when all about you
Are losing theirs and blaming it on you;
If you can dream - and not make dreams your master;
If you can think - and not make thoughts you aim;
Yours is the Earth and everything that's in it.
Rudyard Kipling
|
|
|
|
|
Thank you for your response. I have never used Graph edit, I'am just having a look at now,
But what i did do is this in the mean time
AM_MEDIA_TYPE mt;
ZeroMemory(&mt, sizeof(AM_MEDIA_TYPE));
mt.majortype = MEDIATYPE_Video;
mt.subtype = MEDIASUBTYPE_RGB24; <font color="green">setting the sub_type</font>
I am not sure if this is what you meant.. The out come of this is that the file size has got smaller but i still can not open the image.
Any more ideas?? - thanks in advanve -
|
|
|
|
|
Emiliano wrote:
I am not sure if this is what you meant
I'm guessing no it's not. You need to look at the code in the checkmediatype functions.
Emiliano wrote:
The out come of this is that the file size has got smaller but i still can not open the image.
All I can think of is try to find a piece of sample code which you are sure writes bitmaps out correctly - or test that the code you have works. I know I've got one somewhere but I've got an exam today and tomorrow, but I'll try to get back to you ASAP.
When I was doing image processing in DirectShow our team gave up on using the Microsoft sample grabber like this and ended up writing code for our own filter to use callbacks. It was alot of extra work, but it depends how much data you need and what you want to do with it.
It gets easier!
Andrew
If you can keep you head when all about you
Are losing theirs and blaming it on you;
If you can dream - and not make dreams your master;
If you can think - and not make thoughts you aim;
Yours is the Earth and everything that's in it.
Rudyard Kipling
|
|
|
|
|
I wanted to thank you for giving me some tips, I now have managed to solve the problem..
Basically i had 2 main issues.
1. I was not creating the bitmap header correctly.
2. I was passing the wrong image sizes to the bitmap.
Thank you for your suggestions and good luck with your exams. I would still be interested in looking at your code if you do find it as it might be more efficient then what i wrote!!
|
|
|
|
|
Hi, I am trying to catch keystrokes from a modal dialog box in ATL.
I have tried all the usual methods, including the catching the WM_KEYDOWN message with the Message Map, overidding the PreTranslateMessage function and overriding the DialogProc function. These methods all work for the modeless dialog boxes but not my modal one.
Any ideas?
|
|
|
|
|
Hi all,
1. I want to get MAC address of all the client machines in private network of my org. I don't want to use SNMP as the agent should be enabled in all my clients. How to do this??
2. I used WNet calls to enumarate the Client details, I could see only the Name of the machine, Microsoft or Novell, and Node or Container. How can I use the WNet API to get the MAC of all the clients in the private network of my organization ??
Thanks in advance,
Satya
|
|
|
|
|
Not knowing diddly about WNet or having ever gotten a MAC address locally or even over the network here is my stupid suggestion
Doesn't ARP ask "who is ip address such and such?" and then the client with that IP responds with its MAC address. If so, if you have all of the IP addresses of each client on your private network, I would think an ARP "Who is" request work.
Just guessing but it sounds logical.
|
|
|
|
|
I'm not sure what is wrong with my activex control, "Microsoft Web Browser". I add the activex control to my dialog project with no problem. Then I add a member variable to my main dialog class for this activex control. In Visual Studio .net whenever you add a variable for the control, a wrapper class is automatically generated. I believe my problem lies in this automatically generated class. I'm not sure if it's my copy of visual studio .net (2002) but I believe the code being generated for this class is wrong. I have also tried this in VS 6.0 and everything worked fine, and the wrapper class looked completely different. What could be wrong. I haven't been programming in C++ for that long so little things sometimes throw me off, but this time I believe it's a problem with VS .net or my installation of it.
Please Help
This is the wrapper code generated:
<br />
#pragma once<br />
<br />
<br />
<br />
<br />
class CExplorer1 : public CWnd<br />
{<br />
protected:<br />
DECLARE_DYNCREATE(CExplorer1)<br />
public:<br />
CLSID const& GetClsid()<br />
{<br />
static CLSID const clsid<br />
= { 0x8856F961, 0x340A, 0x11D0, { 0xA9, 0x6B, 0x0, 0xC0, 0x4F, 0xD7, 0x5, 0xA2 } };<br />
return clsid;<br />
}<br />
virtual BOOL Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle,<br />
const RECT& rect, CWnd* pParentWnd, UINT nID, <br />
CCreateContext* pContext = NULL)<br />
{ <br />
return CreateControl(GetClsid(), lpszWindowName, dwStyle, rect, pParentWnd, nID); <br />
}<br />
<br />
BOOL Create(LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, <br />
UINT nID, CFile* pPersist = NULL, BOOL bStorage = FALSE,<br />
BSTR bstrLicKey = NULL)<br />
{ <br />
return CreateControl(GetClsid(), lpszWindowName, dwStyle, rect, pParentWnd, nID,<br />
pPersist, bStorage, bstrLicKey); <br />
}<br />
<br />
public:<br />
enum<br />
{<br />
CSC_UPDATECOMMANDS = -1,<br />
CSC_NAVIGATEFORWARD = 1,<br />
CSC_NAVIGATEBACK = 2<br />
}CommandStateChangeConstants;<br />
enum<br />
{<br />
OLECMDID_OPEN = 1,<br />
OLECMDID_NEW = 2,<br />
OLECMDID_SAVE = 3,<br />
OLECMDID_SAVEAS = 4,<br />
OLECMDID_SAVECOPYAS = 5,<br />
OLECMDID_PRINT = 6,<br />
OLECMDID_PRINTPREVIEW = 7,<br />
OLECMDID_PAGESETUP = 8,<br />
OLECMDID_SPELL = 9,<br />
OLECMDID_PROPERTIES = 10,<br />
OLECMDID_CUT = 11,<br />
OLECMDID_COPY = 12,<br />
OLECMDID_PASTE = 13,<br />
OLECMDID_PASTESPECIAL = 14,<br />
OLECMDID_UNDO = 15,<br />
OLECMDID_REDO = 16,<br />
OLECMDID_SELECTALL = 17,<br />
OLECMDID_CLEARSELECTION = 18,<br />
OLECMDID_ZOOM = 19,<br />
OLECMDID_GETZOOMRANGE = 20,<br />
OLECMDID_UPDATECOMMANDS = 21,<br />
OLECMDID_REFRESH = 22,<br />
OLECMDID_STOP = 23,<br />
OLECMDID_HIDETOOLBARS = 24,<br />
OLECMDID_SETPROGRESSMAX = 25,<br />
OLECMDID_SETPROGRESSPOS = 26,<br />
OLECMDID_SETPROGRESSTEXT = 27,<br />
OLECMDID_SETTITLE = 28,<br />
OLECMDID_SETDOWNLOADSTATE = 29,<br />
OLECMDID_STOPDOWNLOAD = 30,<br />
OLECMDID_ONTOOLBARACTIVATED = 31,<br />
OLECMDID_FIND = 32,<br />
OLECMDID_DELETE = 33,<br />
OLECMDID_HTTPEQUIV = 34,<br />
OLECMDID_HTTPEQUIV_DONE = 35,<br />
OLECMDID_ENABLE_INTERACTION = 36,<br />
OLECMDID_ONUNLOAD = 37,<br />
OLECMDID_PROPERTYBAG2 = 38,<br />
OLECMDID_PREREFRESH = 39,<br />
OLECMDID_SHOWSCRIPTERROR = 40,<br />
OLECMDID_SHOWMESSAGE = 41,<br />
OLECMDID_SHOWFIND = 42,<br />
OLECMDID_SHOWPAGESETUP = 43,<br />
OLECMDID_SHOWPRINT = 44,<br />
OLECMDID_CLOSE = 45,<br />
OLECMDID_ALLOWUILESSSAVEAS = 46,<br />
OLECMDID_DONTDOWNLOADCSS = 47,<br />
OLECMDID_UPDATEPAGESTATUS = 48,<br />
OLECMDID_PRINT2 = 49,<br />
OLECMDID_PRINTPREVIEW2 = 50,<br />
OLECMDID_SETPRINTTEMPLATE = 51,<br />
OLECMDID_GETPRINTTEMPLATE = 52<br />
}OLECMDID;<br />
enum<br />
{<br />
OLECMDF_SUPPORTED = 1,<br />
OLECMDF_ENABLED = 2,<br />
OLECMDF_LATCHED = 4,<br />
OLECMDF_NINCHED = 8,<br />
OLECMDF_INVISIBLE = 16,<br />
OLECMDF_DEFHIDEONCTXTMENU = 32<br />
}OLECMDF;<br />
enum<br />
{<br />
OLECMDEXECOPT_DODEFAULT = 0,<br />
OLECMDEXECOPT_PROMPTUSER = 1,<br />
OLECMDEXECOPT_DONTPROMPTUSER = 2,<br />
OLECMDEXECOPT_SHOWHELP = 3<br />
}OLECMDEXECOPT;<br />
enum<br />
{<br />
READYSTATE_UNINITIALIZED = 0,<br />
READYSTATE_LOADING = 1,<br />
READYSTATE_LOADED = 2,<br />
READYSTATE_INTERACTIVE = 3,<br />
READYSTATE_COMPLETE = 4<br />
}tagREADYSTATE;<br />
enum<br />
{<br />
secureLockIconUnsecure = 0,<br />
secureLockIconMixed = 1,<br />
secureLockIconSecureUnknownBits = 2,<br />
secureLockIconSecure40Bit = 3,<br />
secureLockIconSecure56Bit = 4,<br />
secureLockIconSecureFortezza = 5,<br />
secureLockIconSecure128Bit = 6<br />
}SecureLockIconConstants;<br />
enum<br />
{<br />
SWC_EXPLORER = 0,<br />
SWC_BROWSER = 1,<br />
SWC_3RDPARTY = 2,<br />
SWC_CALLBACK = 4<br />
}ShellWindowTypeConstants;<br />
enum<br />
{<br />
SWFO_NEEDDISPATCH = 1,<br />
SWFO_INCLUDEPENDING = 2,<br />
SWFO_COOKIEPASSED = 4<br />
}ShellWindowFindWindowOptions;<br />
<br />
<br />
public:<br />
<br />
<br />
<br />
};<br />
|
|
|
|
|
I have a problem in ED (see sig) where sometimes the status bar panes go blank, even though text has been set in them. This happens quite often, to a very few of my users and may depend on how the PC's are setup and what other software is installed/running.
I have seen it happen, and I've spent a lot of time going over all of the code and cannot see anything wrong. Nor can I find anyway to reproduce the problem. And Spy++ hasn't helped. I get the impression that some other process is getting the MS Status Bar Control to play up, but I have no way of proving that.
Has anyone seen or heard of any problems like this?
Neville Franks, Author of ED for Windows. Free Trial at www.getsoft.com
|
|
|
|
|
Hi,
I need to write a control in C++ that is accessible from visual basic, and maybe even internet explorer.
I think that activeX is the way to do it. ( I am not developing .NET)
Would it be best to do it in ATL or MFC, or both?
Thanks,
Jeremy Pullicino
C++ Developer
Homepage
|
|
|
|
|