|
You mean the size relative to screen resolution? You'd have to use GetSystemMetrics to get the resolution and call MoveWindow. What's displayed in your dialog?
Tomasz Sowinski -- http://www.shooltz.com
*** Si fractum non sit, noli id reficere. ***
|
|
|
|
|
My dialog box contains an ActiveX control which contains a graph. My dialog box doesn't have maximize/restore button because I want to keep my buttons' layout. I'm currently using 1024&768. When I switch to 800*600, everything becomes too big to fit on my 15" monitor.
|
|
|
|
|
I guess you should go for resizable dialog. There are classes implementing this right here on CP - try searching for CResizableDlg or browse through dialog section of the site.
Tomasz Sowinski -- http://www.shooltz.com
*** Si fractum non sit, noli id reficere. ***
|
|
|
|
|
Thanks a lot. I love this forum, always get reply within 5 minutes.
|
|
|
|
|
Hi ALL!
I would be very thankful if anyone could help me with my suddenly arised problem.
In my app I change screen resolution from 1280x1024 to 1024x768.
I use ChangeDisplaySettings() function and it really changes resolution but after that
standard Windows Taskbar is appeared far below the bottom of display.
The Question is: How to return Windows Taskbar to it original place (namely at the
bottom edge of display)?
Thank you.
|
|
|
|
|
read task bar topic on MSDN.
i think u need to change docking area also.
includeh10
|
|
|
|
|
WHy is it that both work:
CString x = "123";
int myNum = atoi(LPCTSTR(x));
and
int myNum = atoi(x)
Appreciate your help,
ns
|
|
|
|
|
Because casting LPCTSTR is not necessary.
CString defines an operator for LPCTSTR, and the atoi() function takes an LPCTSTR arg. So the compilers knows which functionality to use.
casting LPCTSTR is not really good programming practise... Getting compiler warnings can highlight problems before you spend hours debugging them.
Signature space for rent. Apply by email to....
|
|
|
|
|
CString class has LPCTSTR() operator defined.
Pavel
Sonork 100.15206
|
|
|
|
|
The LPCTSTR cast is totally unnecessary. CString provides one for you.
Tomasz Sowinski -- http://www.shooltz.com
*** Si fractum non sit, noli id reficere. ***
|
|
|
|
|
So is it true that any place I need a char*, I can use a CString directly? I'm not too sure about that ...
Appreciate your help,
ns
|
|
|
|
|
ns wrote:
So is it true that any place I need a char*, I can use a CString directly?
No. You can use CString directly whenever you need const char *. If you need char *, then use CString::GetBuffer.
Tomasz Sowinski -- http://www.shooltz.com
*** Si fractum non sit, noli id reficere. ***
|
|
|
|
|
I think he meant that every where he wants to use a string ( char*, and all C type allocations business ) he can use a CString.
Max.
|
|
|
|
|
Still, char* is not const char*. The round CString will just not fit in the square char*.
--
Please state the nature of your medical emergency.
|
|
|
|
|
ns wrote:
So is it true that any place I need a char*, I can use a CString directly? I'm not too sure about that ...
Sure, I do.
Regardz
Colin J Davies
Sonork ID 100.9197:Colin
You are the intrepid one, always willing to leap into the fray! A serious character flaw, I might add, but entertaining.
Said by Roger Wright about me.
|
|
|
|
|
I have a hardware device which rattles the DSR line to let the PC know it is there...
Unfortunatly Windows 2000 seems to run an interrupt handler whenever the DSR line changes state, and when the DSR line is rattling at 10 microseconds, the PC is unable to cope with all these interrupts...
Is it possible to disable the interrupt on the DSR line in windows 2000 (and XP for that matter)...
(Clearing DSR in the COMM Mask makes no difference...)
Thanks...
Blade[DMS]
|
|
|
|
|
10 microseconds ? ~ 10^5 Hz??? That's a bit quick... i'm not suprised it causes problems.
Anyway, methinks the only way you'll do this is with the DDK.
Jon
Signature space for rent. Apply by email to....
|
|
|
|
|
Thanks, Thats what I thought...
We're working on changing the devices firmware to reduce the frequency a lot
Shame... if it was DOS would could just clear the MSR interrupt flag in the IER...
Ah well...
Blade[DMS]
|
|
|
|
|
Hi Colleagues,
Does anybody have any information about the methods of the DHTML Edit Control (ActiveX) from Microsoft? I look the online msdn, but I don't find anything.
My problem is to use this control inside my VisualC++ application. I want to create() it dynamically but I don't know its styles (I use the defaults). And I don't have html pages I want to set its content depending what the user needs, I have the html pages in a DB (only text, at the moment).
Thanks in advance for your help.
Best Regards,
Pere
Pere Llibre.
|
|
|
|
|
Lookup IHTMLEditDesigner and IHTMLEditHost.
You may download the DHTML Edit SDK separately, though it is now part of the platform SDK.
There is no other sample about it with in VS.NET cd.
I made a quick google search and found a fine article here[^].
sometimes it helps to look at the IL generated code
a MS guy on develop.com "answering" .NET issues
|
|
|
|
|
is it possible to do disk copy from 650M cd to 700M CD?
i tried several times but there always were some errors in the middle of copy. so i can copy any.
thx
includeh10
|
|
|
|
|
Yes it is possible. Perhaps your source CD has copy protection.
And is this really a Visual C++ question???
Signature space for rent. Apply by email to....
|
|
|
|
|
the source disk is not original one: my friend copied from somewhere on a 650M cd, i copy from the 650M cd to 700M cd. i tested, it is OK if copy it to 650M cd. but it is not OK if to 700M cd.
what is problem?
by the way, i am sure it is strong related to visual c++.
thx
includeh10
|
|
|
|
|
includeh10 wrote:
by the way, i am sure it is strong related to visual c++.
Only if the disc contains pirated copies of Visual C++ :P
--
Please state the nature of your medical emergency.
|
|
|
|
|
file_length = (int) src_topic_file->GetLength();
total_topics = file_length / TOPIC_SIZE;
TopicVector.SetSize(total_topics);
for (int i=0; i<total_topics; i++)
{
src_topic_file->Seek(TOPIC_SIZE*i,0);
dwRead = src_topic_file->Read(buffer, TOPIC_SIZE);
topic.SetTopicData((TOPIC*)buffer);
TopicVector.Add(topic);
}</code> TopicVector is CArray<CTopicItem,CTopicItem>
topic is CTopicItem as well (derived from CObject)
I have a Compile Error on the .Add line with
Cannot Convert Parameter 1 from CTopicItem to CTopicItem
am I doing something wrong?
Ryan Baillargeon
Software Specialist
Fuel Cell Technologies Inc.
|
|
|
|