|
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.
|
|
|
|
|
Check GetLastError()
Maybe you have to mark data "as read".
Maybe there isnt anything to read. (Empty)
Greetings from Germany
|
|
|
|
|
Thanks for the reply.
The ReadFile does not return any error, but it read 0 byte. However, I am sure my device is sending something over, because in Win2K or WinXP Pro it works perferctly fine.
Any difference in USB-to-COM interface between WinXP Pro and Home edition?
I am worried that when I call ReadFile, the internal buffer has been erased or overwritten. Is there any way that I can check this internal buffer?
|
|
|
|
|
If u r running in DEBUG mode,Try in RELEASE mode.
Appu..
"If you judge people, you have no time to love them."
|
|
|
|
|
It is in RELEASE mode.
Thanks.
|
|
|
|
|
Hi,
I need create ActiveX control. I know to create ActiveX control from dialog, but
now I have dialog which use other ActiveX and I don't know how do it.
Please help me somebody. Thanks
|
|
|
|