PreTranslateMessage in the DLL is not called

Hi there.
I have a strange thing in my code. I have a class which is derived from 
CEdit. In that class there is a PreTranslateMessage method. It is called 
when I compile this class in the Exe. But it is not never called when I 
compile this class as a DLL and load it dynamically by LoadLibrary and use 
the class.
Please do you have any ideas what is wrong there? What is the difference of 
using derived class as a exe or as a dll?
Thanks!

German Koninin


0
nomail4459 (42)
7/18/2006 1:51:05 PM
vc.mfc 33608 articles. 0 followers. Follow

13 Replies
1434 Views

Similar Articles

[PageSpeed] 22

Is it a Regular DLL? Is the CEdit derived object in a modeless dialog?

---
Ajay

German Koninin wrote:
> Hi there.
> I have a strange thing in my code. I have a class which is derived from
> CEdit. In that class there is a PreTranslateMessage method. It is called
> when I compile this class in the Exe. But it is not never called when I
> compile this class as a DLL and load it dynamically by LoadLibrary and use
> the class.
> Please do you have any ideas what is wrong there? What is the difference of
> using derived class as a exe or as a dll?
> Thanks!
> 
> German Koninin

0
ajaykalra (6841)
7/18/2006 2:03:39 PM
This is a regular DLL so far (not an extention one). The CEdit deriver 
object is in the modeless dialog.


"Ajay Kalra" <ajaykalra@yahoo.com> wrote in message 
news:1153231419.336771.126770@m79g2000cwm.googlegroups.com...
> Is it a Regular DLL? Is the CEdit derived object in a modeless dialog?
>
> ---
> Ajay
>
> German Koninin wrote:
>> Hi there.
>> I have a strange thing in my code. I have a class which is derived from
>> CEdit. In that class there is a PreTranslateMessage method. It is called
>> when I compile this class in the Exe. But it is not never called when I
>> compile this class as a DLL and load it dynamically by LoadLibrary and 
>> use
>> the class.
>> Please do you have any ideas what is wrong there? What is the difference 
>> of
>> using derived class as a exe or as a dll?
>> Thanks!
>>
>> German Koninin
> 


0
nomail4459 (42)
7/18/2006 2:34:54 PM
This is a known issue. See here:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vcsample98/html/_sample_mfc_dllhusk.asp

<>
If the DLL opens modeless dialogs or has a main frame window of its
own, the application's main message pump must call a routine exported
by the DLL, which in turn calls the CWinApp::PreTranslateMessage member
function of the DLL's application object. This is illustrated by the
FilterDllMsg function exported by Tracer.dll.
</>

You will also notice that tab keys on a modeless dialog do not work in
a Regualr DLL. You need to take the steps outlined in the sample above
to make it work.

---
Ajay

German Koninin wrote:
> This is a regular DLL so far (not an extention one). The CEdit deriver
> object is in the modeless dialog.
>
>
> "Ajay Kalra" <ajaykalra@yahoo.com> wrote in message
> news:1153231419.336771.126770@m79g2000cwm.googlegroups.com...
> > Is it a Regular DLL? Is the CEdit derived object in a modeless dialog?
> >
> > ---
> > Ajay
> >
> > German Koninin wrote:
> >> Hi there.
> >> I have a strange thing in my code. I have a class which is derived from
> >> CEdit. In that class there is a PreTranslateMessage method. It is called
> >> when I compile this class in the Exe. But it is not never called when I
> >> compile this class as a DLL and load it dynamically by LoadLibrary and
> >> use
> >> the class.
> >> Please do you have any ideas what is wrong there? What is the difference
> >> of
> >> using derived class as a exe or as a dll?
> >> Thanks!
> >>
> >> German Koninin
> >

0
ajaykalra (6841)
7/18/2006 2:50:39 PM
sounds like a nightmare

"Ajay Kalra" <ajaykalra@yahoo.com> wrote in message 
news:1153234239.742635.40250@i42g2000cwa.googlegroups.com...
> This is a known issue. See here:
>
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vcsample98/html/_sample_mfc_dllhusk.asp
>
> <>
> If the DLL opens modeless dialogs or has a main frame window of its
> own, the application's main message pump must call a routine exported
> by the DLL, which in turn calls the CWinApp::PreTranslateMessage member
> function of the DLL's application object. This is illustrated by the
> FilterDllMsg function exported by Tracer.dll.
> </>
>
> You will also notice that tab keys on a modeless dialog do not work in
> a Regualr DLL. You need to take the steps outlined in the sample above
> to make it work.
>
> ---
> Ajay
>
> German Koninin wrote:
>> This is a regular DLL so far (not an extention one). The CEdit deriver
>> object is in the modeless dialog.
>>
>>
>> "Ajay Kalra" <ajaykalra@yahoo.com> wrote in message
>> news:1153231419.336771.126770@m79g2000cwm.googlegroups.com...
>> > Is it a Regular DLL? Is the CEdit derived object in a modeless dialog?
>> >
>> > ---
>> > Ajay
>> >
>> > German Koninin wrote:
>> >> Hi there.
>> >> I have a strange thing in my code. I have a class which is derived 
>> >> from
>> >> CEdit. In that class there is a PreTranslateMessage method. It is 
>> >> called
>> >> when I compile this class in the Exe. But it is not never called when 
>> >> I
>> >> compile this class as a DLL and load it dynamically by LoadLibrary and
>> >> use
>> >> the class.
>> >> Please do you have any ideas what is wrong there? What is the 
>> >> difference
>> >> of
>> >> using derived class as a exe or as a dll?
>> >> Thanks!
>> >>
>> >> German Koninin
>> >
> 


0
nomail4459 (42)
7/18/2006 3:01:29 PM
Ok so it looks like I should export some function in my DLL. That function 
will serve all the messages that windows send me right? So where in my main 
application should I put it? In my DLL there are few modeless dialogs that 
are waiting for messages, but main window don't know about them. How it 
should be implemented all of this?

The structure of my app is following:

Main Application (exe)
  CTabCtrlDerivedClass
     Module (dll)
        CTabCtrlDerivedClass
           Tab
           Tab
     Module (dll)
        Just a window
     Module (dll)
        whatever


"Ajay Kalra" <ajaykalra@yahoo.com> wrote in message 
news:1153234239.742635.40250@i42g2000cwa.googlegroups.com...
> This is a known issue. See here:
>
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vcsample98/html/_sample_mfc_dllhusk.asp
>
> <>
> If the DLL opens modeless dialogs or has a main frame window of its
> own, the application's main message pump must call a routine exported
> by the DLL, which in turn calls the CWinApp::PreTranslateMessage member
> function of the DLL's application object. This is illustrated by the
> FilterDllMsg function exported by Tracer.dll.
> </>
>
> You will also notice that tab keys on a modeless dialog do not work in
> a Regualr DLL. You need to take the steps outlined in the sample above
> to make it work.
>
> ---
> Ajay
>
> German Koninin wrote:
>> This is a regular DLL so far (not an extention one). The CEdit deriver
>> object is in the modeless dialog.
>>
>>
>> "Ajay Kalra" <ajaykalra@yahoo.com> wrote in message
>> news:1153231419.336771.126770@m79g2000cwm.googlegroups.com...
>> > Is it a Regular DLL? Is the CEdit derived object in a modeless dialog?
>> >
>> > ---
>> > Ajay
>> >
>> > German Koninin wrote:
>> >> Hi there.
>> >> I have a strange thing in my code. I have a class which is derived 
>> >> from
>> >> CEdit. In that class there is a PreTranslateMessage method. It is 
>> >> called
>> >> when I compile this class in the Exe. But it is not never called when 
>> >> I
>> >> compile this class as a DLL and load it dynamically by LoadLibrary and
>> >> use
>> >> the class.
>> >> Please do you have any ideas what is wrong there? What is the 
>> >> difference
>> >> of
>> >> using derived class as a exe or as a dll?
>> >> Thanks!
>> >>
>> >> German Koninin
>> >
> 


0
nomail4459 (42)
7/18/2006 3:14:13 PM
> sounds like a nightmare

It can be intimidating the first time around. But the changes are
minimal. I agree that this whole thing is a mess. It took a while for
me to figure this out(that was over 6 years ago and google was not
really helpful at that time).

--
Ajay

0
ajaykalra (6841)
7/18/2006 3:17:11 PM
The DLLTRACER source is already in fron of me so I'm trilling.
Thanks for a good answers. If any trouble I ask more questions. Thanks 
again!


"Ajay Kalra" <ajaykalra@yahoo.com> wrote in message 
news:1153235831.688759.27480@p79g2000cwp.googlegroups.com...
>> sounds like a nightmare
>
> It can be intimidating the first time around. But the changes are
> minimal. I agree that this whole thing is a mess. It took a while for
> me to figure this out(that was over 6 years ago and google was not
> really helpful at that time).
>
> --
> Ajay
> 


0
nomail4459 (42)
7/18/2006 3:23:26 PM
I should have mentioned this earlier but if you can, you should use a
MFC Extension DLL. You will use a Regular DLL if you are writing a COM
server/client or an Add-In/plugin.

---
Ajay

German Koninin wrote:
> The DLLTRACER source is already in fron of me so I'm trilling.
> Thanks for a good answers. If any trouble I ask more questions. Thanks
> again!
>
>
> "Ajay Kalra" <ajaykalra@yahoo.com> wrote in message
> news:1153235831.688759.27480@p79g2000cwp.googlegroups.com...
> >> sounds like a nightmare
> >
> > It can be intimidating the first time around. But the changes are
> > minimal. I agree that this whole thing is a mess. It took a while for
> > me to figure this out(that was over 6 years ago and google was not
> > really helpful at that time).
> >
> > --
> > Ajay
> >

0
ajaykalra (6841)
7/18/2006 3:29:40 PM
Well. I was a problem implementing MFC extentions. There was couple of 
ASSERT exceptions in my code. In fact I didn't find any official example 
from microsoft and even through google I found only few of them.


"Ajay Kalra" <ajaykalra@yahoo.com> wrote in message 
news:1153236580.611298.283760@m79g2000cwm.googlegroups.com...
>I should have mentioned this earlier but if you can, you should use a
> MFC Extension DLL. You will use a Regular DLL if you are writing a COM
> server/client or an Add-In/plugin.
>
> ---
> Ajay
>
> German Koninin wrote:
>> The DLLTRACER source is already in fron of me so I'm trilling.
>> Thanks for a good answers. If any trouble I ask more questions. Thanks
>> again!
>>
>>
>> "Ajay Kalra" <ajaykalra@yahoo.com> wrote in message
>> news:1153235831.688759.27480@p79g2000cwp.googlegroups.com...
>> >> sounds like a nightmare
>> >
>> > It can be intimidating the first time around. But the changes are
>> > minimal. I agree that this whole thing is a mess. It took a while for
>> > me to figure this out(that was over 6 years ago and google was not
>> > really helpful at that time).
>> >
>> > --
>> > Ajay
>> >
> 


0
nomail4459 (42)
7/19/2006 7:37:14 AM
One more question about Extention DLL. How can I execute SetRegistryKey on 
it to be able to define registry key where I store module settings? there is 
no CApp defined class so far...


"Ajay Kalra" <ajaykalra@yahoo.com> wrote in message 
news:1153236580.611298.283760@m79g2000cwm.googlegroups.com...
>I should have mentioned this earlier but if you can, you should use a
> MFC Extension DLL. You will use a Regular DLL if you are writing a COM
> server/client or an Add-In/plugin.
>
> ---
> Ajay
>
> German Koninin wrote:
>> The DLLTRACER source is already in fron of me so I'm trilling.
>> Thanks for a good answers. If any trouble I ask more questions. Thanks
>> again!
>>
>>
>> "Ajay Kalra" <ajaykalra@yahoo.com> wrote in message
>> news:1153235831.688759.27480@p79g2000cwp.googlegroups.com...
>> >> sounds like a nightmare
>> >
>> > It can be intimidating the first time around. But the changes are
>> > minimal. I agree that this whole thing is a mess. It took a while for
>> > me to figure this out(that was over 6 years ago and google was not
>> > really helpful at that time).
>> >
>> > --
>> > Ajay
>> >
> 


0
nomail4459 (42)
7/19/2006 9:26:59 AM
German Koninin wrote:
> One more question about Extention DLL. How can I execute SetRegistryKey on
> it to be able to define registry key where I store module settings? there is
> no CApp defined class so far...

You can use AfxGetApp to get to the app object. It will not be defined
in your module but the other module(typically and EXE or other
extension DLLs which are used by an  EXE) which uses your DLL.

---
Ajay

0
ajaykalra (6841)
7/19/2006 1:15:32 PM
I converted my DLLs to MFC Estention DLLs and it is working fine. However 
CMenu.LoadMenu in my module produce main exe menu has loaded. They have the 
same resource id, but I thought some way it should be switched from main one 
to the module when I'm requestiong resources in the module. Now I changed an 
id of my module's menu to +2000 so they are not the same now and it is 
working but I think this is not a good idea so far...


"Ajay Kalra" <ajaykalra@yahoo.com> wrote in message 
news:1153314932.032585.178160@m79g2000cwm.googlegroups.com...
>
> German Koninin wrote:
>> One more question about Extention DLL. How can I execute SetRegistryKey 
>> on
>> it to be able to define registry key where I store module settings? there 
>> is
>> no CApp defined class so far...
>
> You can use AfxGetApp to get to the app object. It will not be defined
> in your module but the other module(typically and EXE or other
> extension DLLs which are used by an  EXE) which uses your DLL.
>
> ---
> Ajay
> 


0
nomail4459 (42)
7/19/2006 3:08:07 PM
German Koninin wrote:
> I converted my DLLs to MFC Estention DLLs and it is working fine. However
> CMenu.LoadMenu in my module produce main exe menu has loaded. They have the
> same resource id, but I thought some way it should be switched from main one
> to the module when I'm requestiong resources in the module.

I have managed IDs in extension DLLs using CDynLinkLibrary. This
assumes that all IDs across the dlls are distinct. Others here have
recommended using AfxSetRsourceHandle. Take a look at this as well:

http://www.codeproject.com/dll/dllinstanceswitcher.asp

---
Ajay

0
ajaykalra (6841)
7/19/2006 3:29:24 PM
Reply:

Similar Artilces:

Extension Dll with Dialog and VB
Hallo! I have a gread problem, I created a extension dll, put a simple dialog in it and want to call the dialog from Visual Basic 6. But the dialog is created and then the whole stuff crashes. Why? What's my misttake? Some code snippets: long DoDialog(HWND hwnd) { AfxSetResourceHandle(hinst); // hinst is the HINSTANCE from DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved) CDlg d(CWnd::FromHandle(hwnd)); d.DoModal(); return 1; } in the def file: EXPORTS ; Explicit exports can go here DoDialog and in VB: Public Declare Function DoDialog Lib "...

DLL lobrary wont load.
Hello All, Hope someone can help. I run Money 2002 on a HP desktop PC that uses Windows XPHE with Service Pack 2. Recently I reinstalled Windows and now Money wont open. I get a message saying the Registration Library (DLL) hasn't loaded. Other software seems unaffected. Tried reinstalling Money but still the same message. Any advice would be appreciated. John. ...

Invalid dynamic link call to a .DLL file?
When I open a Word, Excell or any file from an e-mail attachment I get this message: PROGRAM ERROR: Your program is making an invalid dynamic link call to a .DLL file. Why does it do this! ...

What is the file called which holds outlook express email?
I'm trying to migrate my old Win98/Outlook express email system to WinXP/Outlook. I don't know what the file is called which stores all the email I have saved over the last few years... >-----Original Message----- >I'm trying to migrate my old Win98/Outlook express email >system to WinXP/Outlook. I don't know what the file is >called which stores all the email I have saved over the >last few years... >. > It will either be a xxx.pst or a xxx.ost. Do a search on your hard drive for *.pst and it will show you where your file is located. Corrine ...

mfc80enu.dll
Still working on localisation, I'm trying to work out how MFC's localised modules (MFC80FRA.DLL etc) are loaded. Stepping through the MFC980.DLL initialisation, I get the gist of how this is done based on the locale of the machine. But what is the point of the (American) English module MFC80ENU.DLL ? Doesn't one get English from MFC80.DLL itself? Dave -- David Webber Author MOZART the music processor for Windows - http://www.mozart.co.uk For discussion/support see http://www.mozart.co.uk/mzusers/mailinglist.htm Hi David, I've never had to put together the list of ...

Static Dll vs Shared Dll
Hi, In the past I have always used Static link in the belief that whenever I created an exe I did not have to check that the user had anything installed on their computer, (any special dll that are on my machine but might not be on anybody else). It made the exe itself a lot bigger but it never really was a problem as my data files takes 99.9% of the size anyway. But now I created a new project, (for something totally different), and I get link errors when building statically, (but not when I link shared). I have 2 projects, one lib and the other is an exe, as usual I selected "Us...

Release build exe has MFC71D.dll, MSVCR71D.dll and MSVCP71d.dll dependency
HI, I have a MFC aplication created using VC++.NET 2003. When I compile in Release mode and check the exe dependency in dependency walker it shows the exe has dependency on MFC71D.dll, MSVCR71D.dll and MSVCP71d.dll. I have disabled all the debug info in the release configuration settings. Any help would be appreciated. Sandy ...

Add timer to a dll
I have a regular MFC dll. I want to add a time to the application class. Is it possible and how? Regards galia You can't. But see my essay on adding a WM_TIMER event to a document. What you have to do is create an invisible top-level window and send it messages. joe On Wed, 10 Oct 2007 15:06:19 +0200, "Galia" <galia@mandi.com> wrote: >I have a regular MFC dll. I want to add a time to the application class. Is >it possible and how? >Regards > >galia > > Joseph M. Newcomer [MVP] email: newcomer@flounder.com Web: http://www.flounder.com MVP...

Need help: Client found response content type of '', but expected 'text/xml' after simple SDK call.
I am exploring the CRM SDK (1.2) (on MS CRM v1.2) and tried a very basic operation, which I copied from Microsoft's samples. The following piece of code throws an exception: string server = "server2"; string virtualdir = "mscrmservices"; string url = "http://"+server+"/"+virtualdir+"/"; Microsoft.Crm.Platform.Proxy.BizUser bizUser = new Microsoft.Crm.Platform.Proxy.BizUser (); bizUser.Credentials = System.Net.CredentialCache.DefaultCredentials; bizUser.Url = url + "BizUser.srf"; Microsoft.Crm.Platform.Proxy.CUserAuth userAuth ...

integrate phone call activities to outlook
Those cusotmers that rely on Outlook for managing their CRM activities (which is the direction Microsoft is going, which is great) do not use phone call activities in CRM because these do not integrate into outlook tasks and they do not get reminders on those. It would be great to have a configuration option to enable CRM Phone Call Activity to Outlook task integration (a future phone call is a task after all) in addition to Task to Task integration. Thanks, Sergei ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. ...

dll cross-compatability
Hi, We will be starting a new project shortly, and as hard as I've tried to talk them out of it, they are using C# as the language. We have decided to do code blocks as dlls, for example, we may have a series of custom controls in a dll. I need to know if I write those custom controls in VC++ and create a dll, will the dll be usable from an application that was written in C# ? How can this be achieved (if possible) ? TIA. Several answers. (a) C# can call DLLs. In principle there should be no problem. In fact, you end up with some issues dealing with data structures, and th...

Phone call resolution
Is there a way to modify the Status picklist when you go to Actions, Close Phone call in a phone call activity? TIA ...

CButton with Icon in DLL Problem
I have some code that I used in VC++ 6.0 for an app. Now I have a VS.NET 2003 and things aren't all working for one of my DLLs. I have a CDialogBar derived class with buttons on it. This class, and icons, are stored in a DLL. With VC++ 6, I used this code to put the icons on the dialog bar, but that doesn't seem to work now. Can anybody help me out? HINSTANCE hInstResource = AfxFindResourceHandle(MAKEINTRESOURCE(IDI_GRAPHIC_BIN), RT_GROUP_ICON); HICON icon = ::LoadIcon(hInstResource, MAKEINTRESOURCE(IDI_GRAPHIC_BIN)); ((CButton *)GetDlgItem(IDC_GRAPHIC_BIN))->SetIcon(icon); --...

Debugging DLL
I have a DLL created using MFC and an application that uses it. I'm trying to debug the DLL by running the application in debug mode, and setting breakpoints in the DLL code, but it says "XXXX does not contain any debugging information ... " when it definitely does! Any suggestions? Use your DLL's project settings and set the "Executable for debug session" to your application path. Then start the debug process. You can breakpoint anywhere inside your DLL (as long as you're in debug build). If you want to step into EXE's sources you should build it in ...

OMINT.DLL
I upgraded ME system to Win2K and ended up with OL Express and Outlook not working. One says there is a problem with OMINT.DLL (which Microsoft website refers to a corrupt/missing OUTLIB.DLL) and the other refers to a problem with MSIMN.EXE. I have been unable to find a fix for either. Does anyone have a clue as to what I need to do? I tried to reload Office 2K and get an error message referring to inaccurate TRANSFORMS. Thanks in advance. ...

How to trap PreTranslateMessage in Win32 (non-MFC) app?
How do you trap PreTranslateMessage in a Win32 (non-MFC) app? I have an existing MFC class called CCustomEditCtrl that I have to convert to pure Win32. I am doing some processing in it's PreTranslateMessage event. Can someone tell me where to put this code in the Win32 version? Do I hvae to trap some WM_ event ? Thanks. Jeff, You would just handle the messages in the control window function. If you want to do something before all other messages, take care of it towards the top of the window function. In pseudo-code: control_function() { // You can, for example, add your proces...

OnClose() is not called!
I have a Dialog-based application and when I press the escape key OnClose() is not calledQ But when I click on the close button it works. What message is fired when I close the dialog with escape? -- cody [Freeware, Games and Humor] www.deutronium.de.vu || www.deutronium.tk codymanix In a dialog box, the escape key generates the WM_KEYDOWN with a WPARAM of 0x1b (ASCII code for ESC key). Somewhere in the internals of windows message processing (most likely IsDialogMessage handler) the ESC key is changed into a WM_COMMAND message from control with DLG ID of 2 (same as IDCANCEL). The MFC...

Is there a way to "mangle" names of exported classes in a DLL
I have a DLL with some exported classes. When I view the DLL in a tool like Depends.exe, all the class names and member names are displayed in plain text. This poses a security risk because some of my classes are named CEncryptor, CSerialNumberChecker etc. Is there a way to mangle the names in such a way that my application can still use the DLL with actual class names, but other utilities (depends etc.) cannot view them? Thanks, If you are really concerned about this, provide some unrelated names to your classes. Why worry about mangling it later? Another option is to use GetProcAdd...

Calling Custom POS button
I am having troubles trying to make a call from the custom POS buttons. I think i just have the command syntax wrong in the button setup since the dll works fine when i run it from a hook. In the store operations manager custom pos buttons section i have set the style to COM Object (session object) and have the command as "C:\Documents and Settings\Administrator\My Documents\Visual Studio Projects\VbTest\bin\VbTest.dll.Class1" (which is where the VbTest.dll is located and the class with the process method is called Class1). When i click the button in POS i recieve the Attempt to ex...

MFC dll versions
I am wondering if there is a command line or other quick way to figure out on a target system which MFC dlls they might have installed, and what version. Can I count on the SYSTEM32 folder always being the location? Specifically, I am interested in these four files: mfc80.dll mfc80u.dll mfcm80.dll mfcm80u.dll Thanks for any insight. danielle.m.manning@gmail.com wrote: > I am wondering if there is a command line or other quick way to figure > out on a target system which MFC dlls they might have installed, and > what version. Can I count on the SYSTEM32 folder always being the ...

Cannot find DLL when starting debugging
Sorry for asking this here, but vstudio.general seems to be rather sleepy... Anyway: I have an MFC app which utilizes a 3rd party DLL which is located in its own place on the harddrive. I've tried to put the path to the directory where the DLL can be found in the list under 'Tools', 'Options', 'VC++ Directories', 'Executable Files', but it still can't seem to find the DLL when I try to debug my app. I know I could just copy the DLL to my Debug directory, but ahh that's really clumsy. Isn't there an other way ? :-| Bendik "Bendik E...

Owner draw CListCtrl, EnsureVisible, PreTranslateMessage
There is Owner draw CListCtrl with overriden DrawItem. This class has subitems arbitrary controls (CEdit, CButton...). It should be fine to detect arrows keys in controls to jump with caret in CEdit boxes in one column by pressed arrow key. I tried to catch it in CEdit -> PreTranslateMessage() in block if(pMsg->wParam == VK_UP) then to call EnsureVisible() to parent CListCtrl to be caret always visible and CListCtrl scrolls if needed. Problem is when first time it scrolls up, some infinite loop begins and CPU 100% . It seems that something wrong with this... Can be EnsureVisible(...

pretranslatemessage behaviour
Hi, I have a problem when I press CTRL+ALT+D keys the PreTranslateMessage function is not fired for WM_KEYDOWN, only for WM_KEYUP. Any suggestions? Thanks! Hey Luis, check out this article and see it if helps (talks about disabling that key combination by setting up a hotkey so you get the message instead of the OS) http://www.codeguru.com/Cpp/misc/misc/keyboard/article.php/c433 "Luis Porras" <luis.porras@dakotaimaging.com> wrote in message news:OiUM1tkVFHA.2960@TK2MSFTNGP15.phx.gbl... > Hi, > > I have a problem when I press CTRL+ALT+D keys the PreTranslateM...

Subclassing betwen MFC Application and an Win32 DLL
Hi All, I'm new to MFC programming. 1)How to post messages b\w MFC application and Win32 DLL. When i try to PostMessage(hWndParent,WM_SAMPLEMESSAGE,0,0) to MFC even that is not reaching. 2)I need to know how subclassing can be done between an Win32 DLL and an MFC Application. My Situation is ================ #define WM_APPMESSAGE WM_APP+10 In DLL_PROCESS_ATTACH i will do subclassing and modify the WM_APPMESSAGE Message posted by an thread and will give it to the main Application for further processing. This case works perfectly with an win32 application. When i try to do the same t...

MFC Satellite DLLs mfc80xxx.dll for Greek language
Hello We have some applications that were built with Visual Studio 8.0 and use MFC as static DLLs. I want to adapt the user interface to Greek language. For English, French, Chinese and so on we have the correspondent Satellite DLLs corresponding to MFC80U.dll etc. to accomplish that. But for the Greek language I have not yet found a correspondent Satellite DLL. Questions 1 – Are there already satellite DLLs for the adaptation of MFC to a Greek user interface? 2 – If not, are there templates or similar tools that allow me to create the necessary DLLs with low effort 3 – Are th...