|
as far as I'm aware the Invalidate(); ShowWindow(); combo should do it
so the only other thing i suggest is to look at their placement, if your running through code it may be somthing is causing the display to invalidate and not redraw after these calls.
This is the best I can do without seeing your code
|
|
|
|
|
If i use that combination,In 98 it erases the background.In win2k it gives some refresh problem.
|
|
|
|
|
I'm trying to launch an executable from a service using CreateProcess() but the executable never runs.
The service is running in an user account (and needs to) so can't use the LocalSystem and therefore have the 'Allow service to interact with desktop' flag set. (this solves the problem but like I said can't be used).
Help.
|
|
|
|
|
hi,
i do it like this and this works fine....
look at code snippet:
MyApp = another application name to like start
in .h
HANDLE m_hMyAppThread, m_hMyAppProcess;
in .cpp
STARTUPINFO si;
PROCESS_INFORMATION pi;
ZeroMemory(&si, sizeof(STARTUPINFO));
ZeroMemory(&pi, sizeof(PROCESS_INFORMATION));
CString strName;
strName = "C:\Progam Files\myApp.exe";
TCHAR Name[1024];
_tcscpy(Name, strName);
if(CreateProcess(NULL, Name, NULL, NULL, FALSE, ORMAL_PRIORITY_CLASS,
NULL, NULL, &si, &pi))
{
m_hMyAppThread = pi.hThread; //keep this handles for closing
m_hMyAppProcess = pi.hProcess;
}
//another function for closing
FILETIME ftCreationTime;
FILETIME ftExitTime;
FILETIME ftKernelTime;
FILETIME ftUserTime;
//GetThreadTimes not supported with win98
GetThreadTimes(m_hMyAppThread, &ftCreationTime, &ftExitTime,
&ftKernelTime, &ftUserTime);
if( ftExitTime.dwHighDateTime == 0 && ftExitTime.dwLowDateTime == 0 &&
ftCreationTime.dwHighDateTime > 0 && ftCreationTime.dwLowDateTime > 0)
{
TerminateProcess(m_hMyAppProcess, 0);
WaitForSingleObject(m_hMyAppProcess, INFINITE);
CloseHandle(m_hMyAppProcess);
CloseHandle(m_hMyAppThread);
}
Hope it helps,
Dan
|
|
|
|
|
How to create window which has context help button in title bar ? Context help style in resource editor works only on windows which has only close button. When i have window with minimize or maximize button set, this style does not display context help button Is this by design, or there is some way how to add help button to any window ?
Thanks
rrrado
|
|
|
|
|
rrrado wrote:
Is this by design, or there is some way how to add help button to any window ?
This is by design, there isn't help button in title bar if there's still minimize and close buttons.
The only case where I've seen them all together as with a dialog-based application on W2K, but the "?" button did not work.
I suppose if you want this functionality, you'll have to code it.
I hurt so bad inside
I wish you could see the world through my eyes
It stays the same
I just wanna laugh again
|
|
|
|
|
Dear MFC and .Net Gurus,
for a new project we want to make use of whatever hot technology there is around, as long as it allows us to make a sexier user interface, program faster, and be future-proof.
We have several alternatives: using MFC, using .NET or using both (is that possible?).
According to what I read here on CP, MFC is used by most of the programmers, but is there still a future for MFC, now that MS promotes .NET ?
.NET surely seems a hot new technology, but does it force you to use Managed C++ or not? Does .NET force you to wrap everything in components, DLL's, COM objects, ...?
If we now start with MFC, is it difficult to move to .NET in, let's say, 2 years? Has anyone done that already?
Is there an advantage is using both MFC and .NET at the same time (using the best of both technologies)?
And, last question, does anyone has experience with writing software that runs on both Windows and Linux? Not that it is important at this moment, but there is a slim chance that this could the case in 1 or 2 years.
Thanks anyway,
your humble developer.
Enjoy life, this is not a rehearsal !!!
|
|
|
|
|
Patje wrote:
but does it force you to use Managed C++ or not?
Yes, if you use C++. If you want to use .NET, I'd consider C# first.
Patje wrote:
And, last question, does anyone has experience with writing software that runs on both Windows and Linux? Not that it is important at this moment, but there is a slim chance that this could the case in 1 or 2 years.
You need to look into wxWindows, and forget about .NET, if not MFC.
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
C# will attract all comers, where VB is for IT Journalists and managers - Michael P Butler 05-12-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|
|
Christian Graus wrote:
You need to look into wxWindows, and forget about .NET, if not MFC.
Did you have a look at mono, the last time I checked they were able to do both ASP.NET and ADO.NET, what do you think of doing cross platform in .net, particularly for desktop apps, I think you have worked on some cross platform stuff sometime back.
I somehow feel that the mono effort would be much more successful than any of the earlier efforts by other vendors.
there is even a vb.net thingy in mono
regards
Kannan
|
|
|
|
|
I know about the existence of Mono and .Gnu (dot-gnu), but as far as I understand it, Mono and .Gnu only deliver the common-run-time environment and a C# compiler.
The windowing .Net classes are proprietery Microsoft and don't exist yet for the other platforms. I also doubt whether it makes sense to port a desktop windowing application to Mono, if you don't have the plethora of classes that Microsoft provides.
Of course the story would be different if you're writing a server-application or web-server-thingy.
Enjoy life, this is not a rehearsal !!!
|
|
|
|
|
Patje wrote:
for a new project we want to make use of whatever hot technology there is around, as long as it allows us to make a sexier user interface, program faster, and be future-proof.
That is the wrong criteria for choosing a development tool!
It all depends on the kind of application you are writing, if it is web based then certainly look at .NET as C#/ASP.NET makes writing web-apps easier than using ASP.
If it is a desktop app, will it be using a complicated GUI. At the moment, I feel Windows forms in .NET lacks a lot of the nice features that MFC has. If you have time to write a lot of the code yourself then Windows Forms with C# is certainly viable. If you haven't got the skillsets for filling in the gaps in Windows Forms then I'd stick with MFC.
Michael
Fat bottomed girls
You make the rockin' world go round -- Queen
|
|
|
|
|
hi...
i guess it depends on the app ?
if it is a client/server app..then u cannot expect ur clients - atleast now - to have the .NET framework on their machines
if it is a web app, then i would suggest that you would go for .NET.
personal suggestion - I guess MFC has lost its relevance with the advances made by VB...5yrs back MFC gave u more flexibility..but now I guess both are even..and VB is FASTER to develop..
There are no failures; there are only extended learning opportunities.
|
|
|
|
|
I use it to display the picture file,when the user click a pic file from the list,then display it.But I found sometimes when I clicked several files ,the application will not response,the CPU usage is 100%.
When I debug it ,it caused an AsynFilt.dll Exception,but from the callstack I cannot found the reason.
It doesnot be the same,sometimes it works well.
So why can this BE?
Thank you
|
|
|
|
|
Hi,
I have written MFC Dilaog based application.In that i want
check if my window is gone out of the screen?
Regards
Neha
|
|
|
|
|
GetWindowPos
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
C# will attract all comers, where VB is for IT Journalists and managers - Michael P Butler 05-12-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|
|
Hi,
does someone knows how to get a nice hyper link cursor that also works for XP (I mean with that neat shadow effect, is system is Windows XP). I use currently this code, but it does not produce a shadow on XP. thanks for feedback.
void SetDefaultLinkCursor(HCURSOR &hLinkCursor)
{
if (hLinkCursor == NULL)
{
CString strWndDir;
GetWindowsDirectory(strWndDir.GetBuffer(MAX_PATH), MAX_PATH);
strWndDir.ReleaseBuffer();
strWndDir += _T("\\winhlp32.exe");
HMODULE hModule = LoadLibrary(strWndDir);
if (hModule) {
HCURSOR hHandCursor = ::LoadCursor(hModule, MAKEINTRESOURCE(106));
if (hHandCursor)
hLinkCursor = CopyCursor(hHandCursor);
}
FreeLibrary(hModule);
}
}
|
|
|
|
|
|
ah thx! the symbol wasn't defined on ME, but works now...
|
|
|
|
|
Some tables in oracle(8.0.6) are not allowed add whereas others using ado control can add records when i do
RecordeSet->AddNew();(using Ado),There's a error message box.I don't know the cause.Help me please.
|
|
|
|
|
What is the error?
I personally find it better on Oracle to use stored procedures for inserting records.
Michael
Fat bottomed girls
You make the rockin' world go round -- Queen
|
|
|
|
|
I have created an MDI application. In this application, I have a class CMyDoc,which is inherited from CDocument.
Now I want to write some code to open a document of this kind, while not showing the frame and view which are associated with the document.
I write these codes:
{
...
CMyDoc * pDoc=(CMyDoc*)theApp.OpenDocumentFile(m_strNewFileName);
...
}
As you can guess,the frame and view are showed.Please tell me how to open a document without showing the frame and view .
I love sea
|
|
|
|
|
If you didn't open the view, how would the document be shown ? The point of a view is that it's how a document is rendered.
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
C# will attract all comers, where VB is for IT Journalists and managers - Michael P Butler 05-12-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|
|
To Christian,
First thank you very much for your reply!
Yeah,I agree about what you have said. But what i want to do now, is to read
~~~~~
the content of a document.And I donot want that the view and frame are to be
~~~~~~~~~~~~~~~~~~~~~~~~~
showed.
Let us take an example: Suppose that you are going to load the content of a *.txt file. Must you run an notepad.exe? No. You can make it by writing such codes:
CStdioFile f(...);
Do you catch what i mean?
I love sea
|
|
|
|
|
Ah - what is the document ? If it's a custom thing, abstract the loading code into a class, then you can call it from where-ever you like.
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
C# will attract all comers, where VB is for IT Journalists and managers - Michael P Butler 05-12-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|
|
Hi,
I am developing an application to send message to colleagues in our LAN. I hope they receive msgs with their Messenger Service in Win2K.
Now I used ShellExecute("net send...") to send message. And it works. But I don't know how to determine if my application succeeds in sending message.
My second question is, what tcp or udp port does Messenger Service use? Or it uses mailslot?
May I use some APIs to send message to this service directly? I am studying API NetMessageBufferSend(). But I am not sure it is fit for me and how to use it.
Any advice? Thank you.
Dave
|
|
|
|
|