|
Use Spy++ to get the ID of the edit control. With this, you should be able to grab handle of main window (the edit's parent) with FindWindow and get the edit handle with GetDlgItem.
Tomasz Sowinski -- http://www.shooltz.com
*** Purgamentum init, exit purgamentum ***
|
|
|
|
|
nopes..the spy shows the classname as InternetExplorer_server(Remember its is shown in an explorer..pls look my question...)
I like the dreams of the future than the history of the past.
|
|
|
|
|
So what? Can't you go deeper in windows hierarchy and get the ID of edit box?
Tomasz Sowinski -- http://www.shooltz.com
*** Purgamentum init, exit purgamentum ***
|
|
|
|
|
sorry i hav no idea..can u help..?
I like the dreams of the future than the history of the past.
|
|
|
|
|
Can you expand 'InternetExplorer_Server' item in the Spy++ windows tree?
Tomasz Sowinski -- http://www.shooltz.com
*** Purgamentum init, exit purgamentum ***
|
|
|
|
|
ok..i get..i can now see the handle and classnames...
i want to write some sort of automation(that is i want to write the messages in to the textbox and apply the send button just like the booting software for Yahoo! messenger..(pls dont misunderstand me....!!!!!)by using another program)...
what i want to do.. is there is any samle code available for the same problem ..??
I like the dreams of the future than the history of the past.
|
|
|
|
|
I'd take the following steps:
1) locate main IE window with FindWindow
2) step into windows hierarchy with GetDlgItem (if you know the control ID) or EnumChildWindows (if you only know class name).
Tomasz Sowinski -- http://www.shooltz.com
*** Purgamentum init, exit purgamentum ***
|
|
|
|
|
thankssssssssssssss..thanks a lotttttttttttt..!!!!
I like the dreams of the future than the history of the past.
|
|
|
|
|
I want to show a Startdialog at the beginn of my SDI/MDI application. Where do I have to put the code for the dialogbox, and how can i manage that the box close automaticly after (for excample) 2 seconds?
|
|
|
|
|
Are you sure you want a dialog box and not classic splash screen displaying bitmap image?
Tomasz Sowinski -- http://www.shooltz.com
*** Purgamentum init, exit purgamentum ***
|
|
|
|
|
What is a classic splash screen? How can I create it?
|
|
|
|
|
'Classic' splash is a window which displays bitmap for few seconds during application startup - just like one Visual C++ or MS Word uses. Is this what you're looking for?
Tomasz Sowinski -- http://www.shooltz.com
*** Purgamentum init, exit purgamentum ***
|
|
|
|
|
i think someone has previously posted an article regarding with the same problem.
I like the dreams of the future than the history of the past.
|
|
|
|
|
How can i use the MCI device in a MFC application? Is possible to put a video on a dialog with it?
|
|
|
|
|
I have never used it personally, but it seems MCIWndXXX API could do that. You may check MPlay SDK sample as well.
Tomasz Sowinski -- http://www.shooltz.com
*** Purgamentum init, exit purgamentum ***
|
|
|
|
|
I've resolved using DirectShow (perform much things and formats than MCI) but i've a problem passing the CString filename, the function receive a LPCWSTR parameter but i can't find a way to convert it. I've read there's a macro T2W that can do that but the compiler tell me undeclared identifier.. there's some kind of include or it's a way better to convert it?
|
|
|
|
|
The T2W macro is in ATLCONV.H, however, you might find it almost as easy to use the AllocSysString function that's part of CString. This will return a BSTR, which in your context could be treated as a LPCWSTR without a cast. However, you must free it after the call has returned;
e.g.
CString myFileName;
....
BSTR tmp = myFileName.AllocSysString();
somefunction( tmp );
::SysFreeString( tmp );
The T2W and it's friends would require something like;
{
USES_CONVERSION;
somefunction( T2W( myFileName ) );
}
Steve S
[This signature space available for rent]
|
|
|
|
|
I have win32 application,iam subclassing my listbox which is the child of dialogbox.So iam calling my subclass wndproc function in the WM_INITDIALOG i.e..
lpfnDbClkListboxProc=(WNDPROC)SetWindowLong(hDialogListBox,GWL_WNDPROC,(DWORD)SubClassDialogListboxFunc);
But when i show my dialox box the dialogbox closes again.why itis so.
|
|
|
|
|
1) if you remove SetWindowLong, does dialog close prematurely?
2) post SubClassDialogListboxFunc.
Tomasz Sowinski -- http://www.shooltz.com
*** Purgamentum init, exit purgamentum ***
|
|
|
|
|
Greetings...
I am using the following code to paste data in the Rich Edit control in my application.
HGLOBAL hglb;
LPTSTR lptstr;
if (!OpenClipboard(this->uHWND))
return;
hglb = GetClipboardData(CF_TEXT);
if (hglb != NULL)
{
lptstr = (char*)GlobalLock(hglb);
if (lptstr != NULL)
{
SendMessage ( this->uHWND, EM_REPLACESEL, TRUE, (LPARAM)lptstr );
GlobalUnlock(hglb);
}
}
CloseClipboard();
return;
}
Now the problem is that sometimes the caret of the edit box is not positioned where it should be ? After pasting the caret moves to 2-3 characters before the end, but when I start typing or do any editing then work is done from the end as expected. So why the caret is not being viewed at the proper place when I paste the data ?
Any help will be appreciated.
Thanks.
Ritesh
|
|
|
|
|
Hi,
I want to share an object which is use by differents applications. This object is instanciate only once in a DLL and all applications use this DLL (and the same object).
Thus this object must be visible on the level of the OS (win2k)
I've already try to map in a sharable memory (create in the DLL) this object and that works if I don't use pointer in it.
To create this sharable memory I use this code : CreateFileMapping(...) and MapViewOfFile(...)
My question: How to share an object on the level of the OS?
Thanks in advance...
Hello World!!!
from Raphaël
|
|
|
|
|
You can use a pointer inside of your Memory mapped file, you will just need to manager the memory yourself.
So if you create your initial object, then decide that you want to allocate 50 bytes for a string, you can place that 50 bytes anywhere in your memory mapped file, however you will need to keep track somehow that it is being used so you do not reallocate it for another pointer.
Another solution is to use your memory mapped files for you objects, and any pointers you could allocate with GlobalAlloc. This allows you to share the allocated pointers between processes, however you will need to lock the pointer in place for each process before you attempt to use it. This solution is a little more cumbersome than new, but it may be better for you than writing your own memory manager for the file mapping scheme.
One other thing, if you decide to do GlobalAlloc, you could make you one single object that is shared by all apps, in your single DLL, a global object inside of a shared data section. That would save you the trouble of setting up and deleting the memory mapped file.
You can declare a variable in a shared data section simply by declaring it like this:
<br />
#pragma comment(linker, "/SECTION:.shr,RWS")<br />
#pragma data_seg(".shr")<br />
OBJECT g_obj;<br />
#pragma data_seg()<br />
Good Luck
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|
|
Thanks for all...
But when I try to use the pragma code:
#pragma comment(linker, "/SECTION:.shr,RWS")
I've got a warning:
LINK : warning LNK4039: section ".shr" specified with /SECTION option does not exist
...
Hello World!!!
from Raphaël
|
|
|
|
|
I have more than one help file in different languages.
I want to call the help file accordingly the selected language.
How does it work?
|
|
|
|
|
Set the m_pszHelpFilePath member of CYourApp to appropriate value. Don't forget that this should be full path, not the filename only.
Tomasz Sowinski -- http://www.shooltz.com
*** Purgamentum init, exit purgamentum ***
|
|
|
|