|
|
Hi Friends,
I have a Propertysheet class. I had set the TCS_BOTTOM style for this propertysheet. If I execute this application in a system which has IE4.0 or above, all the tabs are coming at the bottom as expected. But if I run this exe on a system which has IE 3.0, the tabs appear at the top.
But the same thing i tried with a tab control whose styles are set to BOTTOM tabs. They seem to work well both in IE 3.0 as well as IE 4.0 and above.
How can i make a Propertysheet control have tabs at the bottom with IE3.0 ?
Below is my code :
{
CntrlLevelSheet.AddPage(&MajorPage1);
CntrlLevelSheet.AddPage(&MajorPage2);
CntrlLevelSheet.AddPage(&MajorPage3);
CntrlLevelSheet.Create(this, WS_CHILD, 0);
CntrlLevelSheet.GetTabControl()->ModifyStyle (0,TCS_BOTTOM);
CntrlLevelSheet.SetActivePage(0);
CntrlLevelSheet.ShowWindow(TRUE);
}
|
|
|
|
|
The difference is because the two computers has different versions of commctrl.dll
I don't remember if the newest version is included in the Platform SDK, and can be installed without IE. If not, you have to upgrade IE to make it work...
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
This might help you to install the latest ComCtl32.dll along with your app on the user's system:
http://www.codeproject.com/miscctrl/commctrls.asp
There are other articles that show how to test for the existence of a specific version of this DLL.
/ravi
"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
How can I determine the size of dynamic array?
double *dynAr = new double[5]
This array has 5 items but if there is a condition that resize this array and then I want to know its size.
|
|
|
|
|
You can't do this. Use std::vector<double> instead - it has a size() method that does exactly what you want.
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
Actually you *can* do it - sizeof(array)/sizeof(int). Apparantly it's not recommended, but it works.
I second you though - vector is the obvous solution.
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.
|
|
|
|
|
No, you can't. He's using new and array is allocated on the heap, so sizeof(array) will be the size of pointer. This trick works only with global or stack-allocated arrays; I don't beleive it's not recommended in such case.
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
Fair enough - I read your response and remember seeing the method I quoted in a book, I've never used it and so have never thought it through.
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.
|
|
|
|
|
Hello, the codegurus around the world.;)
ANCI C++ type array doesn't have the same functionality like MFC array classes
like CAarray, CStringArray, and so on.
In this case, you can create your own class called CdoubleArray, and
create the member function GetSize()....
Have a nice day!
-Masaaki Onishi-
|
|
|
|
|
Hi there!
I've created a program in AppWizard - just a SDI with a CVIEW and i've been using a CDC->LineTo(X,Y) to draw stuff.. I would like to be able to save this as a .jpeg, .gif or something..
HOW can I get this done?
|
|
|
|
|
First you need to change your code so it draws stuff onto a bitmap and then show that bitmap in OnPrepareDC, then you can use CXImage from this site to save that file using one of the formats you mentioned.
You may also find it helpful to look at GDI+, although I hear the guy who wrote most of the artcles on the subject here has no idea, you may like to check them out anyhow. GDI+ saves and loads these formats, and also has a lot of new cool stuff.
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 All!
I've a problem : Into an application I'm developing, I need to check if a key (or a key set) is pressed and handle this event.
Well : I can now capture the event "key_is_pressed", but I can't avoid the event this pression generates.
For Example : If an user on W98 presses the keys CTRL+ALT+Canc I receive from my application an error status, and I show a dialog like "what do you do?". So, All seems ok but, after the Dialog has been shown, I can't avoid the visualization of the task-list window.
How Can I do?
N.B : that's only an example : the same problem was encountered while monitoring the status of ALT+F4 or CTRL+Esc etc.etc...
Thanx All
Alessio
|
|
|
|
|
You need a keyboard hook to intercept the message and stop Windows acting on it. Sorry, I've never written one, so I can't help more, but that is most certainly what you want.
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 all,
I am designing a project which can be separated into two layers.
1. The user interface
2. the business logic.
The business logic has to be developed as COM components (since it will need to be reused in other environments)
The question is in which language (environment) to write the users interface. Should I do it in Visual Basic or Visual C++ (or other)?
Thanks in advance
Alberto Gattegno
Software Engineer
http://www.itgil.com
|
|
|
|
|
I would use VC++, but it's because I can't write a line of VB...
If you are good at VB, it's AFAIK a lot more easy to use COM objects from VB that it is from VC++.
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
This is a loaded question. It depends what you want to do. If you want to get an interface up quickly, then the answer is obviously VB. If you want have maximum flexibility then you need C++, where you can create controls derived from those provided by MFC. Personally I have my doubts about how fast VB is compared to someone who is proficient in VC, but on the other hand your components are obviously going to be written to take advantage of VB's hiding implimentation details from you, which further simplifies your task.
Did I just recommend VB to someone ? I'm hoping not.... Personally I would go VC++/MFC if I was doing it professionally and VC++/WTL if I was doing it for fun ( because I've not done much WTL ).
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.
|
|
|
|
|
Write it in whatever you are most experienced with. I had a similiar situation where I had a Telephony component written as a COM object. At first I thought that it would be easier and quicker to write the UI in VB. However in the end I decided to use MFC because that is what I've been using for the past 8 years.
Michael
|
|
|
|
|
Anyone know if the CDTPicker can do 00:00 - 24:00 format? If so, how does one achieve this?
Right now I can only get it to go from 00:00 to 23:59. If anyone could point me to some decent instructions regarding the control I'd most appreciate it.
Regards,
John
|
|
|
|
|
If anyone could point me to some decent instructions regarding the control
MSDN has more info here.
You can try to use 'callback fields' in the format string. However, I'm not sure if you'll be able to go beyond 23:59.
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
>MSDN has more info here.
>
>You can try to use 'callback fields' in the format string. However, I'm not >sure if you'll be able to go beyond 23:59.
Thanks for the advice, and I think that the callback fields will work provided I can do one of the following:
a) Get access to the event of a click on the dtpicker's spin control so that I can use it to modify the psuedo-hour-field that I created.
or
b) Get the dtpicker to display itself such that the spin control AND the drop down menu are not visible nor accessable. I don't want to give the user any false affordances.
Regards,
John
|
|
|
|
|
What's the problem?
After 23:59 comes 00:00.
I have never ever seen anything showing the clock as 24:00, its always 00:00 or 0:00.
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
24:00 is a valid time according to ISO 8601. 24:00 on day N == 00:00 on day N+1. The seconds field should be able to show values 00-60 bacause of leap seconds. See here for more information.
|
|
|
|
|
24:00 is a valid time according to ISO 8601.
It seems like you are right about that.
But, you would only show 24:00:00 for a single second, then it would shift to 00:00:01.
And leap seconds... How often do you need one of those in a timepicker?
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
>How often do you need one of those in a timepicker?
For my purposes I just need to be able to enter a time into a database for any given day, and I have to be able to input from 00:00 all the way to 24:00 for that day. So yes, if I can get the timepicker to read 24:00:00 then that will be just fine. The problem is how? I can't find any way to go past 23:59 right now.
Regards,
john
|
|
|
|