|
can u be more specific
nave
|
|
|
|
|
sree_as wrote: in edit box i want to activates the directions key in my keyboard.
See the Following properties of EDIT CONTROL
Multiline
AutoHScroll
AutoVScroll
Want return
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
I mean if u enter some data after clicking enter then it should perform some action say displaying messageBox.
SO i need keystrokes
|
|
|
|
|
Derive a class from CEdit and make the object of this class as member variable of the edit control.
Overide the WM_KEYDOWN message in the new class and then u can trap the enter key fro that funtion...
nave
|
|
|
|
|
Thank u naveen.
please give me rough coding.actually my domain is java but unfortunately i czme to Vc++ one month so please give me
rough code,
|
|
|
|
|
here i have derived a class from the CEdit say EditCtrlEx . Then using the class wizard i mapped the WM_KEYDOWN message( this will create a stub function with name void EditCtrlEx::OnKeyDown( UINT uChar_i, UINT uRepCnt_i, UINT uFlags_i )
inside this write
void EditCtrlEx::OnKeyDown( UINT uChar_i, UINT uRepCnt_i, UINT uFlags_i )
{
CEdit::OnKeyDown( uChar_i, uRepCnt_i, uFlags_i );
if( VK_RETURN == uChar_i )
{
AfxMessageBox( _T("Enter clicked ));
}
}
Remeber to give the Want-Return style to the edit ctrl
nave
|
|
|
|
|
thank u very much.
i done it but the editbox but not responding when we click enter.
anyway thanks for ur code
|
|
|
|
|
i tried but not working editbox is not responding for entry key.
sorry for disturbing
sree
|
|
|
|
|
Hi ,
Add the ON_WM_GETDLGCODE() along with the above code
UINT Cmyedit::OnGetDlgCode()
{
return CEdit::OnGetDlgCode()|DLGC_DEFPUSHBUTTON|DLGC_WANTALLKEYS;
}
Regards,
FarPointer
Blog:http://farpointer.blogspot.com/
|
|
|
|
|
Either give the Want return and multiline style to the edit ctrl or do as the FarPointer said in the above post.
nave
|
|
|
|
|
Hi,
I am a bit confused on how VC++ linker is resolving the function signatures. I have a windows Dll and a corresponding header file and I wanted to build a lib file out of it. So I dumped the exported methods from the DLL using Dumpbin utility. I then wrote a .def file for the exported methods and generated a .lib file from the DLL file.
Everthing was fine however I got confused regarding one thing. It is that the dumpbin produced the exported methods list with no underscore in the method name. E.g. Foo
When I ran the dumpbin utility on the generated lib file, I got underscore in method signature E.g. _Foo, so I assume that the methods must have been exported using __cdecl calling convention. When I look the method signature in the header file the prototype contains the __stdcall in the method prototype like
void LIBAPI Foo(); and LIBAPI is defined as
#if defined _WIN32
#define LIBAPI WINAPI
#endif
I was able to successfully create the .exe file using the generated lib file. Now my query is how is the linker resolving the differences in the method signatures?
Or is it the case that I am missing something basic here?
Can someone please clarify what is happening here.
Thanks and Regards.
|
|
|
|
|
Hello. everyone
I want to change a exe application to a window service. The application(exe) can receive some self-defined messages from other exe, so I want to receive same messages in the service too. Please teach me how to realize it?
Thanks.
-Freehawk
|
|
|
|
|
sunyw_2006 wrote: I want to change a exe application to a window servic
See the Service(.exe) option of the ATL com Project.
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
|
Thanks for reply.
In "xyntservice.asp" sample, it can not receive messages from other exe.
I need to handle some messages from other exe.
-Freehawk.
|
|
|
|
|
As far as I know, xyntservice can execute Win32 GUI apps (who has got a message pump). So it wouldn't be a problem for you.
Check out the ini-file sample (that starts up Notepad). If Notepad can be started under xyntservice, so will your app. And if Notepad will receive Windows messages, so will your app.
Try it out!
|
|
|
|
|
Thanks.
But when the current user log off, the exe is quited.
1.During logged off, can the window service call the exe?
2.Can the window service receive "log off" message?
-Freehawk
|
|
|
|
|
sunyw_2006 wrote: 1.During logged off, can the window service call the exe?
2.Can the window service receive "log off" message?
1.
Nope. A service can of course not send messages to a terminated app.
2.
Check out WM_ENDSESSION. MSDN:
[^]
|
|
|
|
|
LPCTSTR szHtmContent = TEXT("你好");
.
|
|
|
|
|
Recently,I have being using modi(microsoft office document imaging library) to process my documents,for some reason, I have get the handle of the picture that hold by IImage object so that I can do more thing.How can do it with VC++6.0.
Help please, Thank you all!
smith
|
|
|
|
|
I have never used IImage myself but from reading MSDN I would think the easiest way would be to use IImage::GetImageInfo() to get the dimensions of the image, and then use IImage::Draw to draw the image onto an appropriately sized memory bitmap.
You may be right I may be crazy -- Billy Joel --
Within you lies the power for good, use it!!!
|
|
|
|
|
Hey folks
I'm writing .html files to disk, and when I run my application normally, I get several garbage characters.
When I step thru the debugger and look at the functions CreateFile and WriteFile and what I'm passing them, the program not passes appropriate values, but actuall produces files free of any garbage.
I'm really concerned that if stepping thru the debugger doesn't find these errors, I'll never be able to find them by hand.
Any ideas on making the debugger comply with the real world (turning off stuf.. etc)?
Thanks!
|
|
|
|
|
Your problem might be the result of the different new() functionality. In debug mode, the allocated buffer is filled with nulls.
In release mode, it isn't.
Else, try a Rebuild All in debug mode.
|
|
|
|
|
kakan wrote: In debug mode, the allocated buffer is filled with nulls.
(Actually, it seems that the new operator in debug mode fills the buffer with 0xCD value, at least in VS 2003).
|
|
|
|
|
Hey,
is it possible to change the HTML code in a CHTMLDialog at runtime. I need this because I want to create a dialog that changes his GUI by loaded different HTLM pages...
Thanx a lot...
|
|
|
|