Click here to Skip to main content
15,890,512 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionrun a console app from MFC or Windows Forms Pin
smargada18-Nov-05 14:46
smargada18-Nov-05 14:46 
AnswerRe: run a console app from MFC or Windows Forms Pin
Gary R. Wheeler20-Nov-05 6:58
Gary R. Wheeler20-Nov-05 6:58 
QuestionMenu Items won't come up gray Pin
BuckBrown18-Nov-05 7:42
BuckBrown18-Nov-05 7:42 
AnswerRe: Menu Items won't come up gray Pin
Maximilien18-Nov-05 7:54
Maximilien18-Nov-05 7:54 
GeneralRe: Menu Items won't come up gray Pin
BuckBrown18-Nov-05 10:24
BuckBrown18-Nov-05 10:24 
QuestionReceiving Msgs from Chat Client Pin
legendaryhwk18-Nov-05 5:40
legendaryhwk18-Nov-05 5:40 
Questionhow can we dial server database from client application Pin
sheerprogrammer18-Nov-05 5:19
sheerprogrammer18-Nov-05 5:19 
QuestionDouble winmains,..kind of... Pin
Karl Josefsson18-Nov-05 5:07
Karl Josefsson18-Nov-05 5:07 
Hi everyone,

I'm working on an application that I'm trying to migrate from using a useless lib that is inspired from MFC to only use MFC, but I do not want to rewrite the whole application as I dont have time for that, atleast not now.

Problem is that this library exposes a WinMain-method and the application has it's own CWinApp-kind-of-class.
Problem is the following, I want to be able to use a proper CWinApp as parent with everything that comes with it, such as messages and windows etc.
Currently, this class is derived from CWinApp aswell as a similar class within the lib.
Only problem is that some messages are not routed as they should.
In this case, we're talking about WM_KEYDOWN.
I've looked in WinMain from this lib, and it traps the WM_KEYDOWN and it calls IsDialogMessage that is supposed to route the message. I've checked the hwnd and compared it with what I found in Spy++, and the window that it's routing this message to is the one I want, I.e. my mainframe, but the message never arrives in the msgloop, nor on a normal ON_xxx nor in PreTranslate within the mainframe.

So, question is:
Is there something I can do to ensure that all messages are routed? I've got a feeling that there's a missing thread or a thread where the object is created but not the actual thread, hence no messagepump.
I know this isnt very clear, so please flame me with details that's missing.
QuestionHow can I set property in edit box to accept only Decimal number Pin
Loc Milkyway18-Nov-05 5:02
Loc Milkyway18-Nov-05 5:02 
AnswerRe: How can I set property in edit box to accept only Decimal number Pin
legendaryhwk18-Nov-05 6:18
legendaryhwk18-Nov-05 6:18 
GeneralRe: How can I set property in edit box to accept only Decimal number Pin
Loc Milkyway18-Nov-05 7:43
Loc Milkyway18-Nov-05 7:43 
AnswerRe: How can I set property in edit box to accept only Decimal number Pin
toxcct18-Nov-05 7:05
toxcct18-Nov-05 7:05 
GeneralRe: How can I set property in edit box to accept only Decimal number Pin
Loc Milkyway18-Nov-05 9:01
Loc Milkyway18-Nov-05 9:01 
GeneralRe: How can I set property in edit box to accept only Decimal number Pin
toxcct18-Nov-05 23:06
toxcct18-Nov-05 23:06 
AnswerRe: How can I set property in edit box to accept only Decimal number Pin
Rick York19-Nov-05 7:49
mveRick York19-Nov-05 7:49 
Question_AFX_MAIL_STATE with dynamicly linked MFC dll Pin
lynchspawn18-Nov-05 3:36
lynchspawn18-Nov-05 3:36 
QuestionMigrating to managed C++ Pin
Jim Crafton18-Nov-05 3:32
Jim Crafton18-Nov-05 3:32 
AnswerRe: Migrating to managed C++ Pin
Nish Nishant18-Nov-05 9:19
sitebuilderNish Nishant18-Nov-05 9:19 
GeneralRe: Migrating to managed C++ Pin
Jim Crafton18-Nov-05 9:26
Jim Crafton18-Nov-05 9:26 
AnswerRe: Migrating to managed C++ Pin
cmk18-Nov-05 13:00
cmk18-Nov-05 13:00 
GeneralRe: Migrating to managed C++ Pin
Jim Crafton19-Nov-05 5:22
Jim Crafton19-Nov-05 5:22 
GeneralRe: Migrating to managed C++ Pin
Gary R. Wheeler19-Nov-05 5:53
Gary R. Wheeler19-Nov-05 5:53 
QuestionReading ext2 file system of Linex Pin
Aqueel18-Nov-05 3:04
Aqueel18-Nov-05 3:04 
AnswerRe: Reading ext2 file system of Linex Pin
kakan18-Nov-05 3:14
professionalkakan18-Nov-05 3:14 
QuestionC99 with VC6 Pin
hssaroch18-Nov-05 2:14
hssaroch18-Nov-05 2:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.