|
you asked this 3 hours ago here[^]
|
|
|
|
|
But nobody answered.
KIRAN PINJARLA
|
|
|
|
|
Come online
at fitiyal@yahoo.com
|
|
|
|
|
kiran.pinjarla wrote: But nobody answered.
i did !
moreover, you are on a forum, not a chat... 3h is not an acceptable time span to repost a question.
|
|
|
|
|
and in this forum we have toxcct
|
|
|
|
|
I am sorry. I wont repeat this agiain.
KIRAN PINJARLA
|
|
|
|
|
kiran.pinjarla wrote: I wont repeat this agiain
not what i meant, but we have some rules to respect (everybody here, even me) dicted by the webmaster here[^].
nevermind.
|
|
|
|
|
All,
I am working on ATL COM DLL and I am writing a DLL which exposes few interfaces to the application. These interfces can be called either from the VBScript or C++ routine. Any rules which i need to follow especially for having a parameter[[IN], [OUT]. As every one knows that VBScript has data type limitations and we can't pass all the parameters as like in normal. For example the IN and OUT parameter will be used to send and receive values from the interfce and should always be having a VARIANT* data type.
For example:
1. STDMETHODIMP CXX::FUNC_XX( BYTE bnl,BYTE bCurrCl,VARIANT* vSData,BOOL boFlag, SHORT *pRetVal)
2. STDMETHODIMP CXXX::FUNC1_XXX(VARIANT* vReconfig,SHORT *pRetVal)
Please let me know if any one is having suggestions or sample ATL COM DLL which can be called from VBScript.
Thanks,
AKS
|
|
|
|
|
hi aks,
Variant are used for Automation, so after creating the ATL Dll just compile that DLL.
and create an instance of the Dll in VBScript. and pass the the Arugments from the VBScript.
VARIANT is used for that purpose only it is used for Purely Automation Purpose.
good luck.
Uday kiran
|
|
|
|
|
im using VisualStudio2005 and everytime i hit F5 to compile VS is compiling all files for the project instead of just the files i have modified! - has anyone come across this before?
I was thinking that some where alongthe lines a file like stdafx.h was getting modified causing
the knock on effect to compile the whole project but i am not changing this or similar files!
|
|
|
|
|
The usual cause for that situation is one of your files (or a header file in your include path) has had its last-modified timestamp changed to a date in the future.
--Mike--
Visual C++ MVP
LINKS~! Ericahist | PimpFish | CP SearchBar v3.0 | C++ Forum FAQ
|
|
|
|
|
hmmmm.... i guess what i need is a a utility where you can watch a directory and see if any files change! - Then i could point it at my project files
|
|
|
|
|
hi friends,
Can any one suggest me detailed steps to have owner draw menus in a dialog based application.I referred some articles from codeguru and codeproject,but i didnot get a neat idea about it.
|
|
|
|
|
|
hi,
Thanks for ur reply.I have done that application but i got errors.And other than this i have found no article with a neat description.Can you suggest any other useful article.
Thanks in advance,
Radhika.
|
|
|
|
|
|
The error i got it is,
fatal error C1083: Cannot open include file: 'NewMenu.h': No such file or directory.(in stdAfx.h file)
If i make that particular line as a comment i am getting so many errors like,E:\DownLoads\ownerdrawmenu\ownerdrawmenu.cpp(45) : error C2653: 'CNewMenu' : is not a class or namespace name
E:\DownLoads\ownerdrawmenu\ownerdrawmenu.cpp(45) : error C2065: 'SetMenuDrawMode' : undeclared identifier
E:\DownLoads\ownerdrawmenu\ownerdrawmenu.cpp(45) : error C2653: 'CNewMenu' : is not a class or namespace name
E:\DownLoads\ownerdrawmenu\ownerdrawmenu.cpp(45) : error C2065: 'STYLE_XP' : undeclared identifier
ownerdrawmenuDlg.cpp
E:\DownLoads\ownerdrawmenu\ownerdrawmenuDlg.cpp(18) : error C2504: 'CNewDialog' : base class undefined
E:\DownLoads\ownerdrawmenu\ownerdrawmenuDlg.cpp(41) : error C2614: 'CAboutDlg' : illegal member initialization: 'CNewDialog' is not a base or member
E:\DownLoads\ownerdrawmenu\ownerdrawmenuDlg.cpp(48) : error C2248: 'DoDataExchange' : cannot access protected member declared in class 'CWnd'
c:\program files\microsoft visual studio\vc98\mfc\include\afxwin.h(2414) : see declaration of 'DoDataExchange'
E:\DownLoads\ownerdrawmenu\ownerdrawmenuDlg.cpp(48) : error C2352: 'CWnd::DoDataExchange' : illegal call of non-static member function
c:\program files\microsoft visual studio\vc98\mfc\include\afxwin.h(2414) : see declaration of 'DoDataExchange'
E:\DownLoads\ownerdrawmenu\ownerdrawmenuDlg.cpp(53) : error C2653: 'CNewDialog' : is not a class or namespace name
E:\DownLoads\ownerdrawmenu\ownerdrawmenuDlg.cpp(64) : error C2614: 'COwnerdrawmenuDlg' : illegal member initialization: 'CNewDialog' is not a base or member
E:\DownLoads\ownerdrawmenu\ownerdrawmenuDlg.cpp(74) : error C2653: 'CNewDialog' : is not a class or namespace name
E:\DownLoads\ownerdrawmenu\ownerdrawmenuDlg.cpp(80) : error C2653: 'CNewDialog' : is not a class or namespace name
E:\DownLoads\ownerdrawmenu\ownerdrawmenuDlg.cpp(85) : error C2065: 'ON_WM_InitMenuPopup' : undeclared identifier
E:\DownLoads\ownerdrawmenu\ownerdrawmenuDlg.cpp(85) : error C2065: 'pMenu' : undeclared identifier
E:\DownLoads\ownerdrawmenu\ownerdrawmenuDlg.cpp(85) : error C2065: 'nIndex' : undeclared identifier
E:\DownLoads\ownerdrawmenu\ownerdrawmenuDlg.cpp(85) : error C2065: 'bSysMenu' : undeclared identifier
E:\DownLoads\ownerdrawmenu\ownerdrawmenuDlg.cpp(87) : error C2059: syntax error : '{'
E:\DownLoads\ownerdrawmenu\ownerdrawmenuDlg.cpp(87) : error C2143: syntax error : missing ';' before '{'
E:\DownLoads\ownerdrawmenu\ownerdrawmenuDlg.cpp(87) : error C2447: missing function header (old-style formal list?)
E:\DownLoads\ownerdrawmenu\ownerdrawmenuDlg.cpp(87) : error C2143: syntax error : missing ';' before '}'
E:\DownLoads\ownerdrawmenu\ownerdrawmenuDlg.cpp(94) : error C2653: 'CNewDialog' : is not a class or namespace name
E:\DownLoads\ownerdrawmenu\ownerdrawmenuDlg.cpp(96) : error C2065: 'm_DefaultNewMenu' : undeclared identifier
E:\DownLoads\ownerdrawmenu\ownerdrawmenuDlg.cpp(96) : error C2228: left of '.LoadToolBar' must have class/struct/union type
E:\DownLoads\ownerdrawmenu\ownerdrawmenuDlg.cpp(130) : error C2039: 'DoModal' : is not a member of 'CAboutDlg'
E:\DownLoads\ownerdrawmenu\ownerdrawmenuDlg.cpp(17) : see declaration of 'CAboutDlg'
E:\DownLoads\ownerdrawmenu\ownerdrawmenuDlg.cpp(134) : error C2653: 'CNewDialog' : is not a class or namespace name
E:\DownLoads\ownerdrawmenu\ownerdrawmenuDlg.cpp(163) : error C2653: 'CNewDialog' : is not a class or namespace name
Generating Code...
Error executing cl.exe.
ownerdrawmenu.exe - 26 error(s), 0 warning(s)
Thanks,
Radhika.
|
|
|
|
|
all error are related to first error. Locate 'NewMenu.h' and include it appropriately.
|
|
|
|
|
It seems your error "NewMenu.h" did you include this file and path is correct
|
|
|
|
|
Thanks for your suggestion i have gave the path wrong.But again some errors came.The errors came in the places where i have changed of CDialog to CNewDialog and also at the membervariable statement( m_DefaultNewMenu.LoadToolBar(IDR_MAINFRAME);) which is a statement in oninitdialog function.In the code project sample application they didnot gave the type of that member variable.The errors i got are,
E:\DownLoads\ownerdrawmenu\ownerdrawmenuDlg.cpp(64) : error C2614: 'COwnerdrawmenuDlg' : illegal member initialization: 'CNewDialog' is not a base or member
E:\DownLoads\ownerdrawmenu\ownerdrawmenuDlg.cpp(74) : error C2248: 'DoDataExchange' : cannot access protected member declared in class 'CWnd'
c:\program files\microsoft visual studio\vc98\mfc\include\afxwin.h(2414) : see declaration of 'DoDataExchange'
E:\DownLoads\ownerdrawmenu\ownerdrawmenuDlg.cpp(74) : error C2352: 'CWnd::DoDataExchange' : illegal call of non-static member function
c:\program files\microsoft visual studio\vc98\mfc\include\afxwin.h(2414) : see declaration of 'DoDataExchange'
E:\DownLoads\ownerdrawmenu\ownerdrawmenuDlg.cpp(80) : error C2248: 'messageMap' : cannot access protected member declared in class 'CNewDialog'
e:\downloads\ownerdrawmenu\newmenu.h(896) : see declaration of 'messageMap'
E:\DownLoads\ownerdrawmenu\ownerdrawmenuDlg.cpp(85) : error C2065: 'ON_WM_InitMenuPopup' : undeclared identifier
E:\DownLoads\ownerdrawmenu\ownerdrawmenuDlg.cpp(85) : error C2065: 'pMenu' : undeclared identifier
E:\DownLoads\ownerdrawmenu\ownerdrawmenuDlg.cpp(85) : error C2065: 'nIndex' : undeclared identifier
E:\DownLoads\ownerdrawmenu\ownerdrawmenuDlg.cpp(85) : error C2065: 'bSysMenu' : undeclared identifier
E:\DownLoads\ownerdrawmenu\ownerdrawmenuDlg.cpp(87) : error C2059: syntax error : '{'
E:\DownLoads\ownerdrawmenu\ownerdrawmenuDlg.cpp(87) : error C2143: syntax error : missing ';' before '{'
E:\DownLoads\ownerdrawmenu\ownerdrawmenuDlg.cpp(87) : error C2447: missing function header (old-style formal list?)
E:\DownLoads\ownerdrawmenu\ownerdrawmenuDlg.cpp(87) : error C2143: syntax error : missing ';' before '}'
E:\DownLoads\ownerdrawmenu\ownerdrawmenuDlg.cpp(94) : error C2352: 'CNewDialog::OnInitDialog' : illegal call of non-static member function
e:\downloads\ownerdrawmenu\newmenu.h(888) : see declaration of 'OnInitDialog'
E:\DownLoads\ownerdrawmenu\ownerdrawmenuDlg.cpp(121) : error C2065: 'm_DefaultNewMenu' : undeclared identifier
E:\DownLoads\ownerdrawmenu\ownerdrawmenuDlg.cpp(121) : error C2228: left of '.LoadToolBar' must have class/struct/union type
E:\DownLoads\ownerdrawmenu\ownerdrawmenuDlg.cpp(135) : error C2248: 'OnSysCommand' : cannot access protected member declared in class 'CWnd'
c:\program files\microsoft visual studio\vc98\mfc\include\afxwin.h(2330) : see declaration of 'OnSysCommand'
E:\DownLoads\ownerdrawmenu\ownerdrawmenuDlg.cpp(135) : error C2352: 'CWnd::OnSysCommand' : illegal call of non-static member function
c:\program files\microsoft visual studio\vc98\mfc\include\afxwin.h(2330) : see declaration of 'OnSysCommand'
E:\DownLoads\ownerdrawmenu\ownerdrawmenuDlg.cpp(164) : error C2248: 'OnPaint' : cannot access protected member declared in class 'CWnd'
c:\program files\microsoft visual studio\vc98\mfc\include\afxwin.h(2295) : see declaration of 'OnPaint'
E:\DownLoads\ownerdrawmenu\ownerdrawmenuDlg.cpp(164) : error C2352: 'CWnd::OnPaint' : illegal call of non-static member function
c:\program files\microsoft visual studio\vc98\mfc\include\afxwin.h(2295) : see declaration of 'OnPaint'
Error executing cl.exe.
ownerdrawmenu.exe - 19 error(s), 0 warning(s)
|
|
|
|
|
it seems you have a problem with use this article how do you use this article
|
|
|
|
|
hi,
The steps i have done are,
1.First i have created a dialog based application and added the following statement in the InitInstance function in app class CNewMenu::SetMenuDrawMode(CNewMenu::STYLE_XP);.
2.Next i changed the name of CDialog to CNewDialog where ever it is there.
3.Next i have added the following statement in the dialog class m_DefaultNewMenu.LoadToolBar(IDR_MAINFRAME);.
4.Next i have included New menu.h in stdafx.h and i have added Newmenu.cpp in the project.
5.Next i have added message handler for initial menu pop up function in dlg class header file and added the function code in the source file.
Thanks radhika.
|
|
|
|
|
which methods i have to use in vc++ in order to generate a UDP application
|
|
|
|
|
hi,
In the Wizard of any SDI,Dialog based it ask any support of TCP.
A Check box for TCP/IP support will be supplied in the Wizard. Check that Support.
or Else. Add the "afxsocket.h" Header and "winsock.lib" in the Project Settings of the Linkage Tab of the Property Tab.
which will solve your problem.
Socket s;
s.Create(SOCK_DGRAM); //For UDP.
good luck.
Uday kiran
|
|
|
|
|
In my program I hook the registry query's of another program and instead read them from an INI file. To do this I use the following code:
<br />
LONG __stdcall Mine_RegQueryValueExA(<br />
HKEY hKey,<br />
LPCTSTR lpValueName,<br />
LPDWORD lpReserved,<br />
LPDWORD lpType,<br />
LPBYTE lpData,<br />
LPDWORD lpcbData<br />
)<br />
<br />
{<br />
char * filename = "\\Lapwing.ini";<br />
char buffer[_MAX_PATH];<br />
_getcwd(buffer, _MAX_PATH); <br />
strcat(buffer, filename);<br />
<br />
char ReturnedString [ MAX_PATH + 1 ] ;<br />
unsigned int nSize = MAX_PATH;<br />
GetPrivateProfileStringA("Section" , lpValueName, "\255", ReturnedString, nSize, buffer);<br />
lpData = reinterpret_cast <LPBYTE> (ReturnedString);<br />
LONG rv = ERROR_SUCCESS;<br />
return rv;<br />
<br />
<br />
__try {<br />
rv = Real_RegQueryValueExA (hKey,lpValueName,lpReserved,lpType,lpData,lpcbData);<br />
} __finally {};<br />
<br />
return rv;<br />
}<br />
Now this works really well, the information is read from the file and is converted back into an LPBYTE, however the program never seems to get the information, is there something else I need to do?
|
|
|
|