|
Sorry!!!! My English isn't very good so when I read left I understood right! Now I've tried what you said with the nested splitter windows on the left and YES it happens also to me! It must be some bug...
|
|
|
|
|
Ok, good! (or bad)
Do you know how to fix it? Cause it's definitely a CSplitterWnd bug where they've somehow missed calculating the width of the splitter borders when using nested splitters...
/Tommy
|
|
|
|
|
i created an SDI application with CHtmlView.
how to tell the app to show the webpages in lynx-style mode (without images)
??
|
|
|
|
|
I don't believe it is possible to control this from the IWebBrowser interface. The only way I know is the global Internet options dialog.
|
|
|
|
|
Depends on how you want to solve this problem. you could do a number of things.
1. You could download the site and then get all img elements and set the display css to none.
2. Or you wait for document complete message from the browser and strip out all the img elements by getting them and then setting each one's outerHTML to an empty string.
3. Or you could download just the text stream from the website using WinInet, do a regular expression find/replace on the text stream stripping out all images and then set the outerHTML of your HTMLView of the body object to the text stream you retrieved.
So it just depends on how you want to attack the problem, these are just a few ideas.
Cheers,
-Erik
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
My thoughts are my own and reflect on no other.
|
|
|
|
|
Hi all, Iam making a project for me to receive emails and news, which look likes the Outlook Express.
Doubts: I've included a CListCtrl, which has the emails from a folder. but I don't know how to get the selected email in another window, from the CListCtrl selected Item, and when I press my left mouse button.
Could you write me an example Please?
I have put the ClistCtrl control on the window; add the variable to the CListCtrl (m_lista) and put the columns from my database of folders.
How do I for the user press on an Item, and I put the information on another window?????
Please help
Thanks in advance.
Jesus
|
|
|
|
|
I'm a little confused about exactly which parts you are struggling with. If you use SetItemData you can assign a pointer to your data with the list index. If you handle the NM_DBLCLK (Doubleclick) message from the ListCtrl you can get the data for the selected item by using GetItemData.
Or if you've got a split view you can handle the LVN_ITEMCHANGED to change the display message everytime the selection item is changed in the list.
Hope this helps,
Michael
|
|
|
|
|
Just wondering is anyone is using imagelib activeX from skyline tools in the VC++ environment. If so, are you having any problems with it? and how would you rate the support?
thank you.
|
|
|
|
|
Are you asking as a customer or a potential customer. Paintlib provides an ActiveX control for free with full source if you're looking at alternatives ( assuming you need it to be an Active X control. )
Christian
As I learn the innermost secrets of the around me, they reward me in many ways to keep quiet.
Men with pierced ears are better prepared for marriage. They've experienced pain and bought Jewellery.
|
|
|
|
|
Hi,there!
I got one problem while I try to convert the VARIANT data into the
COleSafeArray data. List part of my codes below:
VARIANT var;
COleSafeArray sa;
var=mscomm1.GetInput();
sa=var; // Here I got an assert error!!
The assert error occured in (..\mfc\src\olevar.cpp):
COleSafeArray& COleSafeArray::operator=(const COleVariant& varSrc)
{
ASSERT(varSrc.vt & VT_ARRAY);
AfxCheckError(::VariantCopy(this, (LPVARIANT)&varSrc));
return *this;
}
// VT_ARRAY = 0x2000
Looks like the the varSrc must be VT_ARRAY, but mscomm1.GetInput() return
variant is VT_BSTR(=8).
Does anybody know how to solve this problem? Pls help!
Any comment & suggestion are greatly appreciated!
Wayne
04 Sep 2001
|
|
|
|
|
This is your problem
<br />
VARIANT var;<br />
COleSafeArray sa;<br />
<br />
var=mscomm1.GetInput();<br />
sa=var;
<br />
The constructor is:
<br />
COleSafeArray( const VARIANT& varSrc );<br />
Then what your you need to do it is
<br />
sa = COleSafeArray(var);<br />
Cheers !!!!
Carlos Antollini.
|
|
|
|
|
Dear Carlos,
Replaced the below line
sa=var; // <=Here
with sa = COleSafeArray(var);
the same assert error occur again. Look at the below codes for ref.
COleSafeArray::COleSafeArray(const VARIANT& varSrc)
{
AfxSafeArrayInit(this);
*this = varSrc; // assert error here!!! (it invoke below codes)
m_dwDims = GetDim();
m_dwElementSize = GetElemSize();
}
COleSafeArray& COleSafeArray::operator=(const VARIANT& varSrc)
{
ASSERT(varSrc.vt & VT_ARRAY); // The real assert err occur here!!
AfxCheckError(::VariantCopy(this, (LPVARIANT)&varSrc));
return *this;
}
Any suggestion? Anyway, thanks for your quick response!
Wayne
05 Sep 2001
|
|
|
|
|
Dear Carlos!
Try your method, same assert error occured!
Take a look at below codes for ref.
COleSafeArray& COleSafeArray::operator=(const VARIANT& varSrc)
{
ASSERT(varSrc.vt & VT_ARRAY); // Assert err occured here!!!!
AfxCheckError(::VariantCopy(this, (LPVARIANT)&varSrc));
return *this;
}
Anyway, thanks for your quick response! Any other suggestion?
Wayne
05 Sep 2001
|
|
|
|
|
I'm learning MFC's and I've the problem. I want to write a new line character to a CEdit control but I can't!
Here's the code:
CString myString;
myString = "some string \n more";
myEditCtrl.SetWindowText(myString);
and I get displayed: some string <strange char=""> more
I've initializated the control with ES_MULTILINE, but it still doesn't work.
Please I need help !!!!!!!!!!!
|
|
|
|
|
|
thanks for your quick answer!
|
|
|
|
|
> CString myString;
> myString = "some string \n more";
CEdit controls require CR-LF for newlines. Change your string to:
CString myString;
myString = "some string \r\n more";
and it will work.
HTH
Parish
while (!asleep)
code();
|
|
|
|
|
For those of you who haven't read it already I recently posted an article with some code for a new owner drawn button (CButtonSSL). Thanks to Paolo and Jerzy's work (COddButton) I included the correct handling of the default button state for this button class.
Unfortunately it has a problem with radio buttons (see the Known Problems section).
The solution that Paolo has suggested (get the control type in PreSubClassWindow) would solve the problem, but requires the owner draw style to not be set initially.
My question is what would you prefer? A class that works correctly for buttons, check boxes and radio buttons, but at the expense of remembering not to set the owner draw style (something that I always find myself doing for a button I know is owner drawn), or a class that works for buttons and check boxes?
Your feedback would be much appreciated. And thanks for the votes
Derek Lakin.
Salamander Software Ltd.
|
|
|
|
|
Whenever I do anything like this I set the style how it needs to be in the constructor, so it doesn't matter what it get set to in the dialog editor by the user.
I don't suppose your article doesn't use MFC ?
Christian
As I learn the innermost secrets of the around me, they reward me in many ways to keep quiet.
Men with pierced ears are better prepared for marriage. They've experienced pain and bought Jewellery.
|
|
|
|
|
You can not set the style in the contructor because you need a window. PreSubclassWindow is the place...
|
|
|
|
|
Thanks - I knew I wasn't being completely accurate but couldn't remember the function I set it in. It wasn't PreSubclassWindow, but I'm sure it has the same effect.
Christian
As I learn the innermost secrets of the around me, they reward me in many ways to keep quiet.
Men with pierced ears are better prepared for marriage. They've experienced pain and bought Jewellery.
|
|
|
|
|
The problem is not of setting the owner draw style (which is enforced at the end of PreSubclasWindow), it is finding out what type of control it is (checkbox, button or radio button).
If the owner draw style is set in the dialog editor then because button styles are not mutually exclusive you can't tell what type of control it was.
P.S. Unfortunately (for you) it does use MFC. Feel free to do a non-MFC conversion
Derek Lakin.
Salamander Software Ltd.
|
|
|
|
|
I have created an VC++ activex and I would add a graphic in my project. I try to add the MSChart control in my project but, when i execute the roject, i can't display it.
Please Help me!!!!!!
|
|
|
|
|
I have a main Dialog application wich instantiate a new Dialog Like this...
m_pThread= AfxBeginThread(RUNTIME_CLASS(CMultiThread));
CMultiThread is a CWinThread .
This one takes care of Showing the new dialog box on the screen
BOOL CMultiThread::InitInstance()
{
CPostDialog Dlg;
//CoInitializeEx(0, COINIT_APARTMENTTHREADED);
CoInitializeEx(0, COINIT_MULTITHREADED);
m_pMainWnd= &Dlg;
Dlg.DoModal();
return TRUE;
}
Everythings is working fine.
On the ExitInstance() of this thread i want to post a message to the caller (Main Dialog) that CPostDialog is now over.
The problem is no matter what i try i can't get the HWND of
the caller.
I think that i should get the HWND in the InitInstance
What i did so far in the main dialog is to declare a public variable like this
HWND m_LocalWnd;
Then on the OnInitDialog() of the main dialog
m_LocalWnd =m_hWnd;
Then i change the InitInstance of my CWinThread like this
BOOL CMultiThread::InitInstance()
{
CMessageTestDlg pApp;
m_HwndSource = pApp.m_hWnd;
CPostDialog Dlg;
//CoInitializeEx(0, COINIT_APARTMENTTHREADED);
CoInitializeEx(0, COINIT_MULTITHREADED);
m_pMainWnd= &Dlg;
Dlg.DoModal();
return TRUE;
}
CMessageTestDlg is already running and i should be able
to get the HWND..
but it always return 0
What is it wrong.
Yves Lessard
|
|
|
|
|
The line
CMessageTestDlg pApp;
<\PRE>
makes a new instance of the CMessageTestDlg class - it does not give you access to the global CWinApp derivative in your main thread. Use AfxGetApp() instead (I'm pretty sure it works across threads, but you may check to be absolutely sure). You can, however, not use AfxGetMainWnd() as this is thread-specific.
Cheers
Steen.
"To claim that computer games influence children is rediculous. If Pacman had influenced children born in the 80'ies we would see a lot of youngsters running around in dark rooms eating pills while listening to monotonous music"
|
|
|
|