|
Merhaba Elif Hanim,
Niye buttonun captionunu alamadiginizi anlamadim. Mesajiniz post edileli bayagi olmus ama asagidaki kod calisiyor. Umarim hala isinize yarar:
void CTrialView::OnBnClickedButton1()
{
CString szString;
CButton *pButton;
pButton = (CButton*)GetDlgItem(IDC_BUTTON1);
pButton->GetWindowText(szString);
AfxMessageBox(szString);
}
Hakan YAMANYAR
|
|
|
|
|
Hi everybody,
I'm building a program that catch messages from keyboard and mouse, like Spy++ in VC++ (The program is a dialog-based program using Hook technique). I've encoutered a problem that I can't get messages if working outside my application's window. It means if I do anything outside my application dialog, I can't catch the messages. Can anyone tell me how to get windows handler so that I can catch messages from other applications'widows running at the same time with my application? Thank you very much!
Best regards!
|
|
|
|
|
0212319 wrote: I've encoutered a problem that I can't get messages if working outside my application's window. It means if I do anything outside my application dialog, I can't catch the messages.
For Catching Window Message of Other Message you have to create global hook dll :-
here is an example:-
http://codeproject.com/dll/hooks.asp[^]
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
In addition to Alok's suggestion, you might also look into SetCapture() .
"Take only what you need and leave the land as you found it." - Native American Proverb
|
|
|
|
|
I got a sample visual c++ program from disk.I set some breakpoint in the application ,but when i debug this application,I found that the breakpoint is invalid and the breakpoint is removed in the debugging process.Why and How to fix this problem?
Thank you for your answer!
sude
|
|
|
|
|
ONLY TWO THINGS ARE RESPONSIBLE
CASE 1
You have placed a break point in loop in which control is not going;
CASE 2
You have placed a breakpoint inside dll;
|| ART OF LIVING ||
|
|
|
|
|
you let me know what exactly you have done i will tell you solution
|| ART OF LIVING ||
|
|
|
|
|
shivditya wrote: CASE 2
You have placed a breakpoint inside dll;
Hello Buddy, can you throw more light on this statement. how come breakpoint become invalid in DLL....
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
If option is not set on debug the dll obviously break point becomes invalid. Try doing it
|| ART OF LIVING ||
|
|
|
|
|
shivditya wrote: Try doing it
Is that option is set by default?!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
This is because the debugger cannot find the symbols of the DLL they are trying to set the breakpoint in.
They need to goto the Project settins, debug tab and select Additional DLLs in the combo box, you can then specify additional DLLs which will have symbols loaded for them at debug startup. this allows breakpoints to be set in loaded DLLs of a project.
Note: This was written with VC6 in mind
If you vote me down, my score will only get lower
|
|
|
|
|
Roger Allen wrote: They need to goto the Project settins, debug tab and select Additional DLLs in the combo box, you can then specify additional DLLs which will have symbols loaded for them at debug startup. this allows breakpoints to be set in loaded DLLs of a project.
That's a Intresting fact
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
Roger Allen wrote: Note: This was written with VC6 in mind
Exactly. With VC++ 7+ you don't have to worry about it.
My programming blahblahblah blog. If you ever find anything useful here, please let me know to remove it.
|
|
|
|
|
What often happens is that the source code is not the same version as the code in the application. (is the source compiled into a static link library?)
Find out where you should put the SLL and relink your app.
sude wrote: Thank you for your answer!
You're welcome
Behind every great black man...
... is the police. - Conspiracy brother
Blog[^]
|
|
|
|
|
Did not find a forum for an IDE question... so...
(If there is a better place to post -- let me know.)
Problem:
I make NO CHANGE to any project in the solution, ask for a build and
all projects checked in the solution configuration are compiled. Further,
If I build (all recompile and link) then run a debug test, I always
get the message that the project is out of date and needs to be recompiled.
Please:
What option, where, to get a proper build only recompiles if necessary?
(I have hunted and read docs and find no answer.)
Comment:
I had to reformat and reload recently. My IDE use to work correctly!
WedgeSoft
-- modified at 1:23 Friday 11th November, 2005
|
|
|
|
|
I believe that the date-time on your project files is wrong. You may have saved the 'always recompiling files' at a later date than the current system date-time.
To solve the problem, I think you can open each and every source and header file (not icons or images etc) in notepad (one at a time) and press Ctrl+S (Save) on each of them. That way they will be saved with the current date-time, and hence will require no more 'needs to be recompiled'.
this is this.
|
|
|
|
|
That seems to have done it! Thank you.
WedgeSoft
|
|
|
|
|
One more case,
If your system date has changed to a date prior to the files date....
|
|
|
|
|
Gammill wrote: Problem:
I make NO CHANGE to any project in the solution, ask for a build and
all projects checked in the solution configuration are compiled. Further,
If I build (all recompile and link) then run a debug test, I always
get the message that the project is out of date and needs to be recompiled.
In addition to the date/time issue already mentioned, I can think of another way the IDE can become confused: When you alter the place where the build-results of a sub-project are put, the IDE sometimes does not find them and tries to rebuild.
I have switched to make all my LIBs, EXEs and DLLs in the standard 'debug' and 'release'-direcories and use pre-build and post-build steps to copy them where they are needed.
"We trained hard, but it seemed that every time we were beginning to form up into teams we would be reorganised. I was to learn later in life that we tend to meet any new situation by reorganising: and a wonderful method it can be for creating the illusion of progress, while producing confusion, inefficiency and demoralisation."
-- Caius Petronius, Roman Consul, 66 A.D.
|
|
|
|
|
I reloaded to the original location. And I use the default
location (debug). So your suggestion did not apply. But,
thanks for the thought. The first suggestion of load/save
with notepad to correct the system timestamps seems to have
worked.
WedgeSoft
|
|
|
|
|
hi
i am creating a win32DLL(on VS6).
could anyone please tell me what are the files to be included to call the functions in the dll and where?
1)i have created a Win32 Dll file and compiled it "successfully".It created .Lib ,.exp and .dll file(so no probs there)
2)since i have used __declspec(dllexport) i did not create DEF file.
3)i have created a simple win32 console application.the code is as follows:
#include "conio.h"
#include "Flipdll.h"
void main()
{
NumberList(); //these are functions in Flipcode.dll
LetterList();
getch();
}
1)if i compile normally it throws up "cannot open Flipdll.h file", so i copied Flipdll.h into current directory.
2)but now it throws up the error
FlipDllWin.obj : error LNK2001: unresolved external symbol _LetterList
FlipDllWin.obj : error LNK2001: unresolved external symbol _NumberList
Debug/FlipCodeWin.exe : fatal error LNK1120: 2 unresolved externals
Error executing link.exe.
I have even copied the Lib file but no use
Plz guide me on this.I saw number of tutorials but all of them concentrate on Creating DLL(most of them MFC but not the basic settings like inclusion of files which are essential for a beginner.
even code project doesn't seem to have good beginner tutorials
Any kind of help will be highly appreciated
-- modified at 0:39 Friday 11th November, 2005
|
|
|
|
|
hey i copied the lib file and dll into the current working directory, and also included path of lib file in project->settings and it worked
but the problem is that whenever i update the Dll file i need to copy the lib and dll files again.isn't it a tedious process??
is there any other way without copying these 3 files(.h,.lib and .dll)??
-- modified at 0:52 Friday 11th November, 2005
|
|
|
|
|
I cant remeber exactly because I dont have vs6 on my pc.
In the project properties dialog you can enter folders to search for header and lib files. Put the relative path from your client project to the folders containing the .h and .lib files.
|
|
|
|
|
The simplest way is to write a Prebuild Event step that copies the .lib and .dll files.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
S. Senthil Kumar wrote: write a Prebuild Event step
How to write a Pre-Build event step??Any Links?
|
|
|
|