|
How can I make a CWnd-descended child window which has a Z-order placing it beneath its CWnd-descended parent window?
|
|
|
|
|
Have you already tried something with SetWindowPos() (Throw an eye in the MSDN for further infos) ?
~RaGE();
|
|
|
|
|
Yes, I looked into SetWindowPos(). The problem is that when SetWindowPos() changes the Z-order of a window, it automatically changes the Z-order of any windows owned by that window. So if I tell it to put my main window in front of a child, it does it and then puts the child in front of the main window again.
|
|
|
|
|
Hi all,
Is there any class to list all my Directories,Folders and the files in that folders and Network mapped drives in a drop down combo box?.Kindly help me.
With regards
Shibu K.V.
Senior Research Associate.
VLSI ASIC Hardware Design Group
Electronics R&D Centre,Trivandrum
India
|
|
|
|
|
There is no.
It's better way to invoke standard Open Dialog by GetOpenFileName().
|
|
|
|
|
Hi all,
How can i get the back ground colour of a dialog?
With regards
Shibu K.V.
Senior Research Associate.
VLSI ASIC Hardware Design Group
Electronics R&D Centre,Trivandrum
India
|
|
|
|
|
COLORREF rgbBackground = GetSysColor(COLOR_WINDOW);
|
|
|
|
|
Try to declare a template class as below, But it can't pass the compiling.
(Using MS VC++ 6.0)
template < class ClassType, typename DataType > class MyContainer :
public ClassType < DataType >
{
...
}
only while I change it to something like this, it works.
template < typename DataType > class MyContainer :
public vector < DataType >
{
...
}
But my purpose is to support vector, list, queue and deque in a single
template class. Does anyone know how to make it?
Any commment greatly appreciated!
Wayne King
10 Jul 2002
|
|
|
|
|
In the example that doesn't work, you are using a template parameters ClassType as a name of a class as well. There are going to be some problems with trying to create a template this way. For instance the ClassType template parameter also needs a parameter to it as well. The only way I could get it to work is as follows:
template< class T, class D>
class MyContainer
{
public:
MyContainer() : T<d>
{}
virtual ~MyContainer() {}
};
typedef MyContainer<vector<int>, int> MyIntContainer;
|
|
|
|
|
Hi Terry Denham,
Soory I didn't get you. Is your messgae intact?
Could you please reply again?
Wayne King
10 Jul 2002
|
|
|
|
|
I want to change the scroll lines number in Windows98(system wide).
But it does not work. Could you please give me a hand ?
Below is my code:
int num = 10;
SystemParameterInfo(SPI_SETWHEELSCROLLLINES, num, NULL, NULL);
The same code works in WinMe, Win2000 and WinXP.
Could you please give me your ideas?
Thanks for your help.
|
|
|
|
|
i am having problem in loading a bitmap in a rectangle contained in a dialogbox. anybody having idea what to do or any sample code
|
|
|
|
|
I generally make a CStatic box with a border and then create a new class which is a child of CStatic. For example, class CBitmapViewBox : public CStatic
I add a member variable of type CBitmapViewBox to my main dialog and, in the OnInitDialog() event, I do this...
<br />
m_BitmapViewBox.SubclassDlgItem(IDC_SBITMAPDISPLAY, this);<br />
m_BitmapViewBox.Init();<br />
To load and display the bitmap, I do this...
<br />
void CBitmapViewBox::OnPaint() <br />
{<br />
CPaintDC dc(this);
CMainViewDlg *pWnd = (CMainViewDlg *)GetParent();<br />
<br />
if(pWnd != NULL)<br />
{<br />
if(m_bValid)<br />
{<br />
CRect lRect;<br />
GetClientRect(lRect);<br />
lRect.NormalizeRect();<br />
<br />
BITMAP bm;<br />
m_BMP.GetBitmap(&bm);<br />
CBitmap *pOldBitmap = dcMem.SelectObject(&m_BMP);<br />
<br />
dc.BitBlt(0, 0, lRect.Width(), lRect.Height(), &dcMem, 0, 0, SRCCOPY);<br />
<br />
dc.SelectObject(pOldBitmap);<br />
}<br />
else<br />
{<br />
dc.DrawText("Not a valid BMP file", -1, lRect, DT_CENTER | DT_VCENTER | DT_WORDBREAK);<br />
}<br />
}<br />
<br />
CStatic::OnPaint();<br />
}<br />
<br />
BOOL CBitmapViewBox::UpdateBMP(LPCTSTR lpszName)<br />
{<br />
CMainViewDlg *pFrameWnd = (CMainViewDlg *)GetParent();<br />
HBITMAP hBitmap = (HBITMAP) ::LoadImage(AfxGetInstanceHandle(), lpszName, IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE | LR_CREATEDIBSECTION);<br />
<br />
m_bValid = TRUE;<br />
<br />
if(m_BMP.DeleteObject())<br />
m_BMP.Detach();<br />
<br />
if(!hBitmap)<br />
{<br />
m_bValid = FALSE;<br />
UpdateSize(m_iMaxWidth, m_iMaxHeight);<br />
Invalidate(TRUE);<br />
return FALSE;<br />
}<br />
<br />
m_bValid = TRUE;<br />
<br />
m_BMP.Attach(hBitmap);<br />
}<br />
|
|
|
|
|
Is there a good book on this planet about the core WINApi, how it works, and how I can work with it. I have to use the ol' famous help or MSDN, but I'm wasting paper on it (Printing), and it's not always that clear (No samples, etc...)
Sjoerd
LPCSTR Dutch = "Double Dutch "
|
|
|
|
|
there is a good book in the market its something like Win32API programing with visual basic and does have samples
live and let them live
|
|
|
|
|
Christian
I am completely intolerant of stupidity. Stupidity is, of course, anything that doesn't conform to my way of thinking. - Jamie Hale - 29/05/2002
|
|
|
|
|
I bought Petzold after I found some PDFs. I ordered and got suprised how big it is, recommended if you need old school WinAPI.
|
|
|
|
|
At Amazon?
LPCSTR Dutch = "Double Dutch "
|
|
|
|
|
please google your question:
http://www.google.de/search?q=petzold
|
|
|
|
|
how to pass a memDC from view class to an activeX controls method which is created dynamically in the view
|
|
|
|
|
i have form view with size larger than that of a screen size with scrollbars. i am creating ActiveX components dynamically at runtime on this view. i want to extract all these components in to a bitmap for printing. but when i am trying to do so my bitmap is having only the components which are present in the visible client area of the form view. is there any way to get the drawing of the componets that are present in the not visible area of the view or is there any other method to print my form view with activeX components that donot completely fit into the visible client area.
|
|
|
|
|
Hi,
In a dialog based application, i have a child dialog which should be arranged
by the resize and splite control.
The dialog have the following components:
(1) Some buttons created by MFC class winzards.
(2) Two FormView controls, the one a place holder for showing something such as graph, image ..., and the another one is a list control.
Now, my problem is:
I can resize the whole window by using a class called CResizableDialog and all the control components created by MFC resource editor are works correctly.
But the components created by the Formview drived class cannot be resized.
I need your any ideas about this hybrid cases.
Thanks in advance!
chen
|
|
|
|
|
Hello,
I am writing program on Pocket PC using mfc and want to get rid of the default upper right OK button. I have tried the SHDoneButton API. The OK button does disappear but then there is a cross button. Is it possible to make the upper right corner clean?
|
|
|
|
|
Hi,
What is the command equivalent FileCopy(in VB) in VC++ for copying files.
With regards
Shibu K.V.
Senior Research Associate.
VLSI ASIC Hardware Design Group
Electronics R&D Centre,Trivandrum
India
|
|
|
|
|