|
Mr.Prakash wrote:
humm, ab chane ke jhad pe mat chada
jhad chana chane ka jhad chakkar ke hai
C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg
|
|
|
|
|
include atlconv.h for uses_conversion stuff
also you can refer this link for futher understanding
USES_CONVERSION[^]
its not a complete doc but its good to understand and about the link in MSDN
try searching it, i guess its in of the knowledge base article.
Still Alive!!!
Thank you God.
|
|
|
|
|
During write IIS Filter, I want to find and send message to other windows, but I find the ::FindWindow and ::PostMessage seems does work inside IIS Filter codes. I think maybe they work in different desktop. Would you please tell me how can I make them communicate? Thanks a lot!
|
|
|
|
|
Have you tried checking the option to allow the WWW service to interact with the desktop? This would be in the controlpanel/services applet.
onwards and upwards...
|
|
|
|
|
I have an unmanaged MFC project that I am referencing from a managed MFC project. The unmanaged project builds successfully, but the build of the managed project fails during the link because it cannot find the external symbols from the unmanaged class. In what directory should the dll file be placed for the unmanaged project? The intellisense operates correctly referencing the unmanaged class within the source for the managed class. However, the linker is not finding the external symbols for the compiled class. Any suggestions?
|
|
|
|
|
|
Hi !
(calling an ActiveX thing from Delphi 7)
Any clues as to why I am getting the following error msg ?
error msg; Undeclared identifier: 'Layer2'
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<Script
procedure TMinMap.MGMap3onMapLoaded(ASender: TObject;
const Map: IDispatch);
var
Layer2: String;
begin
Layer2 := 'Streets-All-With Names';
TMinMap.Layer2.setVisibility(true);
end;
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
Thanks, Cliff
|
|
|
|
|
woah! what language is that? Greek?
Still Alive!!!
Thank you God.
|
|
|
|
|
Greek would possibly be easier !
It's a messy post, but between the<<<<<<<<<<<<'s
is a piece of Delhpi 7 script that is trying my patience. There isn't a Delphi forum here so. . .
|
|
|
|
|
|
Thanks Mike,
Didn't fix it though.
Cliff
|
|
|
|
|
CliffClimber wrote:
Layer2 := 'Streets-All-With Names';
TMinMap.Layer2.setVisibility(true);
No knowing delphi I have a problem with these two lines. In one you use Layer2 without a TMinMap. Are they two different variables named Layer2? One as an object variable and one as a local procedure variable?
John
|
|
|
|
|
John,
procedure TMinMap.MGMap3onMapLoaded(ASender: TObject; const Map: IDispatch);
var
// the following line declares the variable as
//a String
Layer2: String;
begin
// the following line assigns a value to the
//String
Layer2 := 'Streets-All-With Names';
// and this one is supposed to instruct the
// program to set the layer named
//'Streets-All-With Names' visible
TMinMap.Layer2.setVisibility(true);
end;
|
|
|
|
|
Did you try?
procedure TMinMap.MGMap3onMapLoaded(ASender: TObject; const Map: IDispatch)
var
Layer2: String;
begin
Layer2 := 'Streets-All-With Names';
Layer2.setVisibility(true);
end;
John
|
|
|
|
|
John,
It returns a different error
"Record, object or class type required"
I will change the name of the variable Layer2 and see if that works.
Thanks, Cliff
|
|
|
|
|
Nope, didn't work either.
|
|
|
|
|
Ok, I will apply some VC++ knowledge to it, lets see.
I assume TMinMap is a class as in c++;
so when you say TMinMap.Layer2.setVisibility(true); it is refering to the member variable of the class, but it is not coz i guess its a local variable of the procudure so you will get variable not declared error.
In one of the post you said Layer2.setVisibility(true) gives a different error as its not an object or so, that means setVisibility(true) is not a member function(procudure) of String.
So i guess these lines of code is quite wrong.
Still Alive!!!
Thank you God.
|
|
|
|
|
yes, I'm finished for today anyway.
Thanks for all the feedback !!
Cliff
Modification;
solved the problem
|
|
|
|
|
Hiya, I want an easy way of outputting persistant files in MFC but not serializing them. I've tried fostream and CFile techniques but am having no luck.
Trying to override the OnSaveDocument function to get access to the file name and path I'm saving to, but fostream doesn't accept LPCTSTR's as parameters, and am having no luck with CFile.
If anyone knows how to parse the variable to get the filename and path exactly, or has any techniques, I'd appreciate it.
Thank you.
|
|
|
|
|
strik wrote:
fostream doesn't accept LPCTSTR's as parameters
It should. Are you using UNICODE? Otherwise LPCTSTR is just a char *
John
|
|
|
|
|
well I've tried to put:
ofstream myFile(lpszPathName);
myFile << "Test output" << endl;
myFile.close();
but that doesn't seem to work... it writes the file but empty, yet something simple like:
ofstream myFile("C:/test.txt");
myFile << "Test output" << endl;
myFile.close();
MFC Doc/View creates the file fine, but I don't think that ofstream is working, hence it being blank! I think it's a simple case of the mix up between forward/back slashes.
|
|
|
|
|
for reference, after I wrote a string parser ('\' to '/'), after I tried a load of other methods, I found the problem was that.
MFC was overwriting the written file that I was making, and resetting it to an empty file!! Only found this out by accident as explorer was in the background of my app and I saw the filesize flip to 1kb from 0kb and back again.
Thanks for your help!
|
|
|
|
|
Thanks for the info. In most of my applications the doccument is only a small configuration file and the actual data is many external files or database(s) that are referenced in the configuration file.
John
|
|
|
|
|
I am working on a application that requires me to know which window has the focus. I have installed a hook for WH_CALLWNDPROC. By looking at WM_SETFOCUS. I can tell when the focus is changed. However, this does not work for console windows (like cmd.exe). Does anyone know how I can tell when a console window gets the focus? Is there a message that gets sent to console windows?
I have tried using WM_ACTIVATE and it does not work.
Dave
|
|
|
|
|
Try using SPY++
Still Alive!!!
Thank you God.
|
|
|
|