|
If I understand your question, you are using the same propertypage in several instantiations, and want to change the title before the DoModal call?
I've done this several times and pass the string across via the constructor, then in the constructor set the title as follows:
m_psp.dwFlags |= PSP_USETITLE;
m_psp.pszTitle = m_strCaption;
where m_strCaption is the required string.
It handles it for you after this.
Debbie
|
|
|
|
|
Debs wrote:
m_psp.dwFlags |= PSP_USETITLE;
OOOhh yes, i've forgotten to set the flag. it has to be that.
Thank you Veeeeeeeeeeeery much.
~RaGE();
|
|
|
|
|
There is a workoround for this:
Start a timer of 10 ms from your OnInitDialog function, and in the timer handler first killtimer, then SetWindowText.
Bunburry
|
|
|
|
|
Tricky. I'll give it a try. Thanks.
~RaGE();
|
|
|
|
|
If the title of the sheet is dependant of the page displayed, then the page should set its parent's name when activated, doing this by overriding CPropertyPage::OnSetActive()
something like that
BOOL CMyPropertyPage::OnSetActive()
{
if(CPropertyPage::OnSetActive()){
CWnd *pParent = GetParent();
ASSERT(pParent);
pParent->SetWindowText("MyText");
return TRUE;
}
return FALSE;
}
HTH,
K.
Angels banished from heaven have no choice but to become demons
Cowboy Bebop
|
|
|
|
|
I've been building an app that has documents made up of OLE items (like the container sample app that comes with VC). But, typically, the requirements have changed, and the documents also need to hold other custom (non OLE) items. As my document class is based on COleDocument, and the items class is based on COleClientItem, I've been using COleDocument::AddItem() and COleDocument::RemoveItem().
I'd like to only have one document item class* if possible, but it needs to represent OLE and non OLE items, is this possible, and if so can anyone point me in the right direction? Or would I be better off having two item base classes with overrides of COleDocument::AddItem() etc?
* Or one class to base other classes from
Dylan
|
|
|
|
|
how to write this "" header in C++?
i tried doing in this manner, myMemo << <> << "\n";
but the output <>.
Thank you!
|
|
|
|
|
Use \
i.e. "\"" displays "
~RaGE();
|
|
|
|
|
Huh? You make no sense.
Neither as code, nor as a logical "something" this makes sense. What is it you want to do and what is it you don't understand? Is it perhaps that you just don't understand the C preprocessor?
|
|
|
|
|
Is this helpfule ?
HRESULT hr=pIXMLDOMDocument->createProcessingInstruction(_T("xml"), _T("version='1.0'"),&pIXMLDOMProcessingInstruction);
|
|
|
|
|
how to write this header in C++?
i tried doing in this manner, myMemo << "" << "\n";
but the output .
Thank you!
|
|
|
|
|
Hi,
I am not receving WM_DEVICECHANGE on a MFC dialog app. The dialog is set to Top Most and I have also used RegisterDeviceNotification at no avail.
Has anybody seen this behavior before.
Thanks
|
|
|
|
|
If I place some controls in a child frame, of course they have to be placed somewhere to provide a nice looking view.
I'm wondering what the most used way is, because I could think of two different ways.
1) Just put all controls in the View an resize them manually in OnSize().
2) Use splitter windows that provide a flat look and can't be moved manually to seperate the controls and use the basic view classes as the splitter Views.
3) something I don't know yet
I think here are many guys that actually put up a bit more complex GUI than just a ListView, so how do you do it ?
|
|
|
|
|
CFormView is functionally equivalent to a dialog window, and let you use dialog resources to lay out the controls. Usually this suffices, feel free to ask if you need more control than this.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
I tend to use a CFormView class and move and size the controls on the WM_SIZE message. It's probably the easiest way, although if you have a lot of controls it can be tedious to code.
Michael
The avalanche has started, it's too late for the pebbles to vote.
|
|
|
|
|
I don't know if CFormView is what I'm searching for, but I'll have a look into it.
As an example I'm talking about something like the mIRC View, that has a custom Edit at the bottom and on top a edit at left and a List at the right.
|
|
|
|
|
Hello,
I have a Web Page(CHtmlView) and i would like detect keypress (like CTRL+S),and mouse press button,only the focus is on the web page.
i try this :
void CWebView::OnLButtonDown(UINT nFlags, CPoint point)
{
AfxMessageBox("Mouse button down");
CHtmlView::OnLButtonDown(nFlags, point);
}
and
void CWebView::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags)
{
AfxMessageBox("key down");
CHtmlView::OnKeyDown(nChar, nRepCnt, nFlags);
}
When i click or press a key in the web page i haven't MessageBox!
you know why ?
thx in advance
|
|
|
|
|
Already runned in debug mode to see if it is the MSgbox which is not displayed or if it is your function that is not called ?
~RaGE();
|
|
|
|
|
thx
It's the fonction that is not called
And I don't know why ?!
|
|
|
|
|
It's IMO the web browser embedded in the HtmlView which catches the mouse click.
I don't know exactly how, but I think you could get the mouse event through the interface IHTMLDocument2 and its property onmousedown.
HTH,
K.
Angels banished from heaven have no choice but to become demons
Cowboy Bebop
|
|
|
|
|
I lately read s.th. about the WM_PARENTNOTIFY message being sent even when the cursor is over your view and a mousebutton is pressed. You should give that a trial.
|
|
|
|
|
ok THX
I search for WM_PARENTNOTIFY
|
|
|
|
|
Peferct i have try this solution and it's work great !! THX
|
|
|
|
|
hi
please give me some source code on how to use the SQL APIs to connect to the database either through the driver or through the provider
thank you
|
|
|
|
|