|
Hi,
Ive created a VC++ project that automates MS-Office applications. I want to convert it to a DLL so i can call the DLL frokm MATLAB 7. Is it possible to do a direct conversion or do i have to create the DLL from scratch. If anyone knows the steps/code please reply.
Thanks
E.S
|
|
|
|
|
this[^] may be of some help. There was a better guide to doing this on CP but I can't seem to find it at the moment.
|
|
|
|
|
I am using WMI in VC++. But there is to be a problem when i try to connect to a Remote Host . The machine I am trying to connect has Windows 2000 on it and I have Windows XP installed on my machine. Here is the code -
// Initialize Security
hrRetVal = CoInitializeSecurity(NULL,
-1,
NULL,
NULL,
RPC_C_AUTHN_LEVEL_CALL,
RPC_C_IMP_LEVEL_IMPERSONATE,
NULL,
EOAC_NONE,
0);
// CreateInstance
hrRetVal = CoCreateInstance(CLSID_WbemLocator,
NULL,
CLSCTX_INPROC_SERVER | CLSCTX_LOCAL_SERVER,
IID_IWbemLocator,
(void **) &pWbemLocator);
BSTR bsNameSpace = SysAllocString(L"//impartials/root/cimv2");
BSTR bsUserName = SysAllocString(L"dchauhan");
BSTR bsPassword = SysAllocString(L"rajvada");
// Connect to the Server
hrRetVal = pWbemLocator->ConnectServer(bsNameSpace,
bsUserName,
bsPassword,
0,
NULL,
NULL,
0,
&pWbemServices);
// Query the Proxy Blanket for Authorization Level
hrRetVal = CoQueryProxyBlanket(pWbemServices,
NULL,
NULL,
NULL,
&dwAuthLevel,
NULL,
NULL,
NULL);
// Set the Proxy Blanket to the Authorization Level
hrRetVal = CoSetProxyBlanket(pWbemServices,
RPC_C_AUTHN_WINNT,
RPC_C_AUTHZ_NAME,
NULL,
dwAuthLevel,
RPC_C_IMP_LEVEL_IMPERSONATE,
NULL,
EOAC_NONE);
// Execute Query
hrRetVal = pWbemServices->ExecQuery(L"WQL",
L"Select * from Win32_Service",
WBEM_FLAG_RETURN_IMMEDIATELY,
NULL,
&pEnumObject);
Over here, i receive an Access Denied error. I am not getting what is the problem. Any help would be appreciated.
TobeyMag
|
|
|
|
|
How to remove all menus created by MFC APPWizard in MDI,
Both in MainFrame and ChildFrames.
In SDI,i we can add following code to the
MainFrame::PrecreateWindow()
if(cs.hMenu!=NULL)
{
::DestroyMenu(cs.hMenu); // delete menu if loaded
cs.hMenu = NULL; // no menu for this window
}
So,the menu is not created ,and we can't see the menu any more!
However ,when i add this code to the MDI application,the menus in Mainframe and childframes are still created!
any one who can tell me how to solve this problem?
this problem puzzled me for long time!
Thanks!
Brusaprk
|
|
|
|
|
Here[^]
Nibu thomas
Software Developer
|
|
|
|
|
HI joey Bloggs!
thank you for your reply!
i add the SetMenu(NULL).it works!@thank you very much,
but still has problems..
I add the micros to the ChildFrame as you metioned manually(there isn't WM_MDISETMENU message in my class wizard of VC6)as follow:
in the childfrm.cpp:
BEGIN_MESSAGE_MAP(CChildFrame, CMDIChildWnd)
ON_MESSAGE(WM_MDISETMENU , OnMDISetMenu )
ON_MESSAGE(WM_MDIREFRESHMENU, OnMDIRefreshMenu)
END_MESSAGE_MAP()
and int the childfrm.h i add :
afx_msg void OnMDIRefreshMenu();
afx_msg void OnMDISetMenu();
but int the functions OnMDISetMenu() and OnMDIRefreshMenu(),it can't receive the message WM_MDISETMENU and WM_MDIREFRESHMENU!
could you explain it detailedly?
thanks a lot!
bruspark
|
|
|
|
|
bruspark wrote: BEGIN_MESSAGE_MAP(CChildFrame, CMDIChildWnd)
ON_MESSAGE(WM_MDISETMENU , OnMDISetMenu )
ON_MESSAGE(WM_MDIREFRESHMENU, OnMDIRefreshMenu)
END_MESSAGE_MAP()
Not there, but inside CMainFrame .
Nibu thomas
Software Developer
|
|
|
|
|
|
in the mainframe.cpp remove following lines from OnCreate() method.
<br />
if(!m_wndToolBar.CreateEx() ...<br />
.<br />
.<br />
.<br />
m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);<br />
EnableDocking(CBRS_ALIGN_ANY);<br />
DockControlBar(&m_wndToolBar);<br />
-Saurabh
|
|
|
|
|
Hello Experts,
I want to read .cer file generated by RootCA. I want to encrypt scramble it with some garbage data and make .cer file unsuable, then I want to remove the garbage data from .cer file so it could be useful again.
I wanna do it because if I give anybody a .cer file to install it on some machine, he should not be able to steal it. The only way this .cer file could be installed in Authority Store is by my program which gets the confirmation before removing the garbage data from a webservice and sends that webservice client's IP and username.
I tried opening the file in C and C++ both couldnt read the file. Can I do it in VC++?. If I can then how?
Thanks Alot in Advance
|
|
|
|
|
I want to write a console based GUI program in vc++, that will
run in DOS ,even in absent of WINDOWS os.is it possible,if then how.
please give me some idea.
nirmal
|
|
|
|
|
U can try creating a new project win32 Console Applicatoin ..it may help u
|
|
|
|
|
No, it can't be done. A graphical user interface program requires a graphical operating system. It doesn't have to be windows, but it sure can't just be DOS.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Thanks for ur view
nirmal
|
|
|
|
|
There is a game programing library called Allegro which is able to run in DOS, it's GUI it's a bit poor, but nontheless it may help you. www.allego.cc
|
|
|
|
|
There have been GUI programs even back in the DOS days (and before!). For example, CURSES can be used on Unix platforms to implement GUIs like how Turbo C/Pascal did in the DOS days.
First, you need to define what you mean by "GUI" do you want non-character-based graphics, or are character graphics good enough? For example, if you are happy with buttons looking like one of these:
+--------+ /--------\
| OK | | OK | [OK]
+--------+ \--------/ -Or using a different colors to represent depth, tou can do that using standard ASCII characters. Hell, even extended ASCII characters used to be used to draw lines/boxes/frames, etc - anyone ever use a PC-based BBS before, or remember The Draw?
-=- James If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! DeleteFXPFiles & CheckFavorites (Please rate this post!)
|
|
|
|
|
James R. Twine wrote: For example, CURSES can be used on Unix platforms...
That brings back memories. I believe Unix uses XWindows these days.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
Hi,
In the creation of MFC application
MFC AppWizard – Step 2 of 4 ,
What other support would you like to include?
Automation.
I want to know if we check this option Automation during the creation of the application what features will be added to our application ?? what are its advantages ???? can anyone please tell me…
Regards,
Parichay.
|
|
|
|
|
This would be best answered by just doing it. Create two projects, one with Automation support, and the other without. Compare them.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
Hi,
I have 3 Dialog window , when the application runs it loads the initial dialog DTDlg from there when I click on next button it opens the 2nd dialog window I have used ( m_dUpdateDlg.DoModal (); ) code to open the 2nd window. From 2nd window when click on next window button it opens the 3rd window
( m_dStatusDlg.DoModal (); )
In this process all the 3 window will be open one above the other I want to know how close the 2nd dialog window then open the 3r d window.??
Please can anyone tell me how to close and then open other dialog window??
Regards,
Parichay.
|
|
|
|
|
where have u put in the code to for calling the constructor for dialogs..?
|
|
|
|
|
void CCreateDlg::OnOk()
{
// TODO: Add your control notification handler code here
int iResults; // This variable will capture the button selection
// Ask the user
iResults = MessageBox("Would u like to add documetns to the index now",
"Desktop Search",MB_YESNO | MB_ICONQUESTION);
// Determine which button the user clicked
// Give the user a message showing which button was clicked
switch (iResults)
{
case IDYES: // The Yes button?
//call the Update dialog window if user press yes
m_dUpdateDlg.DoModal ();
break;
case IDNO: // The No button?
OnOK();
break;
}
}
i have added the code on ok button when user press yes it opens the 2nd dialog box , iwant to know how to close the present dialog box then open the new dialog box.
|
|
|
|
|
Try keeping the oonok call outside swich... it shuld work.... as i have done below
void CCreateDlg::OnOk()
{
// TODO: Add your control notification handler code here
int iResults; // This variable will capture the button selection
// Ask the user
iResults = MessageBox("Would u like to add documetns to the index now",
"Desktop Search",MB_YESNO | MB_ICONQUESTION);
// Determine which button the user clicked
// Give the user a message showing which button was clicked
switch (iResults)
{
case IDYES: // The Yes button?
//call the Update dialog window if user press yes
m_dUpdateDlg.DoModal ();
break;
case IDNO: // The No button?
break;
}
OnOK();
}
|
|
|
|
|
I changed the code i placed the OnOK() after switch but dialog box is not closing. still the 2nd window is open .. can plz tell me anymore solutins??
|
|
|
|
|
When you are calling the next dialog witn DoModal use EndDialog() before calling the next dialog.
|
|
|
|