|
I'm getting the handle of a MFC app with FindWindow and I can send messages to it's main window, but I would like to send a WM_COMMAND message with an ID that is currently disabled in the app.
The problem is that MFC catches such messages. Is it possible to either override the update handlers of an other app or force a WM_COMMAND message?
Thanks
|
|
|
|
|
ABuenger wrote: he problem is that MFC catches such messages. Is it possible to either override the update handlers of an other app or force a WM_COMMAND message?
IMHO, This is little Difficult, you have hook that Window for the Message.. you can overide update functionality for that Control!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
ABuenger wrote: he problem is that MFC catches such messages. Is it possible to either override the update handlers of an other app or force a WM_COMMAND message?
Sorry you cannot hook that Update Function.. as MFC itself post that message!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
I've just finished the first pass on Lippman fourth edition. The best intro to C++ that I have read out of four or five books. I think that I actually am starting to understand this stuff. I'm currently reading Llopis "C++ for Game Programmers" that I picked up cheap and then I plan to re-read Lippman and do all the exercises next.
What book would you guys recommend for C++ and Game Programming after that?
My ideal book on C++ and Game Programming would include:
* not too much basic cpp stuff
* strong on game design preferably for FPS / strategy / RPG / RTS / Space Games (X2, X3 & Freelancer clones)
* strong on C++ not C (La Mothe is great but it's more C than C++)
* lots of code
* extended examples
* interfacing with engines: Q3, Crystal Space, whatever
Okay, that may be a tall order, but is there anything that even comes close? has some of the above?
|
|
|
|
|
brett54321 wrote: * strong on C++ not C (La Mothe is great but it's more C than C++)
Effective C++ by Scott Meyers
|
|
|
|
|
You might get more out of writing some code.
earl
|
|
|
|
|
brett54321 wrote: strong on C++ not C (La Mothe is great but it's more C than C++)
'The C++ Programming language' by Bjarne Stroustrup. I'd frankly not trust any other book to teach C++ instead of C, especially when it comes to strings, etc.
You should be doing the exercises on the first pass, IMO.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
'Lo again
thanks for the replies. I'm def. planning on doing all the exercises in Lippman next time round (in a couple of days) - I did do them for the first few chapters.
Meyers and Stroustrup are on my list of recommended books so I'll check them out in Waterstones.
I think for now that I'll finish Llopis, reread Lippman and do all the exercises, then take it from there. Prob. start writing some code
cheers...
|
|
|
|
|
brett54321 wrote: Read Lippman C++ Primer - what next?
Implement same !
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
What am I missing to show a BMP correclty using the CStatic variable assigned to a Picture Control through MFC...
BITMAP test;
CBitmap m_bitmap;
HBITMAP m_hbitmap;
m_bitmap.LoadBitmap(IDB_BITMAP1);
m_bitmap.GetBitmap(&test);
m_hbitmap = m_bitmap.operator HBITMAP();
m_S1S2_Arrow.MoveWindow(40,50,test.bmWidth,test.bmHeight,1);
m_S1S2_Arrow.SetBitmap(m_hbitmap);
m_S1S2.Arrow.ShowWindow(1);
I would presume that the BMP would be loaded in and shown at this point, but I get nothing back. Any ideas would be great. Thanks so much.
|
|
|
|
|
Does this help?
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
I am not trying to draw a button, I am simply trying to load a bitmap on a screen to show them things.
Instead of having 20 variables each with only 1 BMP that it shows, I want to be able to have 3 or 4 and have them be able to switch to different BMPs to load up. However, when I do that and call the ShowWindow(1) function, nothing happens.
|
|
|
|
|
I'm (yes, finally) going to give GMail a try.
Can someone send me an invitation?
Thanks
Warren
|
|
|
|
|
|
toxcct wrote: (i say it explicitely so that you don't receive tons of invitations )
but from where you get his EMail address???
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
|
toxcct wrote: do you see the little [Email] link at the bottom of each post ?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
toxcct wrote: do you see the little [Email] link at the bottom of each post ?
But it doesn't contain the Email of that author there
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
|
toxcct wrote: not anymore, but i sent him mine without anybody can see it
oops you giving invitation to spam.. beware!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
|
Warren D Stevens wrote: Can someone send me an invitation?
there used to be gmail invite forum here! but it no more! so you don't get any email invite frm here!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
This is what I did to download a gif image from codeproject but ::recv will return after about a minute and return 0, can you help me out? I have not posted the whole code but everything goes fine except when it reaches ::recv
sockaddr_in server = {0};
pHostent = ::gethostbyname(_T("www.codeproject.com"));
server.sin_family = AF_INET;
server.sin_port = ::htons(80);
server.sin_addr = *(in_addr *) pHostent->h_addr;
nErrorTest = ::connect(socket, (SOCKADDR *) &server, sizeof(server));
::_stprintf(szSendData, _T("GET /info/stuff/codeproject_w2k_bg.gif\r\n"));
nErrorTest = ::send(socket, szSendData, ::lstrlen(szSendData), 0);
nErrorTest = ::recv(socket, szRecvData, sizeof(szRecvData), 0);
|
|
|
|
|
Asesh wrote: ::_stprintf(szSendData, _T("GET /info/stuff/codeproject_w2k_bg.gif\r\n"));
That is not a valid HTTP request. Try using the WinInet API or the MFC wrappers for it. They will keep you from having to deal with much of the protocol level coding.
|
|
|
|
|