|
Ok this is it! You won't get another post on this outta me in THIS LIFETIME! :>
Here is where you need to trap WM_INPUTLANGCHANGEREQUEST in MFC MDI apps:
1) your CWnd-derived class used to subclass MDIClient
2) your CView-derived class(es)
Over and out!
|
|
|
|
|
I would like to create an automation which could use excel. I need excel to catch values for functions which are implemented with vc++.
I believe that I could use GetValue function like that: range.GetValue which return a VARIANT. It's at this step I have a problem, because, for example if my function need of a double parameter, and this parameter is given by the value catched on excel. How my function could recognize it?
thank for your help
gerald;P
|
|
|
|
|
I would like to create an automation which could use excel. I need excel to catch values for functions which are implemented with vc++.
I believe that I could use GetValue function like that: range.GetValue which return a VARIANT. It's at this step I have a problem, because, for example if my function need of a double parameter, and this parameter is given by the value catched on excel. How my function could recognize it?
thank for your help
|
|
|
|
|
Does anyone know how you can create a virtial directory using C++ or MFC. Sample code would be appreciated
|
|
|
|
|
Depends on what you mean by "virtual directory". Do you want to create an actual file system extension? Or a Shell extension? Shell extensions are things like the Printer folder, the Control Panel Folder, the Dial-up networking folder, etc...
File system extensions are directories you can go to from a command line and appear to be real directories, even though they're not.
If you want a shell namespace extension, then check this article:
http://www.codeproject.com/shell/shlext.asp
If you want the file system extension, then good luck, I don't know of an example for that.
|
|
|
|
|
Hi
i am trying to use this function to retrieve multiple key values
it returns always an error
can anybody tell me how to fill the VALENT structure specified
thanks
|
|
|
|
|
I have created an menu dynamicly and set as ownerdraw to add icons and bitmaps.
But when I click on a popup item in the menu, and move to another popup item the menu closes
i.e.
popup_item1
-->menu_item1
-->menu_item2
-->menu_item3
popup_item2
-->menu_item1
-->menu_item2
above: If I click popup_item1 the menu items are displayed in a popup , if i move the mouse to popup_item2 the menu disapears.
Any ideas???
regards,
pgudge
NOTE:::
I forgot to mention, when I have the menu poping up on a Dialog box it doesn't do this it is fine, it only closes the menu when it's opens on the system tray.
|
|
|
|
|
If no one is no the wiser it was a little error on my part.
When the SystemTray icon is clicked and a popup / menu item is selected it focus on the Dialog box which is open, and closing the menu.
All I need now is a invisible dialog, or even better a message pump outside the dialog.
regards,
pgudge
|
|
|
|
|
Hi!
Does anyone know, how to determine (until preprocessor defines) the app use MFC or not, if included support MFC in static library ?
|
|
|
|
|
can anybody tell me how i would retrieve the cursor position (the text cursor in an edit control....)
thanks in advance!
|
|
|
|
|
Take a look at the EM_* messages, I think you can do what you want with EM_LINEFROMCHAR and EM_GETSEL
BTW,
In an edit control it's not called a cursor, but a caret...
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
Where can I find a C++/MFC source code example about how to add the OLE Drag Drop events (OLEStartDrag, ...) to an ActiveX control.
|
|
|
|
|
Anyone know how to read the page count from a multipage tif image.
|
|
|
|
|
I would also be interested in tips on how to access this information - I am often asked to provide an index of a directory including the file name and number of pages for group 4 fax encoded TIFFs. Any info or tips would be appreciated
|
|
|
|
|
Hi,
My app uses a context menu in one of its views, which works fine on its own!
The problem comes when i try to add other functionality to the WM_RBUTTONDBLCLK.
The context menu appears on the double click!
Is it posible, or even worth it, to get them working together?
|
|
|
|
|
You need to use a timer.
1) In WM_RBUTTONDOWN handler, create the timer with a timeout period of 2 * ::GetDoubleClickTime(). Do not display popup menu here - you don't know if this is a double-click or single-click.
2) Insert KillTimer in WM_RBUTTONDBLCLK.
3) Add WM_TIMER handler - you'll get this message if somebody right-clicks once and second click doesn't come. The code with popup menu should reside here.
Tomasz Sowinski -- http://www.shooltz.com.pl
|
|
|
|
|
Hi!
I've posted this question in the "Suggestion" board, because there is no API discussion, and was advised to post it to C++ board. Sorry for long story.
I've created the NT service that in the case of error not only register event in the Application EventLog, but also may send this event by mail to the predefined SMTP address. In the configuration applet for this service I'd like to let the user to select, what events he/she wants to receive in mail. So I'd like to extract the list of events from the event source, registered in HKLM\SYSTEM\CurrentControlSet\Services\Eventlog\Application\EventMessageFile.
I can extract the single event with FormatMessage, if I know the ID. But if I don't? The question is: How I can enumerate the events in the EventMessageFile? Sure I can do it "manualy" analyzing the message file structure. But I prefer something more safe in the case, they in MS will change the message file structure. And using API (if there is any) will save me from unskilled labour. I don't afraid to do such a work, but if I can avoid it ...
Thanks in advance.
Regards,
Gennady
|
|
|
|
|
Message table is normal Win32 resource, so you need to load message file using LoadLibraryEx() with LOAD_LIBRARY_AS_DATAFILE flag. Then, use EnumResourceXXX/FindResource/LoadResource functions to retrieve MESSAGE_RESOURCE_XXX structures.
Hope that helps.
Tomasz Sowinski -- http://www.shooltz.com.pl
|
|
|
|
|
Thanks ! EnumResourceNames is exactly what I looked for. Don't know why I couldn't find it myself - may be search expression was wrong.
Thank you once more.
Regards,
Gennady
|
|
|
|
|
In the below given program, 'cout' in the destructor doesn't work. But if the iostream is replaced with iostream.h and the statement using namespace std; is commented then, it works fine and displays - "Hello how are you?"
Can anyone explain why is it so?
#include iostream
using namespace std;
struct A
{
A(){cout<<"Hello";}
~A(){cout<<" you?";}
}a;
void main( void )
{
cout<<" how are";
}
//"void (*p[10]) (void (*)());"
|
|
|
|
|
In VC++ <iostream> and <iostream.h> use different implementations of the run-time library routines, so they work differently.
|
|
|
|
|
Thnx for ur reply. But I would like to know why is the STL cout is behaving like this? Is it a bug in STL?
"void (*p[10]) (void (*)());"
|
|
|
|
|
Don't have an answer for you but you may want to just debug the app to see why the last cout doesn't do anything. Have you tried appending an "endl" to the "you"?
Alvaro
|
|
|
|
|
You need to flush "cout" before exiting the application. std::endl takes care of this, as in
cout << "d'tor" << endl;
|
|
|
|
|
I wonder why this compiles without an error :
m_nScrollPos-=nPos,1.0,2,3
(IMHO this is obviousely nonense)
|
|
|
|