|
One solution I find quite easy to do is to handle the OK button in the sheet. In that handler, I confirm whether each page is valid, and if it is, let it handle its own data exchange/validation. If any page fails validation, then the property sheet does not get dismissed.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
I'll try that since in my OnApplyNow(), the OnOk could have already occurred and removed the window whereas if the "Apply" button was pressed, I'm still responsible for calling the UpdateData() for the active page.
Thanks for the tip.
|
|
|
|
|
I have a question about CControlBarInfo MFC class. First of all there is no documentation about it in the MSDN. It's declared in "Afxpriv.h".
The class is used to save and restore the state of the control bars through serialization. I don't need any serialization, I only want to know the positions of the toolbars in my application.
I have a MDI MFC application. Just to make sure we speak about the same thing:
1. An MDI application runs in a top level MDI parent frame.
2. That frame has an embedded child window, a <b>MDI client</b> window.
3. The MDI client window can host any number of MDI child windows.
My problem is the <b>MDI client</b> window. That window shares the client area of the parent with the docked toolbars and the status bar. I want to make that window smaller to make room for one more non-MDI window to be hosted by the same parent. It's possible, I did it, but I can't get along with the sizing calculations because of the random way the toolbars can be docked. I need info about the positions of the docked toolbars. The CControlBarInfo class offers any info I need, except one. I don't know how to find out to which side of the window is a toolbat docked. I can't relay on the window coordinates because there may be multiple toolbars, so a toolbar, even if docked, may not be adjacent to any border.
(Example: I can find out if it's visible, if it's docked. But I only can find out if it's verical. I don't know if it's docked to the right side or the left of the window).
Here is the only thing I know about the CControlBarInfo class, the declararion from the afxpriv.h file:
<code>class CControlBarInfo
{
public:
// Implementation
CControlBarInfo();
// Attributes
UINT m_nBarID; // ID of this bar
BOOL m_bVisible; // visibility of this bar
BOOL m_bFloating; // whether floating or not
BOOL m_bHorz; // orientation of floating dockbar
BOOL m_bDockBar; // TRUE if a dockbar
CPoint m_pointPos; // topleft point of window
UINT m_nMRUWidth; // MRUWidth for Dynamic Toolbars
BOOL m_bDocking; // TRUE if this bar has a DockContext
UINT m_uMRUDockID; // most recent docked dockbar
CRect m_rectMRUDockPos; // most recent docked position
DWORD m_dwMRUFloatStyle; // most recent floating orientation
CPoint m_ptMRUFloatPos; // most recent floating position
CPtrArray m_arrBarID; // bar IDs for bars contained within this one
CControlBar* m_pBar; // bar which this refers to (transient)
void Serialize(CArchive& ar, CDockState* pDockState);
BOOL LoadState(LPCTSTR lpszProfileName, int nIndex, CDockState* pDockState);
BOOL SaveState(LPCTSTR lpszProfileName, int nIndex);
};</code>
Or else, is there another way to find out the client area of a window not used by the status bar or the docked toolbars ?
|
|
|
|
|
Hi guys,
i want to start internet explorer in fullscreen mode (F11).
how can i do that?
it is no problem to start internet explorer with shellexecute:
ShellExecute(NULL, NULL,"C:\\Program Files\\Internet Explorer\\iexplore.exe","www.codeproject.com",NULL, SW_SHOWMAXIMIZED);
|
|
|
|
|
Try using this as an argument
"-k www.codeproject.com"
|
|
|
|
|
|
Hi Expert
Suppose i have deleted some file of a Directory and i want that file come back Automaticall to that Folder itself..
Thanks in Advance
RYK
|
|
|
|
|
VC_RYK wrote: Suppose i have deleted some file of a Directory and i want that file come back Automaticall to that Folder itself..
How did you delete it?
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
|
Which means you bypassed the Recycle Bin, which means it can't be recovered normally.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hello All
I have Visual Studio 2005 Professional Edition, and I am working in an MFC project and I want to export it as a template.
But when I tried to do that through the file menu, I found that the menu item "Export Template" is deemed,
How can I overcome this? and why it is deemed?
|
|
|
|
|
|
Hi to all,
Do anyone know how to create DirectShow Filter in VC++ (6.0 or .Net)?
Or Is there any link/e-book guiding to create DirectShow Filter?
I tried to get more information throught google. But it was not sufficient.
Please help me.
Thanks in advance.
Regards,
Aniket
|
|
|
|
|
|
And what about SDKs, if you are writting directshow filters, u might have installed DirectXSDK or Platform SDK, the SDK documentation is a huge source of Documentation and samples of DSHOW filters. The complete source code of DShow Baseclasses is also available, what else u need
|
|
|
|
|
Hi,
Thanks for your reply.
All information provided in SDK documents or in Codeproject Articles is regarding how to use DirectShow Filters or direct desinging of filters.
But no one has provided the detailed information.
Information that want is,
1. How to start desinging a DirectShow Filter in VC++6.0 or VC++.Net IDE?
2. Different types of filters & their implementation differnece.
3. Adding Property Pages & own Interfaces to filter.
I want to design filter which accepts MPEG-2/MPEG-4 Transport Stream. It will store data in a FIFO as it receives the data. According to status Run/Pause/Stop of filter, a thread will be in running/pause/stop state.
Can u guide me for this?
Thanks & Regards,
Aniket A. Salunkhe
|
|
|
|
|
|
I want to know all the classes that are part of MFC 8.0. How will i know it.
Regards
|
|
|
|
|
subramanyeswari wrote: I want to know all the classes that are part of MFC 8.0. How will i know it.
That information is hidden here[^]
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
|
Ah! Those bastards hid it in the Documentation! How is one supposed to know that!
Let's think the unthinkable, let's do the undoable, let's prepare to grapple with the ineffable itself, and see if we may not eff it after all. Douglas Adams, "Dirk Gently's Holistic Detective Agency"
|
|
|
|
|
Probably an IQ test for the developers to reach the documentation?
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
Hi,
Can anyone let me know how many threads can be run at a given point of time?
Ranjini
modified on Monday, February 04, 2008 7:56:19 AM
|
|
|
|
|
|