|
maybe it is some helpful to you
/////////In the h File/////////////
afx_msg void Ontest();
/////////In cpp file//////////
#define IDC_TEST 1000
ON_COMMAND(IDC_TEST,Ontest)
...
...
CMenu* MainMenu = AfxGetApp()->m_pMainWnd->GetMenu();
MainMenu->GetSubMenu(0)->InsertMenu(-1, MF_BYPOSITION, IDC_TEST, TEXT("&My menu"));
DrawMenuBar();
void CAnswerView::Ontest()
{
MessageBox("test");
}
|
|
|
|
|
Hi,
I use PuttY for establish connection between two PC. connection establish using SSH on port 22. I establish connection, but problem occur in authentication.
error message is
server disconnected
type 2(SSH_DISCONNECT_PROTOCOL_ERROR)
Pls provide solution for this error. so I will authenticate and able to access PC.
Regards
kedar
Girish
Software Developer
|
|
|
|
|
This is Visual C++ / MFC forum, how do you expect to get an answer here.
C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg
|
|
|
|
|
I need to authenticate user with their name & password before displaying the video from webcam in different dialog (IDD_LOCAL_DIALOG).
When I close my IDD_LOCAL_DIALOG my webcam sill capturing video.
How can I stop capturing video from webcam?
JAYARAJ
|
|
|
|
|
J5121982 wrote: How can I stop capturing video from webcam?
did you try to unplug the webcam
C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg
|
|
|
|
|
|
NO.
I just close my video capturing dialog i.e IDD_LOCAL_VIDEO.
i noticed that my webcam indicator light in on.
JAYARAJ
|
|
|
|
|
Hi!
I have the following problem:
I'm making dynamic menu this way:
CMenu* MainMenu = m_pMainWnd->GetMenu();
MainMenu->InsertMenu(-1, MF_BYPOSITION, 1, TEXT("&My menu"));
But after the program does this, the menu appears only after I
change something in my window, for example move mouse over menu.
The command: m_pMainWnd->UpdateWindow(); doesn't help.
So, what should I do?
Thanks for any help!
|
|
|
|
|
Call DrawMenuBar() ...
Nibu thomas
Software Developer
|
|
|
|
|
use DrawMenuBar.And this link maybe it is some helpful to you
http://www.codeproject.com/menu/newmenuxpstyle.asp
|
|
|
|
|
i want to query to a particular URL so is there any method for get http request to particular url in anybody have idea please share with me.
Bankey Khandelwal
Software Engineer
|
|
|
|
|
this url might useful for you
http://www.codeproject.com/internet/getwebfile.asp
Vivek.S
You only have to do a very few things right in your life so long as you don't do too many things wrong.
|
|
|
|
|
Hi!
Im using postmessage to automatically clicked a certain button IDC_EDIT_TEXT ( AfxGetMainWnd()->PostMessage(WM_COMMAND,IDC_EDIT_TEXT); ) which will open a new dialog.
But how will i know which button was clicked inside this new dialog?
|
|
|
|
|
One simple thing you can do is that to create a control of the button which was clicked and then check the caption on that button.
In this manner you can get the caption of the button and do anything that you want to do on that control
Does this solver your problem
Vision is Always important and so is your ATTITUDE.
Wishes.
Anshuman Dandekar
|
|
|
|
|
lorey wrote: Im using postmessage to automatically clicked a certain button IDC_EDIT_TEXT ( AfxGetMainWnd()->PostMessage(WM_COMMAND,IDC_EDIT_TEXT); ) which will open a new dialog.
Since you are posting the message through code why don't just pass the id of the button to the constructor of the new dialog to indicate which button was pressed.
Nibu thomas
Software Developer
|
|
|
|
|
Hello all MFC Gurus
I have a problem in creating a spin button control.
I want to create an edit box & spin button dynamically. The problem is that both are getting created but only edit box is visible when I change the position of spin button control using MoveWindow it is visible. But when clicked on Up & down Arrow of spin button the edit box values are not getting changed. Following is what i have done. Someone please help me
dwStyle = ES_AUTOHSCROLL | ES_AUTOVSCROLL | ES_LEFT | ES_NOHIDESEL;
BOOL bCreated = m_pInPlaceEdit->Create(dwStyle, rCellRect, pParentWnd, uiResourceID);
bool b = m_spinCtrl.Create(WS_CHILD|WS_VISIBLE, CRect(0,0,0,0), m_pInPlaceEdit, 123);
m_spinCtrl.MoveWindow(5, 10 , 15 , 20); //just checking whether the control is created or not
m_spinCtrl.SetRange32(0, 72270);
m_spinCtrl.SetBuddy(m_pInPlaceEdit);
Thank you
|
|
|
|
|
m_Spin1.SetRange32(0, 72270);
m_Spin1.SetBuddy(GetDlgItem(IDC_EDIT1));
void Answer::OnDeltaposSpin1(NMHDR *pNMHDR, LRESULT *pResult)
{
LPNMUPDOWN pNMUpDown = reinterpret_cast<lpnmupdown>(pNMHDR);
SetDlgItemInt(IDC_EDIT1,m_Spin1.GetPos());
*pResult = 0;
}
|
|
|
|
|
I guess you have to remove UDS_AUTOBUDDY style from the spin button control and set this style UDS_SETBUDDYINT .
Nibu thomas
Software Developer
|
|
|
|
|
I am trying to make a very simple debugger. In fact, it always has to do the following:
Open a program and pause the execution right away. // Like starting the debugger in VC++ with "Step Into"
Then it needs to write some data into memory, I know how to use WriteProcessMemory() for that
Then it needs to resume execution, and if possible have the debugger close without closing the new process.
I'm not very familiar with the debugging functions, only Read and WriteProcessMemory, so if someone could provide sample code to do the above, or at least explain how I can open a process and have it paused right away, and how to resume the execution and close the debugger without closing the process.
Thanks for any help!
|
|
|
|
|
You can use CreateProcess to execute the exe with CREATE_SUSPENDED style this will start and pause the exe at the begining, you can later resume the process.
C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg
|
|
|
|
|
Thanks. I got it working, but there is one thing that would make it a lot easier...
Is there a way to get the address of the Entry point of the program after using CreateProcess with CREATE_SUSPENDED. I know it stops it at the Entry point, but I don't know how to get the address of it. Thanks again.
|
|
|
|
|
Get the Debugging Applications - Ms Press by John Robin. The book does show on how to develop one simple debugger with some sample codes.
Sonork 100.41263:Anthony_Yio
|
|
|
|
|
Hi all,
I'd like create an MDI application with CView as view. I need to show 10 different displays for the 10 diffent menu items. Now I have the information to be displayed (say a CString object) in the View class. I change this data according to the menu item. But I am getting the latest information in all the views. I should be able to see all the displays at a time.
How can I handle this situation.
Thanks in advance,
Sarvan AL
|
|
|
|
|
Hi,
Use multiple views and splitter windows.
Splitter Windows[^]
Bye,
Cool Ju
Dream Ur Destiny
|
|
|
|
|
Hi guys,
What is _T Generic Text Mapping.
Vivek.S
You only have to do a very few things right in your life so long as you don't do too many things wrong.
|
|
|
|