|
thanks sir
can we use this methode to add function
and why this function is not in the message handler
Ashish Dogra
MCA
Noida
|
|
|
|
|
Yes we can use this method to add a function but it is not recommended as with this method there are more chances of committing an error and then creating troubles.You can't remember the prototypes for all the handler's etc.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
When you Rclick in Spin control and use Event HAndle then you can see UDN_DELTAPOS
whitesky
|
|
|
|
|
hi can explain clearly ..
and if u r using the exact code in ur program then it won't work,
remove the CWnd* and use pWndbuddy alone
|
|
|
|
|
ya thanks
as in many function that include CWnd pointer
and i check in application the CWnd pointer is *pParent
what when i use this one it gives error
Ashish Dogra
MCA
Noida
|
|
|
|
|
I have SetWinEventHook for my MFC application, but the WinEventProc is not getting called?
g_hWinEvent = SetWinEventHook(EVENT_MIN,
EVENT_MAX,
NULL,
(WINEVENTPROC)WinEventProc,
GetCurrentProcessId(),
GetWindowThreadProcessId(hWnd,0),
WINEVENT_SKIPOWNPROCESS);
Thanks in advance,
Abhishake Lahare.
|
|
|
|
|
See Here[^] maybe it is some helpful to you
whitesky
|
|
|
|
|
If I want to limit the maximized size of a window (dialog based) while the user clicks the Maximize button, which WM_ message or CWnd member can I use? Thanks!
Maxwell Chen
|
|
|
|
|
Maxwell Chen wrote: If I want to limit the maximized size of a window (dialog based) while the user clicks the Maximize button, which WM_ message or CWnd member can I use? Thanks!
WM_GETMINMAXINFO
Nibu thomas
A Developer
Programming tips[^] My site[^]
|
|
|
|
|
Nibu babu thomas wrote: WM_GETMINMAXINFO
Thank you!
-- modified at 5:23 Friday 14th July, 2006
Thank you! It's working.
Maxwell Chen
|
|
|
|
|
What is "Tracking size" ?
-- modified at 5:17 Friday 14th July, 2006
I figured it out. The size + cursor size (when outside the screen).
Maxwell Chen
|
|
|
|
|
Handle WM_SIZE, the handler for WM_SIZE will have three parameters.
Use the first parameter 'nType' and handle accordingly
|
|
|
|
|
Parthi_appu wrote: WM_SIZE will have three parameters
I always overrided the cx value with a constant despite what nType is. It's not working. And WM_SIZE is called when the dialog has been fully maximized.
Maxwell Chen
|
|
|
|
|
See Here[^] maybe it is some helpful to you
whitesky
|
|
|
|
|
Thanks!
BTW, I did not get the email notification ...
Maxwell Chen
|
|
|
|
|
its not problem i have a same problem but now its fix and I can get notification i think that your problem is fix now.(I hope)
whitesky
|
|
|
|
|
WhiteSky wrote: get notification
Yes I got the notification this time.
Maxwell Chen
|
|
|
|
|
Hi,
How to create a new ChildFrame without menu bar ??
In the InitInstance in my App. I add this code for delete menu bar:
pMainFrame->SetMenu(NULL);
::DestroyMenu(pMainFrame->GetMenu()->GetSafeHmenu());
and this work fine.
But I create at runtime new windows attached to mainframe and when i create this windows the menu already appears.
I add the code over in many points of windows creation but the visual effect is not very good !!
Any idea ??
Thanks in advance
Too many plans make the health badly !!
|
|
|
|
|
AkiraOne wrote: But I create at runtime new windows attached to mainframe and when i create this windows the menu already appears.
I add the code over in many points of windows creation but the visual effect is not very good !!
Does WM_MDISETMENU or WM_MDIREFRESHMENU help.
Nibu thomas
A Developer
Programming tips[^] My site[^]
|
|
|
|
|
I have CListCtrl(REPORT) which uses the LVS_EDITLABELS style.
Have can I edit subitem of the list?
|
|
|
|
|
You have tried with:
BOOL SetItemText(
int nItem,
int nSubItem,
LPCTSTR lpszText
);
Too many plans make the health badly!!
|
|
|
|
|
I mean else...
i'd like to edit subitem text in controler
|
|
|
|
|
wrote smth like this.....
void CGraphDataEdtDlg::OnBeginlabeledit(NMHDR *pNMHDR, LRESULT *pResult)
{
NMLVDISPINFO *pDispInfo = reinterpret_cast<nmlvdispinfo*>(pNMHDR);
if (m_subitem)
{
CEdit *edit=m_list.GetEditControl();
if (edit!=NULL)
{
CRect rtSubItem;
m_list.GetSubItemRect(m_item,m_subitem,LVIR_BOUNDS ,rtSubItem);
edit->MoveWindow(rtSubItem);
CString str;
str.Format(_T("left top(%d,%d)\nright bot(%d,%d)"),rtSubItem.left,rtSubItem.top,rtSubItem.right,rtSubItem.bottom);
AfxMessageBox(str);
edit->SetWindowText(m_list.GetItemText(m_item,m_subitem));
}
}
*pResult = 0;
}
call this function with m_list.EditLabel(item);
as result my editcontroler always covers 0-subitem of item-raw....
|
|
|
|
|
Whats problem with LVN_ENDLABELEDIT
whitesky
|
|
|
|
|
Hi,
I've an MFC application uses USB-to-COM port to communicate with my device. It runs well, both in WinXP Professional Edition and Win2K.
But now, I just found out that, it fails to perform read at one point of stage.
I am reading from the port in chunk of 64 bytes. The ReadFile does not return any error. It just couldn't read anything when it tries to read the 2nd or 3rd chunk of 64 bytes.
Anyone know what's the problem? any solution?
Thanks.
|
|
|
|