|
I developed an ActiveX control in VC++. The control is very simple. It just fires two events simultaneously. I used in VC++ client. Whenever event is received, a message box is displayed. So my client application displays two message boxes immediately.
Now i want to use this control in Visual Basic. But i can only see one dialog box there despite two events are fired from control. I think when first message box is displayed the code is blocked and second message is discarded. Anyone having any idea about this problem, strange this problem is not in VC++ client ??
|
|
|
|
|
VB is single-threaded. Whereas your VC++ client is probably set to the default, multi-threaded setting. If you change your VC++ project setting to single-threaded, you probably will experience the same behavior as the VB client.
VB message boxes are modal and will starve out the single-threaded application message pump until they are closed.
Roger Stewart
"I Owe, I Owe, it's off to work I go..."
|
|
|
|
|
Hai Friends,
Can anyone help me to go to a particular topic in a help file when F1 is pressed.
|
|
|
|
|
|
I am currently writing a program which is ported from C++ for DOS. I have a routine which handles the output messages to the screen in DOS, but now I am trying to output it to a ListBox in a Dialog box. Here a fragment of the code i have written..
#include "stdafx.h"
void utility::message()
{
SendMessage(0,WM_MYCALL,0,0);
}
WM_MYCALL is a handler I defined in a dialog class.
Apparently, when I tried this command, nothing really happen. My program is a SDI program. Somehow, WM_MYCALL is not process at all by the dialog class? Why does this happen? Is there something I missed out?
|
|
|
|
|
You must tell it where to send the message. Somehow I dubt you have a dialog box with a HWND of zero.
|
|
|
|
|
Yup, that's right. But I am not sure how to get the handle for my dialog box. Do you have any suggestion? So right now I am sending to the main window.
|
|
|
|
|
mydlg.GetSafeHwnd()
Pavel
Sonork 100.15206
|
|
|
|
|
If you have a dialog, surely you must know its HWND?
For every message your dialogs message-pump handles, you get a HWND as part of the MSG (so if you handle WM_INITDIALOG, the WPARAM is the HWND of the dialog).
|
|
|
|
|
Thanks for the information. I have tried to use GetSafeHwnd() instead, and pass it to the a global variable type of HWND. It works for now.
|
|
|
|
|
Hi everybody!
Does anyone know how to easily attach my own build routine to MSVS?
Consider I have a makefile for external compiler/linker (Watcom C++ 11.0).
Where should I place command "wmake.exe" (or a batch file that starts external compiler) to make all the stuff work?
Thanks.
|
|
|
|
|
Open that make file in MS VC IDE. Then complie it. It will automatically create the work space from the make file.
|
|
|
|
|
When i should go for static_cast and when should i use reinterpret_cast
|
|
|
|
|
try this:
http://msdn.microsoft.com/library/en-us/dndeepc/html/deep05182000.asp
|
|
|
|
|
|
Hi all,
How can one programatically, preferably WinAPI function, delete files regardless if Windows want you to or not?
For example, in "Temporary Internet Files" , Windows won't allow me to delete the index.dat file even after I close IE and all other programs. The error I get is the file is either protected or in use.
This is the function I used to try to delete it:
DeleteFile((LPCTSTR)m_szFile);
Thanks in advance.
Soliant | email
"During last 10 years, with invention of VB and similar programming environments, every ill-educated moron became able to develop software.
" - Alex E.
|
|
|
|
|
|
|
Thanks guys!
I thought that I might have to tap into assembly, it seems that is the case. I don't think I can go any lower than that, or else I would be tweaking the hardware for the CPU - ouch
Soliant | email
"During last 10 years, with invention of VB and similar programming environments, every ill-educated moron became able to develop software.
" - Alex E.
|
|
|
|
|
Does anybody know where I can find documentation
about Active Script Debugging API ?
|
|
|
|
|
This is weird. It doesnt crash when run. But with breakpoints, it crashes at the itoa: (unhandled exception
int headingWidth;
char * chheadingWidth ;
headingWidth = gvecSortFields[0].GetLength() * 3;
itoa(headingWidth, chheadingWidth,10);
|
|
|
|
|
|
As Nish said, you have allocated no memory for this operation. This is a VERY ugly way to go about it, you should use sprintf ( although it is *almost* as ugly), or even better, ostringstream.
Christian
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
During last 10 years, with invention of VB and similar programming environments, every ill-educated moron became able to develop software. - Alex E. - 12-Sept-2002
|
|
|
|
|
Thanks. I ended up doing CStrings Format with %d which is so much easier. Appreciate the help,
ns
|
|
|
|
|
some web sites use the following:
self.resizeTo(screen.availWidth,screen.availHeight)
in their Javascript.
I have a webbrowser in a tab control and when the control hit this code the entire screen is consumed by the web page (the webbrowser explodes to the full screen size instead of the one that it was setwindowpos'd to).
How can I contain the web page within the tab control even so the scroll bars are aligned perfectly when that code hits?
Same problem with CHTMLView.
Try this: create a quick dialog with the web browser in it. then create a quick web page in notepad and insert this code:
then point the browser to it and you'll see what i mean
any help would be appreciated thanks..
|
|
|
|