|
Thanks Mr.Prakash.
Just to clarify.
1. Derive a class object from CTabCtrl (CMyTabCtrl) with message handlers for tab messages like (IsChanging, Click etc).
2. Include the new header in my CMyPropertySheet.
3. Maintain a protected member (CMyTabCtrl m_oTabs) in CMyPropertySheet
4. In CMyPropertySheet::OnInitDialog do m_oTabs = GetTabControl();
Is there anything else I need to do in order to subclass the tabcontrol?
Thanks again.
slysi
|
|
|
|
|
and
no 4th is wroung.
4. Get the tabcontrol pointer using GetTabControl()
CTabCtrl *pTabCtrl = GetTabControl();
5. subclass the window.
m_oTabs.SubclassWindow(pTabCtrl->m_hWnd);
This will direct all the messages and notifications of the tab control to your tabcontrol.
I have lost more blood shaving than on the battlefield - Adolf Hitler
|
|
|
|
|
thanks a million !!! will give it a try.
slysi
|
|
|
|
|
Hi all,
I've created my own form. when it opens, and i am not changing anything, and try to close it, i get the message 'do you want to save your changes'....
i've look via outlook spy at the appointment item properties and saw a 'read only' property called 'Saved' which has the value false.
my guess is that is what causing the form to be closed with the saved question first....
my question is how to start the form with the saved as true? (as i mentioned before it is a read only property)
can this be done using MAPI?
thanks in advanced
Yaron
Ask not what your application can do for you,
Ask what you can do for your application
|
|
|
|
|
I compiled my program and it works on my own pc but when i run it on a laptop, the error appeared: unable to link to the afxdao.lib or header file. Where can i get the lib file to install to the laptop?
|
|
|
|
|
Whene I show the print preview for my doc the layout is truncate at the end of line
How i can display one line of my document in more time?
|
|
|
|
|
I have an MDI application and many menu options.When i click on any menu option i must be able to see the exe of a separate application.How is that possible....?
|
|
|
|
|
hello,friends!
can we include wave files or sound files as resources in the
project just like toolbars and menus.If any one knows help me.
advance thanq.
|
|
|
|
|
|
|
g_hDlgWnd=CreateDialog(g_hInst,MAKEINTRESOURCE(IDD_DIALOG_TEST),hWnd,(DLGPROC)DlgTestProc);
ShowWindow(g_hDlgWnd, SW_SHOWNORMAL);
以function建立一個Dialog(IDD_DIALOG_TEST),在IDD_DIALOG_TEST加入一個IDC_EDIT_INPUTTEXT(Edit Control)
我想在IDC_EDIT_INPUTTEXT按下Return時Call其他的Function,
問題就是:如何攔截在Edit上按下的Return?(win32 project)
INT_PTR CALLBACK DlgTestProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
long rvalue = 0;
/*
int processed = CGM.WinProc(hDlg, message, wParam, lParam, &rvalue);
if (processed)
return rvalue;
*/
switch(message)
{
case WM_INITDIALOG:
return Test_OnInitialDialog(hDlg);
case WM_COMMAND:
switch(LOWORD(wParam))
{
case IDC_EDIT_INPUTTEXT:
{
switch (HIWORD (wParam))
{
//case VK_RETURN:
// TRACE("VK_RETURN\n");
// break;
case EN_CHANGE:
{
CHAR lpszPassword[MAX_TALK_WORD];
WORD cchPassword;
cchPassword = (WORD) SendDlgItemMessage(hDlg,
IDC_EDIT_INPUTTEXT,
EM_LINELENGTH,
(WPARAM) 0,
(LPARAM) 0);
*((LPWORD)lpszPassword) = cchPassword;
// Get the characters.
SendDlgItemMessage(hDlg,
IDC_EDIT_INPUTTEXT,
EM_GETLINE,
(WPARAM) 0, // line 0
(LPARAM) lpszPassword);
// Null-terminate the string.
lpszPassword[cchPassword] = 0;
TRACE(">>>> cchPassword=%d ,lpszPassword=%s \n",cchPassword,lpszPassword);
}
TRACE("IDC_EDIT_INPUTTEXT %d,%d\n",wParam,lParam);
break;
}
}
break;
|
|
|
|
|
and the question is ?
I have lost more blood shaving than on the battlefield - Adolf Hitler
|
|
|
|
|
lol !!!
"如何攔截在Edit上按下的 " means what ?!?!
TOXCCT alias Nicolas C.
|
|
|
|
|
The question was posted (and encoded) in Traditional Chinese. In English, it can be translated as "How to capture the 'Enter key' hit on an Edit Control"
My suggested solution would be to use PreTransMessage() and do something like the following;
BOOL CMyDlg::PreTranslateMessage(MSG *pMsg)
{
int ctrlID;
if (pMsg->message == WM_KEYDOWN)
if (pMsg->wParam == VK_RETURN)
{
ctrlID = (GetFocus())->GetDlgCtrlID();
if (ctrlID == IDC_MYEDIT)
return true;
}
return CDialog::PreTranslateMessage(pMsg);
}
Hope it helps
|
|
|
|
|
Hi..
i build an FTP application with VC++ 0.6 to upload files to ftp server in my company i test the project from my home computer it works correctly and it lists all directory in the server and perform the upload correctly ..
but in the company it can not list the ftp directory (No error message or warning) ...
i think it's because of the firewalls installed in my company network ..
How can i over come this problem?????
|
|
|
|
|
Talk nicely to your IT guys, and see if it's possible for them to change the settings. Think about it. If you could software bypass a firewall, how much use would the firewall actually be...?
Steve S
|
|
|
|
|
then can u explain to me why regular FTP software wore in the same case that can be helpful for me!!
|
|
|
|
|
Hi, everyone.
Where can I find reference implementation or some sample codes for CPRM(content protection for recordable media) algorithm? Can anyone help?
Information about CPRM can be find here,
----------
http://www.4centity.com/
----------
Thanks in advance,
Geo
|
|
|
|
|
Hi,
What I want to do is to open a pdf-file in my application using the imported AcrobatReader ocx and go to a certain bookmark( or linenumber) defined in the pdf-document. I just can't figured out how to do it.Does anybody have a tip? Can it be done using the setNamedDest procedure? Does anybody know the syntax of possible parameters of
setNamedDest?
Thanks
Mahesh
Gerald
|
|
|
|
|
When i click on the menu item,dialog should appear and the menu item need to be checked.Similarly when i again click on the menu item when the dialog is open,the dialog should be closed and the check mark must be removed at the menu item.How can i do this.
|
|
|
|
|
a terminal program,using "PostMessage" function to send message to cedit.
My question is why the cursor alway be reset in top of edit control although using follow code:
int i = m_liststr.GetLength(); //m_liststr is cstring variable for cedit
m_list_control.SetFocus(); //m_list_control is cedit variable
m_list_control.SetSel(i,i,false);
|
|
|
|
|
Hi,
Is there anyway to recompile MFC7.1 for AMD64?
I want to port my 32bit program into 64bit with AMD64 compiler included with the newest Driver Development Kit. I tried to recompile MFC7.1 libraries with AMD64 compiler however, I get errors causesd by some preprocessor direcetives where it defines different platforms.
My questions are: Is there any port of MFC available for AMD64? Is there any Platfrom SDK available that supports AMD 64?
Any help appreciated!
Robert Buldoc
|
|
|
|
|
|
Thanks!
I am off to download it! will post the results here.
[editted]
It says Intel 64-bit, so I really doubt it to be AMD64 compatible but I might find something interesting inside.
[/editted]
[editted2]
As I thought it is IA64. In its Lib directory it has an AMD64 directory but there is only one 4KB file named authz.lib
[/editted2]
|
|
|
|
|
I have an SDI program, and I need to access the variables in CFormView from CMainFrame. I cant figure out how to do that.
I'm catching WM_CLOSE in CMainFrame, and whether or not the program will be
allowed to close will depend on a variable thats in CFormView. So, I need to
access this variable from CMainFrame. Any help?
Thanks,
Daniel
|
|
|
|