|
No, there isn't. The other application may have created multiple file-mapping objects, each with or without a name. If it's a named file-mapping object, that name has to be unique within the application. I *think* you can create multiple unnamed file-mapping objects.
Best,
Jun
|
|
|
|
|
way to change the backcolor of radio button in MFC
|
|
|
|
|
Please see this[^]
PS: I have sent your previous message[^]to spam.
Nobody can give you wiser advice than yourself. - Cicero
ப்ரம்மா
|
|
|
|
|
|
Did you see my answer and did you try it and same question not helpfuls.
|
|
|
|
|
|
|
I want to handle the ESCAPE key in certain situation; I try to catch it in PreTranslateMessage with WM_KEYUP.
Pressing ESCAPE leads always to the "cancel" result.
If I have a control named IDCANCEL, the OnClicked handler receives the control, whenever
ESACPE has been pressed, but I can not differentiate between clicking on that control
and the "true ESCAPE".
Is there a way I can separate the "escape" key from the CANCEL button and from "exit" ("X" in the system menu)?
Actually, I need it in a CEdit control.
|
|
|
|
|
Refer this[^].
Similarly, use VK_RETURN for enter key.
|
|
|
|
|
Thanks, it works with KEYDOWN
|
|
|
|
|
Give the button a different ID and a new handler for this ID, than it should work.
To catch up ESCAPE you need to catch the WM_KEYDOWN Event.
But it is important where the PreTranslateMessage.
Try to catch the WM_KEYDOWN event in your Dialog class.
|
|
|
|
|
how to change the background color of the radio button to be same as window color
|
|
|
|
|
See
HBRUSH CDialogDlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
{
HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
pDC->SetTextColor(RGB(20,120,220));
pDC->SetBkColor(RGB(20,120,220));
return hbr;
}
|
|
|
|
|
how to handle this OnCtlColor class and to set the background color
i think will not work for buttons. it chnages only the static label background.
-- modified at 4:36 Saturday 3rd March, 2007
|
|
|
|
|
You must insert WM_CTLCOLOR message to your program and for radio button its working and again a short help
BEGIN_MESSAGE_MAP(CDialogDlg, CDialog)
ON_WM_CTLCOLOR()
END_MESSAGE_MAP()
HBRUSH CDialogDlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
{
HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
pDC->SetBkColor(RGB(20,120,220));
pDC->SetTextColor(RGB(255,255,220));
return hbr;
}
public:
afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
|
|
|
|
|
thank you very much its working well.
|
|
|
|
|
You're welcome
|
|
|
|
|
Hi,
I want to switch from 5 window splitter to 3 window, using the same object of CSplitterwnd, is it possible for me to reintialise or recreate the same object of CSplitterwnd, so that i can change the number of rows and columns in the same application.
|
|
|
|
|
Are you trying to do this at runtime?
|
|
|
|
|
Yes, i want to do it Run time when i will click on certain button.
|
|
|
|
|
Hello everybody!
Is there any specific way to run an exe when a system wants to logoff!
Or will the system forcefully closes all active applications before logoff?
|
|
|
|
|
You can get a notification to an already running exe but i am not aware of any method to run an exe.
|
|
|
|
|
Systems send WM_QUERYENDSESSION to each application window when log off process is initiated. You can do any specific task here. Returning FALSE in response to this message causes log off operation to stop.
|
|
|
|
|
Hi all.
How can I get the pointer/handle to the horizontal and vertical scroll bars from list box?
I tried it using…
CListBox *pList = (CListBox *) GetDlgItem(IDC_LIST);
if( NULL == pList->GetSafeHwnd() )
return;
CScrollBar* pVertScroll = pList->GetScrollBarCtrl(SB_VERT ) ;
But it is returning NULL.
Also how I can trap the events like WM_MOUSEMOVE over scroll bar arrows?
Thanks
Sameer Thakur
|
|
|
|
|
Sameer_Thakur wrote: CScrollBar* pVertScroll = pList->GetScrollBarCtrl(SB_VERT ) ;
But it is returning NULL.
Did you see MSDN?
From the MSDN
This member function does not operate on scroll bars created when the WS_HSCROLL or WS_VSCROLL bits are set during the creation of a window
|
|
|
|