|
Thanks for the tip.
What about modeless dialogs ?
Jonathan de Halleux, Belgium.
|
|
|
|
|
Hi
This is a serious bug, could not find whether it has been discussed before.
Try this:
#include <stdio.h>
void main(void)
{
printf("\t\t\b\b\b");
}
Be warned it will restart your windows 2000 or XP machine.
Does anyone know why?
it's sure quicker than any other windows reset procedure that i've seen
cheers
Optic
|
|
|
|
|
There has been a couple of threads about it in here...
It's a known bug, and AFAIK there's also a hot-fix for it...
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
Does Service Pack 2 fix this problem?
I hope so
|
|
|
|
|
SP2 does not fix the program.
But if you crash you system running the program, who's fault is that.
The bug is stupid, but really can't do much to you.
Tim Smith
Descartes Systems Sciences, Inc.
|
|
|
|
|
But if you crash you system running the program, who's fault is that.
The fault is clearly Microsofts. No user-mode program (not excercising Administrator rights) should obviously be allowed to take down the whole system, especially not in this uncontrolled way.
|
|
|
|
|
Hi, This is very confusing to me. I am getting a run time error while running my debug version of the program, please take a look at the message and see if you understand it and explain it to me in plainer english. Thank you.
<br />
Debug Error!<br />
File: i386\chkesp.c<br />
Line: 42<br />
<br />
The value of ESP was not properly saved across a function call. This is usually result of calling a function declared with one calling convention with a function pointer declared with a different calling convention.<br />
|
|
|
|
|
|
Anyone know how to create an in-memory HTML document and then launch it into a browser? I'm currently doing it by filling a CString and then writing it to disk in temp/report.html, then launching report.html by using ShellExecute... I'd like to avoid the whole "writing to a temp file" part, and somehow feed the CString that contains HTML data directly in the registered application for HTML files.
Is this possible within a VC++ program?
Thanks in advance...
-jfaulken
When sushi is outlawed only outlaws will have sushi.
|
|
|
|
|
Hello,
Here's some code which does this...
void CMyHtmlView::SomeConvenientFunction()
{
LPDISPATCH iDispatch = GetHtmlDocument();
if(iDispatch) {
IHTMLDocument2* iDoc2;
iDispatch->QueryInterface(IID_IHTMLDocument2, (void**)&iDoc2);
if(iDoc2) {
HRESULT hr;
IHTMLElement* pBodyElement;
hr = iDoc2->get_body(&pBodyElement);
if(hr == S_OK) {
CString strHtml;
strHtml = "YOUR HTML GOES HERE!";
BSTR html = strHtml.AllocSysString();
CString strBeforeEnd = "BeforeEnd";
BSTR beforeEnd = strBeforeEnd.AllocSysString();
pBodyElement->insertAdjacentHTML(beforeEnd, html);
}
iDoc2->Release();
}
iDispatch->Release();
}
}
best,
Stephen Wilson
|
|
|
|
|
By the way, my post assumes that you have a CHTMLView. I doubt that it's possible to pass a CString to IE, probably you do need to create a file if you want an external application to show it. But if you want to show HTML from memory within your program, then this is the way to do it.
|
|
|
|
|
Hi experts
I wrote an application that "sits" in systray and popups a menu using "TrackPopupMenu".
The problem is that when select a different window while the menu is open it still remains at top and I must close it by selecting one option from the menu.
Is this a bug or did I forget to do something?
bye
|
|
|
|
|
|
http://www.codeproject.com/shell/systemtray.asp
it gives a solution to this problem.
Nish
Sonork ID 100.9786 voidmain
www.busterboy.org
Nish is a BIG fan of Goran Ivanisevic
|
|
|
|
|
MSFlexGrid seems to be crashing my program when I run it. This seems to happen on machines that I do not have Microsoft VC++ installed nor Visual Basic. Is this something that can be easily fixed by grabbing a dll or is this a little more involved such as registering the control with the host machine? Can Install Shield register the control if this is necessary?
Thanks!
"Why are we hiding from the police, Daddy?"
"We use VI, son. They use Emacs."
|
|
|
|
|
Hey...how would I get rid of the blue bar at the top that has a caption? I have this to create the window...
WndSplash = CreateWindow (SplashClass, NULL, NULL,150, 150, 500, 250, NULL, NULL, hInstance, NULL);
Obviously, I didn't add any parameters that put a caption or any maximize or minimize buttons at the top, but when loaded, I still get a blue bar at the top of the window. How would I get rid of this? Thanks - Dave
|
|
|
|
|
|
Use this:
CreateWindow(SplashClass, NULL, WS_DLGFRAME,...
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Hi,
I'm looking for a way to retrieve the handle or ID of a process main thread.
Can anybody here tell me how to do this?
Regards,
Sebastian
|
|
|
|
|
You mean GetCurrentThread() or GetCurrentThreadId(), or do you mean from a different process?
Joel Lucsy (jjlucsy@concentric.net)
|
|
|
|
|
I mean the ID of the main thread in a different process.
Sebastian
|
|
|
|
|
If you can identify the main window of the process (bit of a trick in itself) you can call GetWindowThreadProcessId .
|
|
|
|
|
Hi,
the problem is that I want to identify the main window of the process by comparing its owning-thread ID with the ID of the process main thread...
If you can tell me how to identify the main window, I won't need the main thread ID anymore...
Sebastian
|
|
|
|
|
There is no such thing as a 'main window' of a process. So what ever you are trying to do might be flawed by design.
A process can create 0 to N windows.
Tim Smith
Descartes Systems Sciences, Inc.
|
|
|
|
|
Well, I think of the top level window with the caption etc (i.e. CWinThread::m_pMainWnd in the MFC world) as being the 'main' window - the one to close to terminate the app - but I guess you could argue the point.
I've used ::GetTopWindow and ::GetNextWindow to get the top level windows on the desktop, and if you knew, say, the caption of the window you were looking for, you would be able to identify it with ::SendMessage(hwnd,WM_GETTEXT...(yes, keep in mind that there can be more than one 'top level' window in a process).
Given that nasty bit of strongly coupled heuristic hoop jumping through, you might want to add GetWindowThreadProcessId and GetWindowModuleFileName to the mix.
later...
Now that I think of it, for some apps you can eliminate some of the windows that don't return anything for WM_GETTEXT. But Tim has a point - identifying the 'main' window is tricky - you need to have a clue as to the caption or perhaps window class in order to pull this off, I think.
This is a question that's been seen here before, and I don't think a general solution has been proposed. Maybe if you posted more info about your current problem someone might have a specific fix you could use in your situation.
|
|
|
|