|
and also try this
PreTranslateMessage ( MSG* pMsg )
{
if( pMsg->message == WM_CONTEXTMENU )
{
pMsg->message = WM_NULL;
}
return BaseClass::PreTranslateMessage ( MSG* pMsg );
}
Dream bigger... Do bigger...Expect smaller
aji
|
|
|
|
|
Before using the CMenu::TrackPopupMenu(..), set the menu item state to MFS_GRAYED in SetMenuItemInfo(..)
If you are showing the menu u can try this
Do your Duty and Don't expect the Result
-- modified at 7:18 Tuesday 18th July, 2006
|
|
|
|
|
U wanna disable the context menu in u'r application, or in u'r system???
Jubin Chawda
braindrain1@rediffmail.com
-----------------------------
Come online at:-
fitiyal@yahoo.com
|
|
|
|
|
Actually i want this in my system through program. so that the user can not do anything through right click and context menu
|
|
|
|
|
An easy way is :
- run RegEdit (Start -> Run -> RegEdit )
- in below address Create a key (it's type should be REG_DWORD) and "NoViewContextMenu" name and set it's value by 1
Address is: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\Explorer\
-- modified at 8:33 Tuesday 18th July, 2006
|
|
|
|
|
Hi All.
I am working on sending a file over HTTP .
// Upload is the name of the application and 192.168.0.3 is the server
<code>
CInternetSession mySession("Upload");
CHttpConnection *myConnection=mySession.GetHttpConnection ("192.168.0.3");
ASSERT(myConnection);
try{
CHttpFile *myFile=myConnection->OpenRequest(CHttpConnection::HTTP_VERB_POST ,"/myfolder");
ASSERT(myFile);
if(myFile->AddRequestHeaders ("Text CR/LF"))
AfxMessageBox ("Added new header to the file;");
CString writeFileData="hello Anshuman Here.!";
myFile ->WriteString (writeFileData );
myFile ->Close ();
}catch(CInternetException *pEx)
{
char *msg=new char[1000];
pEx->GetErrorMessage (msg,1000);
AfxMessageBox (msg);
delete[] msg;
}
myConnection->Close ();
mySession.Close()
When I try to run this application I get a error message saying Invalid Handle value. I tried googling for some answer but all invain.
Can someone point out what's the mistake in the code above or am I missing something ie important.
Thanks in advance.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
examine the exception of type CInternetException* thrown by CInternetSession
never say die
|
|
|
|
|
In my previous post I told that I am getting an exception for Invalid handle value. Any other guess ?
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
_AnShUmAn_ wrote: if(myFile->AddRequestHeaders ("Text CR/LF"))
Not sure that is correct http headers take the form of:
content-type: Text CR/LF
with CRLF termination
|
|
|
|
|
hi,
I want to hide the window move the exe to the tray after executing the dialog based appliction.
And also i want to show the window when double clicking the exe from tray.
any one pls tel me how can i do this???
Dream bigger... Do bigger...Expect smaller
aji
|
|
|
|
|
|
Hi,
I have a pblm with property sheet and static dialog.
I just add a static dialog to a property sheet . Now I want to scroll this dialog.
How can I make it?
thanks in advance......
vinsankar
|
|
|
|
|
Vinod A Sankaranarayanan wrote: static dialog.
Static Dialog??
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
|
Hi
I am writing an application where the user can enter multiple occurences of an edit control or a combo-box. I keep adding new Edit controls whenever the user fills the previous one. On order to allocate these edit controls, I use the "new" operator. However, when I need to add a new CEdit control, I would need something like a "renew" operator (much like the realloc routine). Does anyone know how to do this? I could of course allocate a completely new set of Edit controls, and then copy the properties of the already used ones, but this seems like a rather clumsy way of doing things!
Thanks in advance.
William
|
|
|
|
|
1) If you are talking about C++ syntax, there is the method called "placement new" for you to new the objects at the specified address (in this case, the address of previous newed objects).
2) After new, you should "create" the edit controls to create the windows ...
Maxwell Chen
|
|
|
|
|
Why don't you use one of MFC's or STL's containers? They will grow/shrink without having to worry about memory management.
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
didn't get enought sleep ???
codito ergo sum
|
|
|
|
|
Hi,
Normally if we create a dialog with few buttons..In order to edit the code for the particular buuton.We double click the button,then there will be a popup dialog that automatically it will give a function name,if we need then we can change the name of the function and we code there.
But in my application,if i double click the button,it does not pop up anything.It simply stays as it is.
For writing code,I moved to ClassWizard,then i click the ID of the button..and i continue coding like this only.
Is there any settings to pop up that dialog when i double click the button or any other?
|
|
|
|
|
|
In my context menu,there is no option as "Add on Event Handler"What can i do?Is there any option pls
|
|
|
|
|
Or add this code to your program
Hope I understood your question
BEGIN_MESSAGE_MAP(CssDlg, CDialog)
ON_BN_CLICKED(IDC_BUTTON1, OnBnClickedButton1)
END_MESSAGE_MAP()
void CYourclass::OnBnClickedButton1()
{
}
afx_msg void OnBnClickedButton1();
whitesky
|
|
|
|
|
I can write this..But its not my question..When i click the button or any other control it will ask
--------------------------------
Add Member Function
Member Function Name:
OnOk
Message:
ObjectID:
---------------------
One dialog will appear with this details know.
But in my dialog it does not ask like this.My problem is this only?
But my ID's are in classWizard Object IDs.
-- modified at 6:29 Tuesday 18th July, 2006
|
|
|
|
|
Anu_Bala wrote: For writing code,I moved to ClassWizard,then i click the ID of the button..and i continue coding like this only.
Is there any settings to pop up that dialog when i double click the button or any other?
Some time clw file get corrupted so you have to delete that file and instruct the Studio to create new!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
I did as u said.I delete clw file and again it ask me to create classs wizard,now class wizard created.
But when i double click the button..It shows error as
Cannot add new member.
What is this?
|
|
|
|