|
Hi,
(Windows XP)
When I run the App.EXE , a windows firewall message appears which says would you allow to run this application or what to block it or remind later.
How can I handle this programaticaly that this message should not appear when I run my application
Thanks
Regards.
|
|
|
|
|
zahid_ash wrote: How can I handle this programaticaly that this message should not appear when I run my application
do u want to programmatically add it to the firewall's list of allowed program?if that is the case you can use the netsh DOS command to add App.Exe to the list of allowed programs.
"Every morning I go through Forbes list of 40 richest people in the world. If my name is not in there, I go to work..!!!"
|
|
|
|
|
Could you please exactly tell me how to use this netsh Dos commend - thanks
or any link
Regards.
|
|
|
|
|
(sorry)
I think that's one of the points of a firewall - to prevent unwanted .exes from running. If there was a way to circumvent this programatically, that would defeat the purpose of the firewall, right?
- S
50 cups of coffee and you know it's on!
|
|
|
|
|
Hi,
when using Clipboard.SetDataObject()in my source code, I got the error 'Clipboard': undeclared identifier.
If I add the lines below,
using namespace System::Reflection;
Clipboard = new Clipboard();
Clipboard.SetDataObject(...);
I got 'System is not a class or namespace name' and other errors.
Any advise???
Thank you in advance
|
|
|
|
|
|
That looks suspiciously close to .NET code to me. They don't support much .NET in the realm of c++ so most of us probably haven't a clue.
According to MSDN it says...
"No example is available for C++. "
You'll have to talk to Mr. Tom Archer about that one. He's got a hardly convincing remark about why that is on Microsoft's C++ home page. Ironically, Mr. Archer has a good tutorial on clipboard usage (in native code) here at CP.
|
|
|
|
|
How can i change the main frame shape in MFC?
|
|
|
|
|
|
SetWindowLong(m_hWnd, GWL_STYLE, GetWindowLong(m_hWnd, GWL_STYLE) & (~(WS_CAPTION | WS_BORDER)));
CRect rect;
GetWindowRect(&rect);
int w = rect.Width();
int h = rect.Height();
CRgn rgn1;
rgn1.CreateEllipticRgn(// Your parameters);
SetWindowRgn(static_cast<hrgn>(rgn1.GetSafeHandle()), TRUE);
rgn1.Detach();
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
See Here[^] maybe it is some helpful to you
whitesky
|
|
|
|
|
How to change the visible property of edit control in runtime?
Please help!
|
|
|
|
|
Call ShowWindow(SW_HIDE) on the edit control.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
It is alright now!
Thanks!
|
|
|
|
|
m_edit.ShowWindow(0 or 1);
GetDlgItem(IDC_EDIT1)->ShowWindow(0 or 1);
whitesky
|
|
|
|
|
|
I have done a small project in MFC..as the last part of the project i have to do menu bar..anyone know the best way to do menu bar in mfc application in visual C++...please help me thank you..
|
|
|
|
|
If its a dialog based project go to the resource editor . Create a menu .
Then go to the dialog in the resource editor and right click on it to open the properties. In the properties pop up dialog mention the id of the menu bar you want to attach to the dialog.
In SDI
Create the menu in the resource editor and in your application use LoadMenu()
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
makaveli_07
wrote: I have done a small project in MFC..as the last part of the project i have to do menu bar..anyone know the best way to do menu bar in mfc application in visual C++...please help me thank you..
-Add the Menu resource from the Resources
-Insert the menus into menu bar
-Load the menu using LoadMenu() API
-set the menu to the application using SetMenu() API
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
What type of application is it? If it's a dialog app, call SetMenu() on your dialog window.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
LoadMenu and SetMenu are the functions that you use for Loading and setting it on a frame window or a dialog.
First you must load the menu from a resource which is the best way to do it.
For e.g.
CMenu aMenu;
aMenu.LoadMenu(IDR_MENU1); Then we set it on a frame by calling SetMenu .
For e.g.
SetMenu(&aMenu); And it's mandatory to call DrawMenuBar after you change a menu.
There is a demo in MSDN. Please look up LoadMenu and you will find it.
Nibu thomas
A Developer
Programming tips[^] My site[^]
|
|
|
|
|
If use this function with NULL then curren menu is removed.
if dont have any menu
CMenu m;
m.LoadMenu(AfxGetInstanceHandle(),(LPCTSTR)IDR_MENU1);
SetMenu(&m);
whitesky
|
|
|
|
|
asked in an interview --->
1. Can u change the color of menu bar?
2.How can u change the color of the dialog box initially and what is the function used for changing?
3. How can u change the color of a Button and edit box?
please specify steps in the above cases, if you have a sample code it would be great!!!
thanx in advance
kumar_windows
|
|
|
|
|
kumar_windows wrote:
2.How can u change the color of the dialog box initially and what is the function used for changing?
Override the Wnd::OnCtlColor Method
kumar_windows wrote: How can u change the color of a Button and edit box?
Override the Wnd::OnCtlColor Method
For the method one of the parameter is nctlcolor
CTLCOLOR_BTN Button control
CTLCOLOR_DLG Dialog box
CTLCOLOR_EDIT Edit control
CTLCOLOR_LISTBOX List-box control
CTLCOLOR_MSGBOX Message box
CTLCOLOR_SCROLLBAR Scroll-bar control
CTLCOLOR_STATIC Static control
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
A_Laxman wrote: CTLCOLOR_BTN Button control
Doesn't work with a button. You have to ownerdraw.
Nibu thomas
A Developer
Programming tips[^] My site[^]
|
|
|
|