|
I am hosting the WebBrowser control in an application I wrote for a Windows CE .Net device. The control works properly and I am capturing events from the DWebBrowserEvents2 interface. So far, so good. I receive the DocumentComplete and NavigateComplete2 events whenever a navigation is performed. However if an error occurs (for example: Page not found, Incorrect Syntax, etc) the NavigateError event never seems to fire. Has anyone else had this issue when implementing the webbrowser control on CE?
Any help would REALLY be appreciated, as this is somewhat of a show stopper for now. If I need to elaborate or give some example code please let me know.
Thanks,
Dab
|
|
|
|
|
hey guys
i'm a novice c++ programmer and i'm currently making a program
everything works fine, but there's one slight problem...
i need to have the program output a text on-screen and i don't know how.
Let me explain, the program i want to make basically displays a text on the screen of your computer.
not the DOS prompt where it executes the program, but the screen itself.
Think of an alert-messenger that does so not by using those windows, but by just displaying the text
it needs to display.
How can I do that?
If it's no trouble, i'm also wondering if the gotoxy(x,y) (using the conio.h file) works with whatever solution to my problem you have. And how can i make that text disappear after a pre-set amount of time?
thanks for your help
regards,
peter
#include borland c++ compiler 5.5
using Windows XP;
int main()
{
cout << "Hi! I'm Peter!\n";
return 0;
}
|
|
|
|
|
When you say "on-screen", you are referring to the DeskTop? If so, you will need to create an invisible window with your visible text overlapping the DeskTop. Windows is a graphic based operating system that also allows text-based consoles to appear in graphic-based windows.
|
|
|
|
|
Why do multi threaded programs behave differently in debug mode and release mode?
|
|
|
|
|
I have this code that reads a registry setting that contains a string "BLUE BROWN 3ZET"
************************************************************************
// TODO: Place code here.
CRegistry reg;
char cbBuffer[50];
reg.Open(HKEY_LOCAL_MACHINE,"SYSTEM\\MyRegistry\\settings");
reg.ReadString("Settings",cbBuffer, 50);
MessageBox(NULL,cbBuffer,"system status",MB_OK | MB_ICONWARNING);
**************************************************************************
The code displays the entire string in a message box.
how can I search if the string "3ZET" exist so I can display a messagebox accordingly.
MessageBox(NULL,"3ZET does not exist","system status",MB_OK | MB_ICONWARNING);
or
MessageBox(NULL,"3ZET exist","system status",MB_OK | MB_ICONWARNING);
any help will be greatly appreciated
|
|
|
|
|
Try using the CString class and use its 'Find' method to search for the string.
For details go through MSDN
|
|
|
|
|
I want to keep this app as a non-MFC.
|
|
|
|
|
Try this function:
int Find(char *Src, char *txtSearch)
{
int chkPos = 0;
int chkLen = strLen(txtSearch);
if (chkLen == 0) return -1;
for(int i=0;i
|
|
|
|
|
Thanks for the help, here is the code which still has problems to compiled:
*****************************************************
#include "stdafx.h"
#include "registry.h"
#include <fstream>
#include <iostream>
#include <string>
#include <windows.h>
#include <string.h>
#include <stdio.h>
int APIENTRY WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
{
// TODO: Place code here.
std::fstream fin, fout;
CRegistry reg;
char cbBuffer[50];
reg.Open(HKEY_LOCAL_MACHINE,"SYSTEM\\MyRegistry\\settings");
reg.ReadString("Settings",cbBuffer, 50);
//call the Find function
char * txtSearch="3GB";
Find(cbBuffer,txtSearch);
//MessageBox(NULL,result,"system status",MB_OK | MB_ICONWARNING);
return 0;
}
int Find(char *Src, char *txtSearch)
{
int chkPos = 0;
int chkLen = strLen(txtSearch);
if (chkLen == 0) return -1;
for(int i=0;i
{
if(Src[i] == txtSearch[chkPos])
chkPos++;
else
{
i-=chkPos;
chkPos=0;
}
if(chkPos==chkLen)
return (i-chkLen+1);
}
return -1;
}
*****************************************************
COMPILE ERROR
seSysRep.cpp
d:\cpp\test.cpp(49) : error C2065: 'strLen' : undeclared identifier
d:\cpp\test.cpp(51) : error C2143: syntax error : missing ')' before '{'
d:\cpp\test.cpp(51) : error C2143: syntax error : missing ';' before ')'
registry.cp
|
|
|
|
|
Some of your code got truncated because of the use of greater than and less than characters. I think you can fix that if you use the pre or code tags (can't remember which).
Anyhow, if you are trying to use strlen, you need to lowercase the L. Yours is strLen. Next, I would really suggest that you use the Standard Template Library instead of trying to manipulate strings yourself. There's rarely a case when you need to do that yourself these days. The string class provided in the STL has a find method in it which looks like it'll do exactly what you need. It's pretty simple to use. Here is a link that will show you how to use it:
http://www.msoe.edu/eecs/ce/courseinfo/stl/string.htm[^]
-Matt
------------------------------------------
The 3 great virtues of a programmer:
Laziness, Impatience, and Hubris.
--Larry Wall
|
|
|
|
|
Can sombody tel me something from boost threading (examples,links...):doh:
|
|
|
|
|
|
hi there,
wanted a little help regarding using VB classes in C++ code.
i wrote a class definition in VB which needs to be extended in C++.
for which i wrote the class definition in VB as an ActiveX dll , which in turn resulted in a COM dll. i used the type definition of the dll to get the idl file, which i used with the MIDL tool to get the header and cpp file to be used in C++. i included the files in my c++project. and defined the interface pointer to the generated class definition using the CoCreateInstance method and used the pointer to call the methods defined in generated header file.
but sometimes the code works sometimes it doesnt. the code sometimes crashes and the error comes up as VB error code '91' .........
why does this happen ?? i think it is the versioning problem of the VB COM module. how do i avoid it ?? and ensure that my code always works???
what i really want is to somehow create a method which accepts class objects and also returns the same.
i had one more query abt how to write explicit constructors in VB?
i wanted to have 2 constructors in the VB class one which takes in parameters to initialize the private member variables, and the other which doesnt but somehow VB isnt able to distinguish between the methods and returns error. so i had to rename the methods differently.
is there any better method to acheive my requirement??
could anyone of you help me out ?????
thanx in advance!!!!!!
i am a software developer .
|
|
|
|
|
I am assuming you are talking about VB6 and native C++. If so, you are posting in the wrong area.
I believe error code 91 results from a VB object variable not actually "set" to an active object. If you update a COM object, you must unregister the old one and register the new version. Also, your C++ code must reference the new version also! However, I think you can keep the old version's GUID with your new version if you set it before compiling. I haven't programmed with VB since 1999 and my memory of it is failing.
-- modified at 19:07 Thursday 9th February, 2006
|
|
|
|
|
HI every1,
Im new To MC++ and Im using Visual Studio 2005 express. I was wondering if anyone can please tell me how begin a drawing methods on a image (eg Jpeg). there is alot of code out there in C++/C# etc but Im finding it hard to relate it to MC++. I would like some advise on how to DrawLine, DrawRect,DrawCircle etc on a image based on the mouse Event Handler (therefore no predefined set coordinates). The user can draw what ever they select. I know how to write the methods with set coordinates!
Can someone please supply a comment/advise/code ???
Thanks
Jonno
makaveli
|
|
|
|
|
Most likely, you want to use GDI+ for your graphics but you are not sure about how to translate example code in C# or VB. If you need help with C++/CLI programming, there is only one book currently available: Pro Visual C++/CLI and the .NET 2.0 Platform by Stephen R. G. Fraser, ISBN: 1-59059-640-4. This author also published a book for MC++ too: Managed C++ and .NET Development, ISBN (pbk): 1-59059-033-3. He has a chapter on how to create graphics using GDI+. Unfortunately, information on C++/CLI or MC++ is scattered and sparse as compared to C# and VB.
-- modified at 14:40 Thursday 9th February, 2006
|
|
|
|
|
Hi George,
Yeh thanks for ur advise. Ill need to get the book then , hopefully my unversity library has it. Im sure I can find some electronic copy out there on thee net for it.
I do need to use GDI+, its just MC++ thats gettin me the problems.
thanks for your comments
regards
Jonno
makaveli
|
|
|
|
|
I think you can get the e-book from Apress for about half the price of the paperback. You can also download the C++/CLI Language specification which is very helpful.
|
|
|
|
|
Yeh you can D/L the soucre code from the examples in the book. The Appress.com site like u mentioned. Ill gotta keep searchin throught the site, it seems pretty helpful.
cheers
makaveli
|
|
|
|
|
I just started moving to C++ a couple weeks ago, and have run into an issue I've not been able to Google an answer to.
From within VS, it seems I have to use .NET extensions to create a windows service, but some of the functionality I want to implement requires MFC (or, at least, the only way I've found to do it requires MFC).
Will the VS compiler allow me to use both .NET extensions and MFC ? And if so, are there steps I have to be able to use both ?
Thanks in advance for your help,
Mike the Red (a.k.a. The nooB) :->
|
|
|
|
|
You can mix MFC with Managed C++ or the new C++/CLI. However, since MFC is native code, you have to marshall any data exchanges with managed code. CString, for example, is very easy to use with managed code.
|
|
|
|
|
Hi all,
I need to check if an object created for a class is NULL or not....
How can this be done?
The code segment i had used is shown below:
public ref class Class1
{
private: static Class1 ^instance;
private: Class1();
public: static Class1^ Instance()
{
if(instance == NULL)
{
instance = gcnew Class1();
}
return instance;
}
};
This returns the following error:
error C2065: 'NULL' : undeclared identifier
Anyboby please help me out in this
Thanks in advance
Thanks and Regards
Madhu
-- modified at 4:49 Wednesday 8th February, 2006
|
|
|
|
|
Errrr
You mean this:
if (MyObject == NULL)<br />
{<br />
}
|
|
|
|
|
|
Use nullptr in lieu of NULL for managed objects.
|
|
|
|