|
Maybe I'm reading your code incorrectly (i'm still in my first cup-o-tea this morning) but
it looks like youi create the extension key in HKEY_CLASSES_ROOT which is fine but all the
rest of the keys are created off HKEY_CLASSES_ROOT as well instead of under the extension key.
Am I reading it wrong?
This article may help...
Associate File Extension with Shell OPEN command and Application[^]
|
|
|
|
|
Can anyone help provide a method to add checkbox controls programatically. I would like to read in a file that contains the names of the checkboxes to be created and displayed. The file contents will not stay the same thus the need to create these at runtime. Thanks.
sd
|
|
|
|
|
|
Or you can use of
CButton m_Button;
m_Button.Create("Test",WS_CHILD|BS_AUTOCHECKBOX|WS_VISIBLE,CRect(0,0,100,23),this,1);
</code>
|
|
|
|
|
Hello,
We cants add checkbox at run time.
What we can do is:
Add the Check Box in ur Dialog.
After you read the Name of checkbox from file,u can change the lable of ur check box easily.
If you want to display check box at run time only then you can hide them previously and then use ShowWindow(SW_SHOW) method to make those check box visible.
Abhijeet
|
|
|
|
|
I would like some advice about how to proceed with this little problem. I am developing a set of classes which can both read and write to the infamous index.dat internet cache files. These files are permanently locked from within wininet.dll. I should also point out they are memory mapped files being shared between multiple processes.
Is there any way my own process could access the files, without using wininet.dll, and without causing read/write problems while processes like Iexplorer is using it?
|
|
|
|
|
How does one set the size of the text displayed in a CEdit (or RichEdit)? I can set up a RichEdit control so that new user input is displayed using the correct font, but data in the control populated by the app (SetDlgItemTextA(IDC_RICHEDIT21,_T("7.0"))) uses the default font.
Lee
|
|
|
|
|
For a CEdit, you'd need to create the font you want, and use SetFont. For text in a Richedit, as a guess, change the text selection to include all the text, and then use GetCharFormatSelection(), modify the font, and use SetCharFormat?
I haven't tried this, since I tend to allow the user to control what's in there instead. There should certainly be a message to allow you to set the format (including the font used).
Steve S
Developer for hire
|
|
|
|
|
Do you want to save this font for next run app?
|
|
|
|
|
I have a CFormView application that has alot of edit boxes
and so the right-hand scroll bars appear. They only way
to scroll down is to move the mouse over, click on the scroll
bars and scroll down.
How can I activate the mousewheel so that spinning that makes
the scrollbars move down?
Please, any response any one can give me will be greatly appreciated.
Sincerely,
Danielle Brina
|
|
|
|
|
Hi, I'm creating a variable, m_ulCounter, as
psuedo code below, non-compilable
Static declaration behaviour within MFC dialog
class blahDlg : public CDialog
{
//stuff
private:
static unsigned long m_ulCounter;
//stuff
};
Can I expect this static variable to act as its C counter parts - retaining it's value even though it might go in and out of scope?
Thanks.
|
|
|
|
|
Don't you hate it when people answer their own questions?
Anyway, I found the answer:
C++: The Complete Reference::Herbert Schildt::Chapter 12:Classes and Objects:Page 311.
Loosely quoted: When you declare a static data member within a class you are not defining it and therefore not allocating any memory for that static data member.
You must define a global variable, outside of any class-scoped object, (define it in main (or what-have-you)).
Any class that uses this variable has the potential to change it - which probably led to the idea of fixing the wound in "shooting one's self in the foot" for C++ - which states (in one form or another): You accidentally create a dozen instances of yourself and shoot them all in the foot. Providing emergency medical care is impossible since you can't tell which are bitwise copies and which are just pointing at others and saying, "That's me over there."
Ref:http://m5p.com/~pravn/foot.html[^]
|
|
|
|
|
yes.
blahDlg::m_ulCounter will retain its value even if there are no blahDlg objects instantiated anywhere.
|
|
|
|
|
Guys,
Our main program calls a dll that it uses (obviously ). Know we want to use a newer version of this dll, but some of the functions have changed (name and/or arguments added and/or removed).
Is it possible to fool the calling program to call a wrapper that calls the dll? The idea is to rename the dll and add a new one (the wrapper) with the original dll name.
We want to do this to avoid fiddling with the source code of our main app.
(PS: hope I'm making sence )
Many thanks !
V.
If I don't see you in this world, I'll see you in the next one... And don't be late. (Jimi Hendrix)
|
|
|
|
|
V. wrote: Is it possible to fool the calling program to call a wrapper that calls the dll?
yes
V. wrote: he idea is to rename the dll and add a new one (the wrapper) with the original dll name.
that's what i'd do
|
|
|
|
|
Hi.
I'm writing an application that it create a CComboBox at runtime like this:
<br />
rcControl.left = long(rcClient.Width() * 0.05);<br />
rcControl.top = long(rcClient.Height() * 0.10);<br />
rcControl.right = rcControl.left + long(rcClient.Width() * 0.90) ;<br />
rcControl.bottom = rcControl.top +long(rcClient.Height() * 0.40); <br />
<br />
m_cboParam.Create(CBS_DROPDOWNLIST|LBS_STANDARD|CBS_SORT|WS_CHILD|WS_VISIBLE, rcControl, this, IDC_PARAM);<br />
....<br />
It works, but the problem is that I want to show more items when the user pull the list down. At the moment it shows just two items and I must scroll the list down to see the rest of them.
How could I set, maybe the heigth or something else, so it will be able to show more than two items.?? (at least 4 or 5).
Setting the amount of items to show in a combobox at design time is easy:->, just clicking over the arrow and then stretch it to the desire height. But how could I set that at runtime??
Thank you.
Demian.
"I have always wished that my computer would be as easy to use as my
telephone. My wish has come true. I no longer know how to use my telephone."
-Bjarne Stroustrup, computer science professor, designer of C++
programming language (1950- )
|
|
|
|
|
Forget it.;P
Solved.
I had just to adjust the height in other function when the controls reposition.
Thank you.
Demian.
"I have always wished that my computer would be as easy to use as my
telephone. My wish has come true. I no longer know how to use my telephone."
-Bjarne Stroustrup, computer science professor, designer of C++
programming language (1950- )
|
|
|
|
|
Demian Panello wrote: rcControl.left = long(rcClient.Width() * 0.05);
rcControl.top = long(rcClient.Height() * 0.10);
rcControl.right = rcControl.left + long(rcClient.Width() * 0.90) ;
rcControl.bottom = rcControl.top +long(rcClient.Height() * 0.40);
m_cboParam.Create(CBS_DROPDOWNLIST|LBS_STANDARD|CBS_SORT|WS_CHILD|WS_VISIBLE, rcControl, this, IDC_PARAM);
RECT given while creating combo box should mention that. ie.
in this case increase rcControl.bottom value, it will give you desired effect.
Demian Panello wrote: But how could I set that at runtime??
It is easy ,too. Isn't it?
|
|
|
|
|
Dear All,
I am developing a Windows Service application using VS.NET 2003. It was fine when I run it without adding any interface (ATL Interface).
Then I added one interface(ATL) called (ICallRDI) where I have written one member function (SendStatus).
Here I am getting this below error ?
: error LNK2001: unresolved external symbol _LIBID_RMILib
.\Debug/rdi.exe : fatal error LNK1120: 1 unresolved externals
this '_LIBID_RMILib' persented at CallRDI.h file.
I need to solve this. Kindly Help me in this.
Thanks.
|
|
|
|
|
I use App Wizard create the project that derive from CEditview.(it look like "NotePad").
My problem is, when I open a file that has too many character in one line,but edit veiw don't have Horizontal scroll.
How to do if I want to add horizontal scroll for edit view?
|
|
|
|
|
hi
My doubt is ,is it possible to make tree controls nodes to look bigger and used for touchscreen projects.
i couldnt find it .if anyone knows plz answer me.
"Men never do evil so completely and cheerfully as when they do it from religious conviction"
-Pascal
|
|
|
|
|
Hi,
Could any one please guide me to know answer.
As I know TurboC is 16 Bit compiler and Windows is 32 bit OS. How it is possiable for a 16 bit compiler like TurboC is running in 32 bit OS(Windows)?
Thank you.
Nice talking to you.
If you judge people, you have no time to love them. -- Mother Teresa
|
|
|
|
|
16 bits applications can be run on a 32 bits machine, just as 32 bits application can run on Windows 64 bits...
|
|
|
|
|
Hello Mr.Toxcct,
Very very happy to meet you in Codeproject. Thanks for your quick reply.
My actual doubt is how this TurboC compiler is( even it is 16 bit compiler )running in 32 bit OS(Windows). What is internully happening to run 16 bit things in 32 bit OS.
Here I have the answer same as you replied. But I dont have answer if any one says how it is possiable. I hope you got my question.
Thanks a lot.
Nice talking to you.
If you judge people, you have no time to love them. -- Mother Teresa
|
|
|
|
|