|
Its need handle of window.
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
I don't see why you need that but it is called m_hWnd, a member of CWnd which is among the superclasses of your main window.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <
|
|
|
|
|
Thanks
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
Hello,
I have an application that sends SMS to several clients, one by one. I am using EDGE modem and AT commands for this purpose.
My problem is that the application sometimes (not always) fails to send few SMSs (some of my clients complain that they didn't get any SMS). Can anyone tell me why this happens? Or, how can I read the SMS sent-status?
Thanks
|
|
|
|
|
Using VC6++, I created a little dialog based test application with the app wizard.
I have a tab control which shows several tabs. Swapping between the individual tabs works fine.
The content of the tabs consists of dialogs which I have derived from CDialog - hence they have an ESC /CANCEL and OK/ENTER message handler attached.
My problem is that when the focus sits on any of the tabs (i.e. I can see the chid dialog that the tab displays, then when hitting ESC or ENTER, this content of the child window disappears, because obviously the CDialog OnOK() and OnESC() member functions get called.
My beginners knowledge doesn't allow me to dive a bit deeper into the code to override the corresponding member functions (which I think are onOK() ...etc. is that correct?
Could someone explain (and ideally post some lines of code for a beginner), what needs to be done?
Many thanks.
|
|
|
|
|
|
Dear Cédric,
Many thanks for your prompt and efficient help.
As you can see I am new to all this, but now that I know about the FAQ section, I will check that first.
Many thanks again. Problem solved.
|
|
|
|
|
Its good site for you,you can find new things about MFC/C++.http://www.functionx.com/[^]
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
Hello
Suppose a directx based game(like nfs) is running. I want to grab the buffer which is shown in desktop(all frame). Actually the scenerio is like that: Game's Front buffer will capture by my application then modify this buffer(like my own text will add) and finally display my own buffer data as a game.
Does anybody have some ideas how to do this? If any ideas please let me know.
Regards
Kallol Kumar
|
|
|
|
|
My first guess would be to try to hook some DirectX api calls and modify parameters or store them for your own usage so you can get access to that surface.
p.s: What are you working on, why do you need to access other game's DirectX surfaces, if i may ask?
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <
modified on Thursday, March 5, 2009 4:53 AM
|
|
|
|
|
Thanks for your valuable reply. Actually I thought hooking may be a solution. But I have never implemented this. Thats why I need to comfirm and need clarification about any other idea.
Anyway, now I am working with "3D Vision". My company website is www.vmclbd.com. We have provided this technology for a japanese company named Digital Amuse(http://www.dams.co.jp/). You can also find our 3D vision related video in youtube (http://www.youtube.com/watch?v=gjZxqPYLcp4). Actually at this moment only our own contents will convert 3D view. Our next goal to convert game or other 3rd party content to make 3D visualization.
Anyway Have you worked with hooking? Thanks again for your help.
Kallol Kumar
kallol.kumar@hotmail.com
|
|
|
|
|
Well, i did hook a few simple methods here and there once or twice, but nothing too serious. I'd recommend checking out this[^] valuable article, it is a good place to start learning about hooking methods. If i understand correctly then you are trying to catch the backsurface before it gets presented to the user...if so, i would try looking into IDirect3DDevice9::Present[^] and see if i can hook anything there...you could also try to hook the methods which query for the device-interface and provide your own version (of interface implementation) which sits between the software and the original device interface as a proxy and does its workings when needed...these are just ideas...
This seems to be an interesting task you are doing.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <
|
|
|
|
|
Hi,
I made HTML Help for every topics of my applicaiton.
I want to get help form all dialog,but it refersa single help file,but depends on dialog it shows the topic..So i coded for that.
My coding is here
BOOL CDisturbance::OnHelpInfo(HELPINFO* pHelpInfo)
{
HWND hwnd = GetSafeHwnd();
CString Path = gsInstallPath + "\\esim\\help" + "\\";
CString HFName = "IStation.chm";
CString Folder= Path + HFName;
HtmlHelp(0, Folder, HH_DISPLAY_TOPIC, ByVal "Disturbance.htm");
return TRUE;
}
I found this code from net as article,
But when i compile,it shows undeclared identifier for Htmlhelp.
SO tht i include
#include <htmlhelp> and i add htmlhelp.lib in project settings.
But where can i get htmlhelp.h file?
Anu
|
|
|
|
|
Did you see MSDN "CWnd::HtmlHelp" and its header is "afxwin.h" whats your compiler?
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
Anu_Bala wrote: But where can i get htmlhelp.h file?
See here Html help[^].
You need to install the heml help workshop and add the include and lib paths to your VC++ directories.
I hope it helps.
Regards,
Sandip.
|
|
|
|
|
Thank u..I got the file.
Anu
|
|
|
|
|
But i couldnot get the particular topic..
Pls any one help me the sample coding for htmlhelp API.
Anu
|
|
|
|
|
Anu_Bala wrote: Pls any one help me the sample coding for htmlhelp API
See here[^]
I hope it helps.
Regards,
Sandip.
|
|
|
|
|
Hi,
My project contains an ATL dialog and the dialog has many CWnd objects as children. I am representing the Cwnd objects by bitmap images. Now when some other window or tooltip hovers over the CWnd objects, they are erased. Also they do not get any erasebkgnd messages. The parent dialog gets erasebkgnd but it does not solve the problem.
The same problem occurs when we hide the tooltip. The area of the CWnd which the tooltip covers is erased. Any solution of this?
|
|
|
|
|
I am not sure if I fully understood your question but if you are painting things on a window (for instance bitmap images), you need to do that each time you receive the WM_PAINT message. Otherwise, your window is cleared and you do not draw anything in this handler, which means everything disappear.
|
|
|
|
|
May be needs something like "InvalidateRect" ?
He never answers anyone who replies to him. I've taken to calling him a retard, which is not fair to retards everywhere.-Christian Graus
|
|
|
|
|
Probably not. Because a paint message is sent when your window is covered by another window (at the time it reappear) and calling InvalidateRect also ends up sending a WM_PAINT message. Thus if it doesn't work when your window is hidden, it won't work just by calling InvalidateRect.
|
|
|
|
|
The dialog which i was speaking about is only one of the page of the application. And OnPaint method for the same is not defined for the Dialog. I tried handling the message myself. In that case I was able to paint my CWnd objects there, but as I don't know how to paint the Dialog (The code of the dialog is not by me), I end up in painting only half of the things. So I can not handle the WM_PAINT message for the dialog.
And when other window hovers over my application, my CWnd object does not receive any messages.
|
|
|
|
|
1/
whatever17 wrote: And OnPaint method for the same is not defined for the Dialog
It's defined if you put it there. CDialog inherits from CWnd, and can handle any window message you ask it to. Just because a method is not put in for... does not mean you can't put it in for yourself. Don;t forget to add ON_PAINT to your message map.
2/
OK, I only had one real point. Erm...
3/
See 2.
4/
Now I remember!
whatever17 wrote:
And when other window hovers over my application, my CWnd object does not receive any messages.
Well, what messages did you expect to receive? WM_YEP_STILLQUIETOUTTHERE? Your window is covered up. It's not receiving any keyboard or mouse input, and not needing to redraw. Unless there are system wide messages to do with system changes, or you've set a timer, there's really not much for you to respond to.
Have a look under the dialog / windows section of codeproject for all sorts of articles on technicolour odd shaped dialogs. They've done it already - steal their work without paying! It's what we're here for...
Iain.
Codeproject MVP for C++, I can't believe it's for my lounge posts...
|
|
|
|
|
Okay I think I was not clear enough in the last post. Still I had mentioned that the code of the dialog is not by me. It contains many other things than the CWnd objects which I want to show on it. Also WM_PAINT is not handled. I already tried handling WM_PAINT myself, which was working for my CWnd objects. But as the dialog contains many other things which are not mine, I don't know how to paint those. Hopefully you will read it this time.
And about the other thing, I was expecting that the CWnd objects will receive WM_ERASEBKGND message, which now I am not sure about.
Thanks.
|
|
|
|