|
"_$h@nky_" wrote: i mean like %d use for int conversion,wat can i use for Dword conversion.
DWORD is unsigned long . printf tutorial[^] for you.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
"_$h@nky_" wrote: wat can i use for Dword conversion.
Have you tried to find what a DWORD resolves to (hint: in VS6, use F12)? It took you more time to make two posts here.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
DavidCrow wrote: Have you tried to find what a DWORD resolves to (hint: in VS6, use F12)? It took you more time to make two posts here.
Post count matters, you know. Mine just went up by 1 with this post.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
CString::Format [^] usage is pretty strightforward...
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]
|
|
|
|
|
DWORD d;
CString cstrExample;
cstrExample.Format(_T("%d"), d);
|
|
|
|
|
Hello,
I have a project which is not Doc-View Architecture. Now in the basic project the view class is derived from CWnd whereas I want to derive from CView .Will this have any problem with the basic functionality of the application since I want to write code in the OnDraw() of CView and not in OnPaint().
Prithaa
|
|
|
|
|
There are lots of differences, and CView makes many assumptions about it's environment.
(see Inserting a Doc/Frame/View in a dialog using a custom control[^])
If all you're interested in is OnDraw instead of OnPaint, why don't you look at the CView::OnPaint in the MFC code, and imitate that in your CMyWnd?
Iain.
In the process of moving to Sweden for love (awwww).
If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), give me a job! http://cv.imcsoft.co.uk/[ ^]
|
|
|
|
|
im a semi newbie to MFC. Im developing an application where in i have to copy the text whereever my mouse navigates and selects some texts. It can be like i select some texts by the mouse cursor and then hit a hot key(ctr+T etc..)so that my Application reads the texts and dumpsand then further process the received texts. Can any one please suggest me that idea that what functions or classes i can use.
|
|
|
|
|
you need Mouse and Keyboard Hooks[^]
See SetWindowsHook etc.
Correction!
You need to google first, if you have "It's urgent please" mentioned in your question.
_AnShUmAn_
modified on Thursday, April 16, 2009 7:43 AM
|
|
|
|
|
Mouse and keyboard hooks will be of absolutely no use in retrieving text. (A keyboard hook might be of benefit, to trap the hotkeys however.)
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
umm! thanks for correcting. I will go through the link you provided.
You need to google first, if you have "It's urgent please" mentioned in your question.
_AnShUmAn_
|
|
|
|
|
|
This is not an easy challenge.
1/ Detect the key being pressed! Keyboard hook, or a global hot key (see RegisterHotKey) which I'd recommend more.
2/ Then you have to get the window user the mouse. (RealChildWindowFromPoint)
3/ Then you have to extract the actual text. The way of doing this will vary from application to application. Firefox will be different from iexplore. FoxitReader will be different from Acrobat.
4/ You could get the pixel in the window, maybe using WM_PRINT, but then you'd have to OCR them to get the text...
5/ pdf and html viewers already have clipboard filling functions... It's a lot less work to use them!
Good luck though, as this would be a major challenge to a pro. Maybe a semi-newbie who isn't afraid is the best person!
Iain.
In the process of moving to Sweden for love (awwww).
If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), give me a job! http://cv.imcsoft.co.uk/[ ^]
|
|
|
|
|
I am not 100% sure, but you can go in below way.
1) Register your hotkey (RegisterHotKey).
2) When hotkey pressed.
a. get focused or current window handle using "WindowFromPoint" API
b. send below message to window using handle to get text.
WM_GETTEXT or EM_GETSELTEXT or EM_GETSEL
Parag Patel
Sr. Software Eng, Varaha Systems
|
|
|
|
|
In pure win32 code. I need to set VScrool Position at the Bottom of the EditBox.
SendMessage( hWnd ,WM_VSCROLL, SB_BOTTOM, 0 ); is not working for me.
|
|
|
|
|
MFC, STUDIO 2008, MDI-project
if J know the name of class then
how can to define the identifier
of dialog wndow on base that
was created this class?
|
|
|
|
|
CHIVOTIOV wrote: MFC, STUDIO 2008, MDI-project
if I know the name of class then how can to define the identifier of dialog window on base that was created this class?
If I get you correctly you are on the lookout for GetParent()
You need to google first, if you have "It's urgent please" mentioned in your question.
_AnShUmAn_
|
|
|
|
|
Hello,
I am doing an application with an "exe" file and some "dll" that are called from the exe.
When I run the exe in Debug (or Debug64) mode and the dll are compiled in Debug (or Debug64) mode the application runs without any problem. But if I mix Debug with Release (or Debug64 with Release 64) the application does not run, and I get this error:
"Unhandled exception at 0x77d4dd50 in PruebaLinkado.exe: Microsoft C++ exception: std::bad_alloc at memory location 0x0012c160.."
The dll has "Multi-threaded DLL (/MD)" option
And the exe file has "Multi-threaded (/MT)" option.
Can anybody help me with this problem?
Thanks in advance
|
|
|
|
|
Why would you mix debug and release mode binaries?
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
Just during debugging phase.
If I want to debug in the dll and the exe file is working I don't want to change the exe file each time.
|
|
|
|
|
I don't understand. My question was - why would you have the executable in release mode and the dll in debug mode?
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
For example,
I have a develope Team with 5 developers.
One exe that runs the dlls that each developer builds.
If a developer wants to check his work it is not necesary to complie the exe file in debug, he has just to compile his dll in debug mode and check it.
Regards
|
|
|
|
|
And how will you know what is happening in the executable if it is built with no debug information? For instance, if an assertion occurs in the executable (even while loading the DLL), you won't know it. You don't have to compile the executable every time. You say the executable remains the same, so, you can have it built with debug symbols in it. After your bugs are fixed, you can build binaries without debug information in it.
Somehow, the idea of mixing separate binaries, some with and some without debug information doesn't look strikingly impressive.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
A warm welcome to 'The Legend' [^].
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]
|
|
|
|
|
Ah, thanks.
The link you provided doesn't work, BTW. I went to your profile to view the updated post.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|