|
Christian, I am not sure if you are aware but a text RPG is actually a console program not windows, usually in a text rpg they will give you a story then ask you a question and you reply by typing "turn east" or another sort of function.
|
|
|
|
|
Whoops just to let you know that was me... i thought was logged in
|
|
|
|
|
You should take a course in Object Oriented Analysis & Design (or at least read a book on the subject). This will give you the basics of OOP and will likely answer many of your current (and future!) questions.
/ravi
"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
How can I copy selecting text from any application to my application by hotkey
|
|
|
|
|
Author
Addition info: my application store in system tray I want to copy selecting text from any application to Clipboard by hotkey
then I will get data from Clipboard later.
Thank you so much
|
|
|
|
|
meta wrote:
Author
Addition info: my application store in system tray I want to copy selecting text from any application to Clipboard by hotkey
then I will get data from Clipboard later.
I believe you'll need to use a global keyboard hook. I dont know much about doing that, but there are a few articles here on CP explaining how to do it.
Nish
The rumours that I am an AI bot are absolutely false. These rumours have been propogated by *them* to focus all the attention on to me, while *their* bots take over the planet. Thank y%%%% Divide by zero. Cannot proceed. Abort(y/y)?
|
|
|
|
|
Here's how:- Register yourself as a clipboard viewer by calling
SetClipboardViewer() .
- Handle the
ON_WM_DRAWCLIPBOARD message. Here, you can get at the clipboard's data by calling OpenClipboard() , GetClipboardData (CF_TEXT) (assuming you're interested in text content), and finally CloseClipboard() . Be sure to cascade this message to the next viewer.
- You should also handle
WM_CHANGECBCHAIN . See the various articles in the Clipboard section for more info.
/ravi
"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Additon info: that hotkeys isn't ^C (control c) ,so I do registerhotkey and do myfunction to restore from system tray but after that what should I do for copy that selecting text to my app.
thank a lot
|
|
|
|
|
How can I copy selecting text from any application to my application by hotkey ?
Thank you so much
|
|
|
|
|
I'm sorry. I multiple send question. so Cancel this question and use http://www.codeproject.com/script/comments/forums.asp?forumid=1647&select=163440#xx163440xx instead.
Thank you
|
|
|
|
|
How can i add .cpp as a member of my project?
|
|
|
|
|
On the main menu, click Project->Add to Project->Files
Josh Knox
that-guy.net
"UNIX is basically a simple operating system, but you have to be a genius to understand the simplicity."
Dennis Ritchie.
|
|
|
|
|
i'm working on an open source system according to the documentation->"If you get the following error message:
Link Error: CallSim.obj : error LNK2001: unresolved
external symbol "public: virtual __thiscall
SKC_UserTimer::~SKC_UserTimer(void)"
(??1SKC_UserTimer@@UAE@XZ)
• Make sure that include/BaseClasses.cpp and include/
CMessages.api.cpp are members of the project."
i already added this files to my project and still i got this->"Linking...
Switch1Dlg.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall XLC_AssignSpan::~XLC_AssignSpan(void)" (??1XLC_AssignSpan@@UAE@XZ)
Switch1Dlg.obj : error LNK2001: unresolved external symbol "public: __thiscall XLC_AssignSpan::XLC_AssignSpan(int)" (??0XLC_AssignSpan@@QAE@H@Z)
Debug/Switch1.exe : fatal error LNK1120: 2 unresolved externals
Error executing link.exe.
Creating browse info file...
Switch1.exe - 3 error(s), 0 warning(s)"
under the CMessages.api.cpp i have this->SK_DEFINE_CLASS(XLC_AssignSpan);
XLC_AssignSpan::XLC_AssignSpan(int sz)
: dynStorage((sz > sizeof(XL_AssignSpan)) ? malloc(sz) : NULL)
{
msgRep = (dynStorage ? (XL_AssignSpan *)dynStorage : &repStorage);
sk_initMsg(msgRep, TAG_AssignSpan);
}
XLC_AssignSpan::~XLC_AssignSpan()
{
if (dynStorage) {
free(dynStorage);
}
}"
what else am i missing here. thanks guys in advance.
|
|
|
|
|
Are the base classes all included in the project ? Are they being included in the files that call them ?
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
And you don't spend much time with the opposite sex working day and night, unless the pizza delivery person happens to be young, cute, single and female. I can assure you, I've consumed more than a programmer's allotment of pizza, and these conditions have never aligned. - Christopher Duncan - 18/04/2002
|
|
|
|
|
yes the base classes all of them are needed and included.
|
|
|
|
|
I do not fully understand what may be going on (what's SK_DEFINE_CLASS ), but:
Is XLC_AssginSpan defined in another DLL? Because if this is the case you must also link with the .lib file of that dll.
Best regards,
Alexandru Savescu
|
|
|
|
|
XLC_AssignSpan is defined in another header and i have included that header accordingly.
note:
#define SK_DEFINE_CLASS(cls) \
SKC_ClassDesc *cls::myDesc = NULL;
it is invoked in the implementation file of the class.
i really appreciate the help... thanks
|
|
|
|
|
In WorkSpace Window Click the FileView Tab
Then in Select your project and right click on it.
Then select Add Files to Project.
Then you can select your file from FileDialog.
This would suffice
|
|
|
|
|
Hi,
I have an application (VC++) which has 20 classes..
Actually its taking lot of memory while running..
Is there an way i can reduce that..
Also If i put some Classes in a DLL (MFC).. would it
help reducing the memory usage.. i mean, then it would
only load the class when actually required..
Ne ideaz
Sameer
|
|
|
|
|
Sameer Maggon wrote:
Actually its taking lot of memory while running..
Is there an way i can reduce that..
First, make sure you actually have a problem. No sense wasting time on optimizations that aren't really necessary. Next, find out what's actually using the memory. Is your compiled code that large, or are you allocating a lot of memory at run time.
If your code is large, it probably isn't worth the effort to shrink it, but do a search for optimization on CP; there are a couple of articles on it.
If you are allocating a lot of memory at runtime, you need to narrow down even further, and identify what algorithms need it; there is always a trade off between size and speed, and quite often you can rewrite a given algorithm to use less memory without taking a huge speed hit.
Sameer Maggon wrote:
Also If i put some Classes in a DLL (MFC).. would it
help reducing the memory usage..
Unless you have some routines you use very infrequently and can afford to unload when you're done using them, moving code into a DLL will probably make your memory footprint slightly bigger.
--------
And we die young.
Faster we run. Alice in Chains, We Die Young
|
|
|
|
|
Sameer Maggon wrote:
I have an application (VC++) which has 20 classes..
And that matters... how? You provide no info on the size or complexity of them.
Actually its taking lot of memory while running..
Is there an way i can reduce that..
Yes, but it does involving knowing what you do. I'm sorry to say this, but if you even have to ask if there's a way you can reduce the memory footprint (again without giving any examples), it would seem to me you are currently not understanding what you are doing.
First and foremost I suggest you should try to learn C++.
|
|
|
|
|
The MS DataGrid is used in my program,but it doesn't worked on the machine whithout VC++ installed. I have registered the msdatgrd.ocx and have installed the MDAC2.7. The Error messages is : " Can't initialize data bindings" ,
m_myDataGrid.SetRefDataSource( (LPUNKNOWN)rs ); //Error Message Ocurrors
VCBeginer
|
|
|
|
|
Hello!
You need to 'install' two dll's; MSBIND.DLL and MSSTDFMT.DLL. By 'install' I mean copy them to System (system32) and then register them with regsvr32.exe
It's a pity that MS doesn't have documentation or better, a real installation for this
Hope that this will help you!
// Mike
|
|
|
|
|
Hi,
call back function is said to be called by Operation system only. I want to make a call back funtion and control the time and place it is called. Can I make it?
Would you please append an example ?
Thank you.
Best regard.
I confess that I am a stubborn guy, but why not put things thoroughly, logically and systematically clean. One concrete prolem is worth a thousand unapplied abstractions.
|
|
|
|
|
Yes as long your application is still running! A callback function is "not much
than calling convention". In fact WINAPI and CALLBACK is
the same __stdcall . Do not confuse CALLBACK function and RPC!
int __cdecl _tmain(int argc, _TCHAR **argv, _TCHAR **envp)
{
myDebugCallback( TEXT("Hello world..." ) );
}
void CALLBACK myDebugCallback(LPCTSTR strMessage)
{
_stprintf(TEXT("Message: %s\n"), strMessage);
}
"Dirty hands lead to important discovery..." - Thomas Edison
|
|
|
|