|
He doesn't - he as ID_CLOCK_TIMER and ID_COUNT_TIMER but they both seem to have the same value.
A vast majority of our imports comes from outside the country.
George W. Bush
|
|
|
|
|
Ooops! Sorry, my dyslexia got the better of me.
/ravi
"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Hi,
I've just tried to use the c++ complex library in vc6, but if I use the complex template like this
complex<double> foo;
for some reason a compile error is generated:
error C2143: syntax error : missing ';' before '<'
does anyone know why this happens, how to avoid it, and why is the complex header file called "complex", and not "complex.h"?
With time we live, with money we spend!
Joel Holdsworth
|
|
|
|
|
insert
using namespace std; between the #include and the first use of complex .
If you don't know what std goes about, I suggest you read the "namespaces" section of any good C++ tutorial.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
try
std::complex<double> foo;
|
|
|
|
|
Hi,
I have several toolbars and control bars in my application. I load different ones depending on the type of document loaded at the time. Hence, if I close one document type and open another I get different combinations of control bars.
My problem is that when I unload the control bars they do not destroy properly, the client area (i.e. the grey panel) for the control bar remains.
Is there a key step that I have missed in the process of closing a ControlBar?
The same is also true for the toolbars underneath the menus.
Matthew
|
|
|
|
|
I think MFC sample CTRLBARS can help you. Toolbars are not unloaded or destroyed in it, they are just hidden. From user point of view this is the same.
|
|
|
|
|
Hello,
I think You can use RecalcLayout() function to solve this problem.
Peter
|
|
|
|
|
For control bars that belong to a particular CFrameWnd, you need to use the ShowControlBar() function rather than just calling CMyControlBar::ShowWindow(SW_HIDE). For example:
CMyDialogBar m_barHelper;
void CMyFrame::OnMDIActivate(BOOL bActivate, ...)
{
if (bActivate)
ShowControlBar(&m_barHelper, TRUE, FALSE);
else
ShowControlBar(&m_barHelper, FALSE, FALSE);
}
------------------------
Derek Waters
derek@lj-oz.com
|
|
|
|
|
Hi everyone,
A quick question-- Does anyone know if it is possible to have big and small tic marks on a CSliderCtrl? I have a slider that has the range -100 to 100, and I would like to have small tic marks every 10, while having a big tic mark at 0, which marks the middle of the slider.
I am using
m_PCWF_slider.SetTicFreq(10);<br />
m_PCWF_slider.SetPageSize(5);<br />
Thanks for the help!
|
|
|
|
|
Check this:
http://www.codeproject.com/miscctrl/transparentslider.asp
Mazy
Don't Marry a Person You Can Live With...
Marry Someone You Can Not Live Without
|
|
|
|
|
Yes, I read Nic Wilson's article already. Unfortuantely it does not help me though. I am looking for sliders with big and small tic marks.
|
|
|
|
|
I created an ATL project and inserted into it a Composite Control Object.
It works fine , but need to read some info from the browser specified in the
OBJECT tag
<object>
...
...
<param name="myparam" value="MyValue"
<="" object="" />
How I read the MyValue from my ATL Composite Control?
Thankx
xxx
|
|
|
|
|
I figure you would have better luck in the COM section.
You wanna use the <param /> tag.
I dunno if i'm right with the following(i'm tired haven't slept yet) but I think what you want is custom properties in COM there is no such thing as just assigning values to your object data members, you MUST use get/set mutators and accessors. Your gonna need something similar to this:
STDMETHODIMP IMyInterface::get_MyAttrib(BSTR* pVal)
{
m_MyMember = *pVal;
return S_OK;
}
This might be entirely wrong, but will give you some starting ground
p.s-If your building a control for web sites only...have you considered using IE lite...? less overhead and better suited for webpages.
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
Besides creating the get and set member functions for the member variable, you will need to derive your class from IPersist.
|
|
|
|
|
You are not bothering me, I like to help.
Anyways, here are some segments of code from a control that I wrote. First declare the property get_ and put_ functions in idl.
<br />
[<br />
object,<br />
uuid(...),<br />
dual,<br />
helpstring("IHTMLInfoCtl Interface"),<br />
pointer_default(unique)<br />
]<br />
interface IHTMLInfoCtl : IDispatch<br />
{<br />
[propput, id(0)]<br />
HRESULT URL([in]BSTR pVal);<br />
[propget, id(0)]<br />
HRESULT URL([out,retval]BSTR* newVal);<br />
};<br />
Next implement these functions in your class interface.
The key to tying the data together is deriving your ATL object from the IPersistStream interface, then providing one of the IPersist implementations. I used IPersistePropertyBagImpl and it
works fine. I am not sure, but I think that One of the IPersistxxx classes that I have declared may not need to be declared, but this code works for me.
<br />
class ATL_NO_VTABLE CHTMLInfoCtl : <br />
public CComObjectRootEx<CComSingleThreadModel>,<br />
public CComCoClass<CHTMLInfoCtl, &CLSID_HTMLInfoCtl>,<br />
...<br />
public IPersistStreamInitImpl<CHTMLInfoCtl>,<br />
public IPersistStorageImpl<CHTMLInfoCtl>,<br />
...<br />
public IPersistPropertyBagImpl<CHTMLInfoCtl>,<br />
...<br />
{<br />
<br />
public:<br />
CHTMLInfoCtl();<br />
~CHTMLInfoCtl();<br />
<br />
...<br />
<br />
One final thing, add the IPersist entries to your COM map here.
<br />
BEGIN_COM_MAP(CHTMLInfoCtl)<br />
COM_INTERFACE_ENTRY(IHTMLInfoCtl)<br />
...<br />
COM_INTERFACE_ENTRY(IPersistStorage)<br />
COM_INTERFACE_ENTRY(IPersistStreamInit)<br />
COM_INTERFACE_ENTRY2(IPersist, IPersistStreamInit)<br />
COM_INTERFACE_ENTRY_IID(IID_IPersist, IPersistPropertyBag)<br />
COM_INTERFACE_ENTRY(IPersistPropertyBag)<br />
END_COM_MAP()<br />
<br />
BEGIN_PROP_MAP(CHTMLInfoCtl)<br />
PROP_ENTRY("URL", 0, CLSID_NULL)<br />
END_PROP_MAP()<br />
<br />
public:<br />
STDMETHOD(get_URL)(BSTR *pVal);<br />
STDMETHOD(put_URL)(BSTR newURL);<br />
private:<br />
CComBSTR m_bstrURL;<br />
};<br />
let me know if you have other questions.
|
|
|
|
|
I want to check the first letter of my input. and based on that take certain actions.
here is the input :
S 000-00-0001 C 20
B 000-00-0001 C 20
B 000-00-0002 CD 10
B 000-00-0002 JDSU 50
S 000-00-0002 CD 5
B 000-00-0010 TXN 30
B 000-00-0010 TYC 20
B 000-00-0009 WCOM 20
S 000-00-0009 WCOM 10
C citigroupinc 57
any ideas out there
thank you.
|
|
|
|
|
Please is Easy...
You need to read the string until the first space....
Reagrds...
At the source of every error which is blamed on the computer, you will find at least two human errors, including the error of blaming it on the computer
Carlos Antollini.
Sonork ID 100.10529 cantollini
|
|
|
|
|
Please is Easy...
You need to read the string until the first space....
Regards...
At the source of every error which is blamed on the computer, you will find at least two human errors, including the error of blaming it on the computer
Carlos Antollini.
Sonork ID 100.10529 cantollini
|
|
|
|
|
That should be pretty straightforward. If the char array where you have the input is pStr1 then pStr1[0] would be the first character in your string. Now use a switch-case construct.
Nish
Sonork ID 100.9786 voidmain
www.busterboy.org
If you don't find me on CP, I'll be at Bob's HungOut
|
|
|
|
|
does this help?
char buffer[200];
gets(buffer); // get the whole line of user input
trimfrontspaces(buffer);// get rid of any spaces before the first character
swich(*buffer)
{
case 'B': break;
case 'S': break;
case 'C': break;
default: break;
}
|
|
|
|
|
I've got an SDI app with the usual status bar.
But I've also added another status bar, which is placed above the ordinary one. The second one also has the "size grip" in the bottom right corner to resize it with.
How do I get rid of this resizing feature?
I do not want the user to resize the status bar.
Cheers,
/Fredrik
Sonork ID: 100.11430:PhatBoy
|
|
|
|
|
take a look at CBRS_SIZE_DYNAMIC and CBRS_SIZE_FIXED when you create the second status bar. You might need to take care to give it an unique ID too, but probably only if you are using LoadBarState().
|
|
|
|
|
mcsellski wrote:
take a look at CBRS_SIZE_DYNAMIC and CBRS_SIZE_FIXED when you create the second status bar.
But then it does not display at all?
Cheers,
/Fredrik
Sonork ID: 100.11430:PhatBoy
|
|
|
|
|
Hi,
I'm playing with an explorer like app (SDI), which has a ListView in a splitter window. I need to handle the notification messages from the list control.
Where do the handlers for list view notifications belong? In the Main Frame, or the View? Does it matter? The listview notifications don't see to be directly supported by ClassWizard, so I guess I'll need to add the entry to the message map manually.
Thanks
|
|
|
|