|
What can i do to close the current workspace?
rechi
|
|
|
|
|
i want to disable ctrl+alt+del under windows 2000 and SystemParameterInfo() is not working. here is the code
UINT _Junk;
// turn off ctl-alt-del
SystemParametersInfo(SPI_SETSCREENSAVERRUNNING,1,&_Junk,0);
// ... do stuff? like what?
// turn on ctl-alt-del
SystemParametersInfo(SPI_SETSCREENSAVERRUNNING,0,&_Junk,0);
what could be the problem, if anybody tells me.
|
|
|
|
|
it works only for Windows 95/98/Me
|
|
|
|
|
According to MSDN you shouldn't use SPI_SETSCREENSAVERRUNNING (look up SystemParametersInfo for details). Would SPI_SETSCREENSAVEACTIVE help here? - I don't think it would but it might be worth a try
If you have MSDN there, look up the article called 'HOWTO: Disable Task Switching on Win32 Platforms' - it talks about low level hooks to achive the goal. If you find an easier / better way please post a reply here for the rest of us!
Dylan Kenneally
London, UK
|
|
|
|
|
Hi there,
Just back from Barcelona for Tech-Ed 2002, and I saw in same presentations
that it was possible to use the new debugger shipped with Visual c++ with
the 6.0 compiler:
The question is:
1. How to do it?
2. I can still use after on the same machine
the debugger .NET with compiler 7.0 (Unmanaged C++)
Thanks, claudio
|
|
|
|
|
Hello,
i want to change the buffer contents of the CArchive or of the attached
CFile Object. But it is not allowed to make a write access in the "loading path" of serialization. I don't want to override the CArchive class.
Any solutions ?
Thanxs !
Marco
|
|
|
|
|
I have positioned an ActiveX control onto a tabsheet control. I now want the ActiveX control to resize with the window. For some reason i don't get the desired result, can nayone see where i am slipping up.
Thanks
Richard
Code Fragment:
Init Dialog - Creation of the ActiveX Control
m_tabSheet.GetWindowRect( &rc );
ScreenToClient( &rc );
rc.top += 30;
rc.bottom -=90;
rc.left += 5;
rc.right -= 40;
m_controlWrapper1.Create(m_hWnd,rc, _T("MSCAL.Calendar"), WS_CHILD, ....)
Resize Event
=============
RECT tabRC;
m_tabSheet.GetClientRect(&tabRC);
ScreenToClient( &tabRC );
tabRC.top += 30;
tabRC.bottom -=90;
tabRC.left += 5;
tabRC.right -= 40;
m_controlWrapper1.SetWindowPos(CWnd::wndTop, tabRC.left, tabRC.top,tabRC.right - tabRC.left, tabRC.bottom - tabRC.top,SWP_SHOWWINDOW);
|
|
|
|
|
One thing is that I think you'd better use the MoveWindow function instead of the SetWindowPos function in that case.
Have you checked the the coordinate don't reach something like a bottom higher than a top...
Computers have enabled people to make more mistakes faster than almost any invention in history, with the possible exception of tequila and hand guns.
- Carl Gundlach
|
|
|
|
|
I want implement full screen mode in my small application. I wrote codes
as follows:
cx =
cy =
SetWindowPos (hwnd, NULL, -4, -4, cx, cy, SWP_NOZORDER | SWP_FRAMECHANGED);
They work pretty well, the minor boring thing is that the task bar (if Not
autohide) is still there. it will not disappear unless I click it once? any
solution? thanks, thanks.
http://ihome.ust.hk/~zhaoming
|
|
|
|
|
Siuming wrote:
SetWindowPos (hwnd, NULL, -4, -4, cx, cy, SWP_NOZORDER | SWP_FRAMECHANGED);
Make that :-
SetWindowPos (hwnd, HWND_TOPMOST, -4, -4, cx, cy, SWP_NOZORDER | SWP_FRAMECHANGED);
Author of the romantic comedy
Summer Love and Some more Cricket [New Win]
Review by Shog9
Click here for review[NW]
|
|
|
|
|
Very close Nish, but if you want to make the window topmost, you have to drop the SWP_NOZORDER flag
---
CPUA 0x5041
Sonork 100.11743 Chicken Little
Within you lies the power for good - Use it!
|
|
|
|
|
|
Many Thanks! It works!
goal
|
|
|
|
|
Hi,
I have been trying the same thing,But my window is not shown properly.
In my code
cx=GetSystemMetrics(SM_CXFULLSCREEN);
cy=GetSystemMetrics(SM_CYFULLSCREEN);
Regards
Neha
|
|
|
|
|
Dear,
What I've used are:
<br />
int cx = GetSystemMetrics (SM_CXSCREEN);<br />
int cy = GetSystemMetrics (SM_CYSCREEN);<br />
int cyCaption = GetSystemMetrics(SM_CYCAPTION);<br />
int cyMenu = GetSystemMetrics(SM_CYMENU);<br />
SetWindowPos (hwnd, HWND_TOPMOST, -4, -(cyCaption + cyMenu + 4), screenx + 8, screeny + (cyCaption + cyMenu) + 8, SWP_FRAMECHANGED);<br />
|
|
|
|
|
Hi,
I've recently installed .NET and is familiarizing myself with it right now. With
the common-runtime and C# is C++ getting less love from MS? I've been developing
with VC6.0 for some time now and I like it ok, but the .net release seems
to be moving in a general direction away from c++.
I am just wondering about the future of my favorite language?
Is the future with c# now? Or is it managed c++?
Is MFC or ATL based apps outdated now?
In essence, I'm wondering what I should focus on in the .Net world?
faust
|
|
|
|
|
I say learn C# but don't bail on C++. For starters, they have put a lot into standards compliance, with more to come, and that has got to be a good thing.
Christian
I am completely intolerant of stupidity. Stupidity is, of course, anything that doesn't conform to my way of thinking. - Jamie Hale - 29/05/2002
|
|
|
|
|
I agree about the standards compliance. That is a good sign.
Thanks for the advice, and I think I'll follow it and learn c#.
I'm still interested in more comments from others as well.
|
|
|
|
|
My strategy for developing .NET applications is to use C# for the UI and database handling and use managed C++ for the system calls and stuff that the Framework doesn't support (such as TAPI, MAPI)
Michael
Logic, my dear Zoe, merely enables one to be wrong with authority. - The Doctor
|
|
|
|
|
|
That sounds like a nightmare to maintain though
And when God, who created the entire universe with all of its glories, decides to deliver a message to humanity, He WILL NOT use, as His messenger, a person on cable TV with a bad hairstyle.
|
|
|
|
|
For me C# is Microsoft answer to Java, I don't like and don't want to use C#. There will be enough room for C++ in the future too.
The problem is that the main C++ compiler is VS and that we all love VS, but should the MFC give up I'm sure there will be some replacement library - that library could generate CLR or else I don't care, I just want to code C++.
You see you're not alone
Yarp
|
|
|
|
|
Nice. Still what Microsoft says and does is quite
important. I still need to make livelihood, even if it
means C#. As long as I don't ever need to use VB again,
I follow the money.
Still it would be nice if some of all this effort
had gone into providing better libraries and standard
conformance of c++ earlier, that way I don't think
there would have been the same "need" for C# or Java.
But who knows?
|
|
|
|
|
As you say the final word is Microsoft.
But they still have to consider our position and reality.
I know some companies who ran Java projects and suffered many dispointements. At the moment C# is much too young to be compared to this experience and I think we can rely on Microsoft to make it a good Microsoft solutions integrated product, but time will do the rest.
I hope C++ will win.
Yarp
|
|
|
|
|
We both know this question you're asking is ahead of its time. Don't forget why Microsoft came up with C# in the first place. What happens if the "common-language runtime" doesn't prove itself practical in the long run?
In other words, and as a personal opinion, I would not consider anything else other than already-based lanuages (C, C++, VB, etc) for long-term projects.
In any case, you could always ask yourself a few questions before deciding to develop something in C#:
1. Do I really need the common-language feature? In other words, are there any other language involved in this project - even as a 3rd party module?
2. If C++ is a pain in this case, why not use VB or managed C++, or Java? Something that surely works on my customer's computers without installing new runtime libraries... What will C# give me that they won't? Is it performance, low maintenance, etc?
Look, it's not that I have anything against C#, or any other language for that matter. It's just that experience shows that these new initiatives are sometimes rendered obsolete by other initiatives after a relatively short time. The few exceptions are C and C++. So your customers will be more happy to know that their product is based on something solid. That's the most important issue in my opinion.
/=/=/=/=
Deus
/=/=/=/=
|
|
|
|