|
Can you be a bit more specific ?
bogdan_rechi wrote:
The application fails to create the dialog
Is it in the main dialog or what ?
Regardz
Colin J Davies
Sonork ID 100.9197:Colin
I think it's interesting that we often quote each other in our sigs and attribute the quotes to "The Lounge". --- Daniel Fergusson
|
|
|
|
|
Is not about an error.
The execution of dlg.DoModal(), where dlg is the main dialog, simply has no effect.
rechi
|
|
|
|
|
When you created your app using appWizard (i'll assume) did you specify ActiveX controls...?
Did you add the control as an activeX control...?
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
No, i didn't specify "ActiveX controls".
Meanwhile the application has grown and i have to add the control without the wizard's support.
rechi
|
|
|
|
|
Thats probably whats causing your problems than.
It's not too much work to add activeX support though.
Create a small test app WITH activeX support and just find the functions.
AfxOleInit or something I think similar to this...probably a few more things too.
Cheers!
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
I have tried this.
The only difference i found is "#include afxdisp.h" in stdafx.h, which has no effect in my current application. It has to be something else.
rechi
|
|
|
|
|
It's always a pain to add options like ActiveX after the project has been created.
I would suggest using app wizard..much quicker and easier.
Create a new project using AcitveX controls and just copy your old code over into the new project.
Cheers!
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
Unfortunately, this seems to be the only option for the moment.
Thanks!
rechi
|
|
|
|
|
If nothing else is working...you might as well and see if it helps...
This can be a pain in the a$$ I know...especially if your like me and you modify and remove all that MFC junk comment shite. However consider yourself lucky your not in dos and take full advantage of the windows clipboard.
Lemme know how it turns out...i'm curious to know if thats whats wrong.
Cheers!
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
When i created the test application i missed the line
AfxEnableControlContainer();
in the application's InitInstance() method.
Adding this will make the stuff just "running like hell".
rechi
|
|
|
|
|
There is a addin (at least under VC++ 6 there is)
Project - Add To Project - Components and Controls
In the Visual C++ Components folder find ActiveX Control Containment Component
This should make your WebBrowser work.
- Matt Newman / Anti-Linux Activist
-Sonork ID: 100.11179:BestSnowman
†
|
|
|
|
|
To fix this problem I dynamically create (using the new operator) the web browser control member variable in my OnInitDialog()
This fixes the problem for me.
"Hey man, Taliban, Tali me Banana."
|
|
|
|
|
_bstr_t str;
str= "SELECT * FROM Tennis ORDER BY Name";
if( pDoc->m_pConnection==NULL )
return ;
_variant_t vRecsAffected(0L);
try
{
pRecordSet = pDoc->m_pConnection->Execute( str, &vRecsAffected, adOptionUnspecified);
.
.
.
I recevie run time error for Execute() line,in output window:
Exception thrown for classes generated by #import
Code meaning = Unknown error 0x800A0BB9
Source = ADODB.Connection
Description = Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.
Mazy
"So,so you think you can tell,
Heaven from Hell,
Blue skies from pain,...
How I wish,how I wish you were here." Wish You Were Here-Pink Floyd-1975
|
|
|
|
|
you initialize str - that's ok
but what is "sqlstring"?
regards, b.
|
|
|
|
|
sqlstring is sql;) Thats something I missed when I copy/paste my codes here.Now I have to correct it.So my Problem is not solve.
Mazy
"So,so you think you can tell,
Heaven from Hell,
Blue skies from pain,...
How I wish,how I wish you were here." Wish You Were Here-Pink Floyd-1975
|
|
|
|
|
Also:
When I debug that line for str I see that it is "Bad Ptr" and "CXX0030: Error: expression cannot be evaluated".
So there is a problem with that?Does anybody know whats that?
Mazy
"So,so you think you can tell,
Heaven from Hell,
Blue skies from pain,...
How I wish,how I wish you were here." Wish You Were Here-Pink Floyd-1975
|
|
|
|
|
try _bstr_t str = L"sfjdsfhsdfh";
|
|
|
|
|
no,that does not help
Thanks for reply
Mazy
"So,so you think you can tell,
Heaven from Hell,
Blue skies from pain,...
How I wish,how I wish you were here." Wish You Were Here-Pink Floyd-1975
|
|
|
|
|
In my experience, when you get a bad args error, it's more than likely that it's your SQL that's at fault. How about:
SELECT * FROM [Tennis] ORDER BY [Tennis.Name]
Just a guess...
------------------------
Derek Waters
derek@lj-oz.com
|
|
|
|
|
Thank you Derek,I found the problem before,It was because of openning my database,my database was openned so it caused runtime error.
Thank you again.
Mazy
"So,so you think you can tell,
Heaven from Hell,
Blue skies from pain,...
How I wish,how I wish you were here." Wish You Were Here-Pink Floyd-1975
|
|
|
|
|
i declare a function pointer like this:
void (*PTestFunc)(CString& str);
and two classes:
class CTest
{
...
void Test()
{
m_pTestFunc(CString("fdsaf"));
}
void SetFuncPointer(void* pointer)
{
m_pTestFunc = pointer;
}
PTestFunc m_pTestFunc;
...
}
class CMyClass
{
...
CString m_strCaption;
void MyTest(CString& str);
void Init(CTest& test);
...
}
CMyClass::MyTest(CString& str)
{
m_strCaption = str;
}
void CMyClass::Init(CTest& test)
{
test.SetFuncPointer((void*)MyTest); //error c2440
}
//////////////////////////////
if i add "static" before MyTest, it is right;
but u see i need this pointer in my class, i can't set MyTest static. so how to solve this problem? does c++ define the class member function pointer?
c++ : my dream
|
|
|
|
|
|
Not sure if this will solve your problem
http://www.codetools.com/script/comments/forums.asp?forumid=1647&app=50&fr=251#xx142181xx
Todd Smith
CPUA 0x007 ... shaken not stirred
|
|
|
|
|
"Browse for Folders from the Current Directory" topic ( http://support.microsoft.com/default.aspx?scid=kb;EN-US;q179378 ) describes how to Browse for Folders from the Current Directory using SHBrowseForFolder function. But it was not works correctly when using "network path" like "\\SomeComputer\SomeFolder\Folder".
gCan you help me?
|
|
|
|
|
I've not used it for network browsing, but I know it has a flag for browsing networks ? Have you tried that ? What is going wrong ?
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
"I'm somewhat suspicious of STL though. My (test,experimental) program worked first time. Whats that all about??!?!
- Jon Hulatt, 22/3/2002
|
|
|
|