|
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
|
|
|
|
|
Aaron Schaefer wrote:
Where do the handlers for list view notifications belong? In the Main Frame, or the View?
View
Aaron Schaefer wrote:
The listview notifications don't see to be directly supported by ClassWizard
Class wizard support it,search,you'll find it;)
Mazy
Don't Marry a Person You Can Live With...
Marry Someone You Can Not Live Without
|
|
|
|
|
I tried over-riding the OnNotify method of the CMainFrame class and managed to get the notification messages OK. Then I commented out the OnNotify in the Main Frame and tried overriding it in the View class, but never got anything.
So how do you handle the listview notification in the view? Does the frame handler have to forward it or something?
|
|
|
|
|
Sorry ,it's not clear for me ,if you mean you overriden it in both of them,
it'll not wotk ,only overriden it in view.
I have VC7 and I forget about VC6,the interface of VC7 has changed a lot,and
in VC7 there is nothing like calss wizard in vc6.I can ONLY add notification
of listview in view class not in frameclass,so if is possible there too only overriden it in view class.
And think about it a little....,you are talking about ListVIEW,of course its notification will be in VIEW too not in MAINFRAME.(You said your view class is CListView,don't you?)
I've got confused about what are you talking about ,maybe another person can help.
Mazy
Don't Marry a Person You Can Live With...
Marry Someone You Can Not Live Without
|
|
|
|
|
well, the listview is embedded in a splitter window inside the main frame. The actual view class for the app is just a generic CView derived class. But, I was trying to override in the main frame, which worked, so then removed all of the override code in the main frame and tried to move it to the view, and nothing . . .
Oh well, no big deal, just trying to figure out how the notification messages are supposed to get passed around. They don't seem to make it all the way to the view after I comment out the override in the frame.
Thanks
|
|
|
|
|
I'm new to database programming in Visual C++
and have a few questions. Is the only way to get
data from the database to use CRecordset?
How can I get data by executing SQL directly?
|
|
|
|
|
Here is very good ebook for begginer in database:
http://lnrpc2.irb.hr/ebooks/0672313502/index.htm
Mazy
Don't Marry a Person You Can Live With...
Marry Someone You Can Not Live Without
|
|
|
|
|
I know what a string table is and how to use it. My question is -- is it worth it? Do those strings remain on disk and LoadString() reads them from there, or are they really loaded into ram memory during program startup?
|
|
|
|
|
Strings table are embedded inside the executable image (the .EXE file), that gets loaded to virtual memory at program startup. It is the processor's responsibility to bring virtual memory pages to RAM or store them in the disk cache (the swapping file) depending on whether the pages are being referred to or not (and some other optimization policies); so the question of whether the string table is loaded into memory or not is a fuzzy subject --probably it won't get loaded if you don't use resource at all.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Joaquín:
very educative!!!
I am surprised!!!
CLAP, CLAP, CLAP!!!
Regards....
The programmer's national anthem is 'AAAAAAAARRRRGHHHHH!!'.
Carlos Antollini.
Sonork ID 100.10529 cantollini
|
|
|
|
|
You'll make me blush
Actually, there are inaccuracies in my explanation --read only sections of the executable probably won't ever do it to the swapping file (they're retrieved directly from the .EXE file itself and simply dismissed when not needed), and stuff like that.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|