|
http://support.microsoft.com/kb/q175513/[^]>]
FILE: Invoke Find, View Source, Options Dialog Boxes for WebBrowser
http://blog.joycode.com/jiangsheng
http://blog.csdn.net/jiangsheng
Command what is yours
Conquer what is not
---Kane
|
|
|
|
|
Hi can someone show me how I lock a dialog window so the user canot move the dialog with there mouse. EG: I want the dialog to remain in the center of the window and only be able to exit the dialog not move it around in the window
THanks
|
|
|
|
|
A simple method is to override the WM_WINDOWPOSCHANGING message (OnWindowPosChanging).
<code>
<font color="green">
void CMyDlg::OnWindowPosChanging(WINDOWPOS* lpwndpos)
{
lpwndpos->flags |= (SWP_NOMOVE | SWP_NOSENDCHANGING);
CDialog::OnWindowPosChanging(lpwndpos);
}
</code>
I Dream of Absolute Zero
|
|
|
|
|
Hi RChin,
Thanks but my dialog windows still moves maybe I havent implemented correctly can you give me an example how to make this work
Thanks
|
|
|
|
|
Hi,
I am looking for a Visual C++ 6.0 compatible plotting library with 3D plot. Some features like saving the plot would be nice as well. (library can be commercial).
Thanks,
and
|
|
|
|
|
You might want to look at GigaSoft ProEssentials - www.gigasoft.com
Karl - WK5M
PP-ASEL-IA (N43CS)
<kmedcalf@ev1.net>
PGP Key: 0xDB02E193
PGP Key Fingerprint: 8F06 5A2E 2735 892B 821C 871A 0411 94EA DB02 E193
|
|
|
|
|
Hi all:
How can I specify the height and width of the window appeared after I click the Date Time Picker Control?
Thanks!
|
|
|
|
|
How about
CWnd::MoveWindow(...)
(a confusing function name by Ms)
Sonork 100.41263:Anthony_Yio
|
|
|
|
|
|
After tinkering with the control, I found that the little drop down window is a CMonthCalCtrl that you can access using the GetMonthCalCtrl() member function of the CDateTimeCtrl class.
This window is created dynamically when you click on the drop down button, so you will need to access this class on the drop down event (DTN_DROPDOWN).
The problem is that resizing this window does not resize the individual control, only allow more calendar months to be displayed; a bit like how Outlook displys its months at the side of the frame.
<code>
void CTestDlg::OnDtnDropdownDatetimepicker1(NMHDR *pNMHDR, LRESULT *pResult)
{
CMonthCalCtrl* pCtrl = this->m_DateTimeCtrl.GetMonthCalCtrl();
if(pCtrl != NULL)
{
CRect rect;
pCtrl->GetClientRect(&rect);
rect.InflateRect(70, 90);
pCtrl->MoveWindow(&rect);
}
*pResult = 0;
}
</code>
I Dream of Absolute Zero
|
|
|
|
|
Thanks for you attention
But the result I get after running your code is like this:
The control size itself is still the same, But around it there's a rectangular and there has some space between them!
Is it impossible to changed the drop down window?
|
|
|
|
|
kwib799 wrote:
But around it there's a rectangular and there has some space between them!
That was my original point. The actual drawing of the month grid won't change. The container window will size, but the container dates will not size with it.
Try sizing the window to 2x (2 times), the window width and you will see what I mean).
If you need a scalar zoom of the window, then I think you are out of luck, unless someone else knows different (let me know).
.rc.
I Dream of Absolute Zero
|
|
|
|
|
Change to this
rect.InflateRect(140, 180); ?
|
|
|
|
|
Are you talking about at design time or at run time?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
|
Hi all,
dows anybody knoks how can I show as first window the main window of another process??? I'm able to get the MainWindowHandle with the following code:
Process* MyProcess[] = Process::GetProcessesByName("EXCEL");
MyWnd = MyProcess[0]->MainWindowHandle;
but I didn't find any way to use the handle
please help me.
Thanks in advance.
Maurizio
|
|
|
|
|
Have you tried SetForegroundWindow()
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Walliams (Little Britain)
|
|
|
|
|
Antony,
thank you for your answer.
The problem is that SetForegroundWindow() , ShowWindowAsync() and other window managing funcion I found need an HWND window handler.
Unfortunately MyProcess[0]->MainWindowHandle is a IntPtr (an __int32 at the end).
I wasn't able in any way to get an HWND handler to the window from the IntPtr returned. The compiler always stops me
Bye,
Maurizio
|
|
|
|
|
Where did you get the class Process from? What is the code in the GetProcessByName function?
It may be that you can just cast the returned __int32 to a HWND.
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Walliams (Little Britain)
|
|
|
|
|
AfxMessageBox(CString("hai")); //works fine
AfxMessageBox(CString("hai").Format("hello")); //gives error, any way to make this work without having a CString variable?.
|
|
|
|
|
|
|
I'm not quite clear on what you want to achieve.
In any case, you cannot use the CString constructor like that in the second case.
I Dream of Absolute Zero
|
|
|
|
|
RChin wrote:
In any case, you cannot use the CString constructor like that in the second case.
I feel its a valid call. But gives an error coz CString::Format() returns void.
suhredayan There is no spoon.
|
|
|
|
|
suhredayan® wrote:
I feel its a valid call. But gives an error coz CString::Format() returns void.
You're absolutely correct. My bad .
The following does indeed compile, though how it could be used in a useful way is still a puzzle. (since it cannot be assigned to anything)
void MyFunction()
{
CString("Hey").Format("There!");
}
I Dream of Absolute Zero
|
|
|
|