|
At the bottom of the page i posted click on the links to createElement and appendChild
led mike
|
|
|
|
|
In MDI Application i want only maximise and close button on my child windows and not minimise button.
I tried diff styles of the window in "PreCreateWindow" function, but i could disable the minimise button but couldnt hide it.
Is it because Window property has this limitation?
Can you please help?
Thanks
Regards,
Jigna
|
|
|
|
|
To my knowledge, it cannot be removed without also removing the entire caption.
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
I am using com dll with some clsid . I do know the source code . is there any way to change the
clsid of this com dll .
Rajesh
|
|
|
|
|
You shouldn't.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
vote 5 for gray man.
|
|
|
|
|
I really cannot understand voting down, this time.
CLSID of an existing COM interface should NEVER change. Like the interface itself.
Anyway, thank you friend.
(BTW Why gray man?)
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
I think 1 was of a gold member because your rate is 3 if it was of a bronze member now it was 3.67(of course its my mind ) and thats right never changed and why gray 1=gray man and 5=red man ).
|
|
|
|
|
My vote too, but the score didn't go way too much up as expected. Sad buggers vote down for no reason.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Visual C++ MVP
|
|
|
|
|
Of course, but you haven't supplied anywhere near the amount of information for us to help. For example, what framework did you use (if any) to make the DLL?
Steve
|
|
|
|
|
this is simple sdk(not MFC) com dll.
Rajesh
|
|
|
|
|
How do I convert from std::string to char* in C++?
|
|
|
|
|
std::string s = "Hello World";
char* psz = s.c_str();
|
|
|
|
|
I followed the same method. But the following code:
std::string path = dtCore::GetDeltaRootPath();
const char* exeroot = path.c_str();
strcat(path,"/");
strcat(path,"CharacterAnimation.exe");
result = system(path);
return true;
gives me the following errors:
error C2664: 'strcat' : cannot convert parameter 1 from 'std::string' to 'char *'
No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
.\GUI.cpp(195) : error C2664: 'strcat' : cannot convert parameter 1 from 'std::string' to 'char *'
No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
.\GUI.cpp(196) : error C2664: 'system' : cannot convert parameter 1 from 'std::string' to 'const char *'
No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
How do I resolve?
|
|
|
|
|
why are you using path instead of exeroot you just allocated ?
it's obvious you don't read error messages, or you don't understand what you're doing...
check your code again.
std::string path = dtCore::GetDeltaRootPath();
const char* exeroot = path.c_str();
strcat(exeroot, "/");
strcat(exeroot, "CharacterAnimation.exe");
result = <font color="red">system</font>(exeroot);
return <font color="red">true</font>;
BTW, you seem not to have takenn in account my previous remarks...
|
|
|
|
|
Now this line shows:
char* exeroot = path.c_str();
the following error.
error C2440: 'initializing' : cannot convert from 'const char *' to 'char *'
|
|
|
|
|
T.RATHA KRISHNAN wrote: char* exeroot = path.c_str();
add const then, as std::string::c_str() returns const char*
|
|
|
|
|
I think you'll get buffer overruns that way.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
That's assuming you cast away the const s so it even compiles.
Steve
|
|
|
|
|
Good point indeed.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
toxcct wrote: const char* exeroot = path.c_str();
strcat(exeroot, "/");
strcat(exeroot, "CharacterAnimation.exe");
Bad advice. The buffer returned from c_str is const and thus can't be modified. And it's wrong to cast away the const as it's const for a reason: the buffer used by a std::string need not be contiguous memory. If this is the case calling c_str makes a temporary buffer and copies the non-contiguous memory blocks into one contiguous memory block for you. It is not required to copy the blocks back. Also your code is in serious danger of causing a buffer overrun (if you made it compile by casting away the const ): how do you know how big the buffer is?
Anyway the correct way is simpler, safe, works, is portable and requires no casts:
std::string path = dtCore::GetDeltaRootPath();
path += "/CharacterAnimation.exe";
system(path.c_str());
Steve
|
|
|
|
|
You are sending strcat() the wrong param type i think.
std::string path = dtCore::GetDeltaRootPath();
const char* exeroot = path.c_str();
char* StrToCat = path.c_str();
strcat(StrToCat,"/");
strcat(StrToCat,","CharacterAnimation.exe");
etc..
|
|
|
|
|
Buffer overrun along the horizon.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
absolutely, but i only meant to identify the problem a lil more clearly
|
|
|
|
|