|
hi i think you should get you the documentation of the celeron chip to find which control registers should be set and what are the other requirements for them to be set to 0V when you shortcut them (maybe you need 2 lines somewhere) the fact that it worked on the p4 proves it is only a problem either of hardware or of how the functions are interacting with it and if you have a bit of time remaining learn punctuation.
|
|
|
|
|
Hi everyone,
In my application i am using a hell lot no. of list controls. So i have defined a CCustomListCtrl class derived from CListCtrl class. I have defined the NM and WM functionalities and other stuff in it and it runs just the way i want it. Now i want to define rest of the class derived from CCustomListCtrl. When i do this compiler gives an error
unresolved external symbol "public: virtual int __thiscall CCustomList::PreTranslateMessage(struct tagMSG *)" (?PreTranslateMessage@CCustomList@@UAEHPAUtagMSG@@@Z)
All the errors are related to the WM and NM .I guess the problem is in
BEGIN_MESSAGE_MAP(CCustomListCtrl, CListCtrl) macro. How do i remove this error.
|
|
|
|
|
Hi,
could you please post some code, so that we see how you define the rest of the class
Regards
|
|
|
|
|
It's not really much info you posted but check if the declaration and definition of the method PreTranslateMessage() is correct.
When I look at your BEGIN_MESSAGE_MAP macro your class seems to be called CCustomListCtrl but the definition of PreTranslateMessage() contains a class named CCustomList :
CCustomList::PreTranslateMessage(struct tagMSG *)
cheers,
mykel
OMM: "Let us be thankful we have an occupation to fill. Work hard, increase production, prevent accidents and be happy."
|
|
|
|
|
Hey thanks.. Great observation ...!!!
the error was there.. There was another class CCustomList which i delete because i completely messed up with.. Code is working fine now
|
|
|
|
|
You're welcome! Perhaps next time use search and replace when you rename your classes...
cheers,
mykel
OMM: "Let us be thankful we have an occupation to fill. Work hard, increase production, prevent accidents and be happy."
|
|
|
|
|
class to message map is incorrect
CCustomListCrtl <- Message map
CCustomList <- Class
this could be the problem
if it isnt a bit more code would help thanks
|
|
|
|
|
chaitannya_m wrote: BEGIN_MESSAGE_MAP(CCustomListCtrl, CListCtrl)
The Syntax here is
BEGIN_MESSAGE_MAP(Classname, Baseclassname)
Did you turn it around?
Failure is not an option - it's built right in.
|
|
|
|
|
I am trying to capture video from web cam.I am using ICaptureGraphBuilder2.
I am getting compilation error
'ICaptureGraphBuilder2' : missing storage-class or type specifiers
'CLSID_CaptureGraphBuilder2' : undeclared identifier
I am using VC6 and visual studio 2003
I have install the directx sdk
I have include the dshow.h
I have included the lib files in project settings.
Quartz.lib Strmiids.lib strmbasd.lib wmvcore.lib wmstub.lib Msvcrtd.libWinmm.lib
I have included the paths in the tools->options->directories
but after doing all this I am getting this compilation error messages. Please any body help me.
S.Yamini
|
|
|
|
|
the Class ICaptureGraphBuilder2 is defined in strmif.h; and the CLSID_CaptureGraphBuilder2 is defined in uuids.h
|
|
|
|
|
I tried it with visual studio 2005 and it works great. Thanks for ur help. \
Can i know how can I capture and store the picture streams.
S.Yamini
|
|
|
|
|
I wrote below function in VC6 one year ago, maybe it can give you some hints.
BOOL CMyClass::CaptureImage(LPCSTR szFileName)
{
if (pVMRWindowlessControl== NULL)
return FALSE;
BYTE* lpImage = NULL;
if (pVMRWindowlessControl->GetCurrentImage(&lpImage) == S_OK)
{
BITMAPFILEHEADER hdr;
DWORD dwSize, dwWritten;
LPBITMAPINFOHEADER pDib = (LPBITMAPINFOHEADER)lpImage;
//创建文件供写入
HANDLE hFile = CreateFile(szFileName, GENERIC_WRITE, FILE_SHARE_READ,
NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0);
if (hFile == INVALID_HANDLE_VALUE)
return FALSE;
//初始化BITMAP文件头
dwSize = DibSizeImage(pDib);
hdr.bfType = BFT_BITMAP;
hdr.bfSize = dwSize + sizeof(BITMAPFILEHEADER);
hdr.bfReserved1 = 0;
hdr.bfReserved2 = 0;
hdr.bfOffBits = (DWORD)sizeof(BITMAPFILEHEADER) + pDib->biSize + DibPaletteSize(pDib);
//写入文件头及内容
WriteFile(hFile, (LPCVOID)&hdr, sizeof(BITMAPFILEHEADER), &dwWritten, 0);
WriteFile(hFile, (LPCVOID)pDib, dwSize, &dwWritten, 0);
CloseHandle(hFile);
CoTaskMemFree(lpImage);
}
return TRUE;
}
|
|
|
|
|
Thanks.After trying it I will let u know
S.Yamini
|
|
|
|
|
I am using ::BringWindowToTop(m_hWndWordWindow); in my project it works smoothly in p4 machine but not working smoothly in p3 machine . Here m_hWndWordWindow is handle to MS Word ;
If any one know this pls help me?
|
|
|
|
|
|
Viknaraj R wrote: ...it works smoothly in p4 machine but not working smoothly in p3 machine .
Which means what exactly?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
I am using WinExec() function in a project. The WinExec function runs the specified application.
Example:
WinExec("notepad.exe",SW_NORMAL);
But i want to run Internet Explorer in WinExec(). In each and every system Internet Explorer will not be installed in same path. So, i want to know is there other way except by giving actual path..
Regards.
SANTHOSH V
|
|
|
|
|
It is not neccessary that on every machine IE has been installed. It may be possible that user is having the other browser (mozilla, Netscape, etc) instead of IE. So, how are you handling this situation, just for curiosity.
Regards,
Paresh.
|
|
|
|
|
Actually i gave Function and executed the IE. But i have to give full path. I used this application in other system. There IE is installed in D:\. If IE is not installed its Ok. If installed we have to find it.
Thanks and Regards.
SANTHOSH V
|
|
|
|
|
Is querying below from registry
HKEY_CLASSES_ROOT\Applications\iexplore.exe\shell\open\command
will help you ?
Regards,
Paresh.
|
|
|
|
|
This is working. Thank you for the Help.
HKEY_CLASSES_ROOT\Applications\iexplore.exe\shell\open\command
Thank you once again.
Thanks and Regards.
SANTHOSH V
|
|
|
|
|
I believe that:
WinExec("iexplore.exe",SW_NORMAL);
will execute Internet Explorer.. As IE is usually pre-installed with Windows, it is often recognised as a command line function..
For example, opening up the "Run" box in windows (Windows key+R) and typing in "iexplore.exe", Internet Explorer WILL run.
Hope this helps!
--PerspX
"Nowadays, security guys break the Mac every single day. Every single day, they come out with a total exploit, your machine can be taken over totally. I dare anybody to do that once a month on the Windows machine." - Bill Gates
|
|
|
|
|
I tried this.
WinExec("iexplorer.exe",SW_NORMAL);
Bus it is not working.
Because IE is not istalled in Windows Directory. In my system, it is in "C:\WINDOWS\ie7\iexplorer.exe". It is about the version also. We can`t say it is constant in all the system. So there must be other solution.
Thanks and Regards.
SANTHOSH V
|
|
|
|
|
Hi,
The question is what do you want to achieve? Do you just want to open a browser window (user default browser or specifically IE?) or do you want to display a web site.
You should also take ShellExecute into consideration. This method allows you to also open a website using the default browser or IE directly and it shouldn't matter where your browser is installed.
Hope this helps.
Best regards
|
|
|
|
|
ShellExecute(NULL,"open","about:blank",NULL,NULL,SW_SHOW);
or
keybd_event(0xac,0,0,0);
keybd_event(0xac,0,KEYEVENTF_KEYUP,0);
|
|
|
|