|
thanks, sounds interesting!
Can I ask what for you used it.. what have you done with your nested dialogs?
|
|
|
|
|
Context sensitive part of a form.
You select a communitication protocol in the main part and get protocol specific parameters in the nested parts.
Also when a new protocol is added, only the nested dialog needs to be created.
Pavel
Sonork 100.15206
|
|
|
|
|
thanks
|
|
|
|
|
hi
i have a main Window. and i have some CWnd Objects in it. when i am moveing mouse over the main window the OnMouseMove in the main window is work properly. but even i go over that CWnd object the OnMouseMove of the main windows don't work any more.
how can i Define OnMouseMove for Each CWnd Objects ? or How can i Disable OnMouseMove for each CWnd ? or how can i Set Focus that the CWnd Childs don't get Focus anymore!
|
|
|
|
|
one way is useing this function : CWnd* SetCapture( );
but it locks all buttons and other Windows.
How can i set that the Childs don't get Focus anymore ?
|
|
|
|
|
How can I use a CFormView in a CDialog...
it should be like a "child control" of the dialog. Thanks!
|
|
|
|
|
|
okie... I try to describe what I want to do( rather then using some expressions I don't understand). I'll post a new message "Dialog in a Dialog"
|
|
|
|
|
Nishant S wrote:
A CFormView is actually a dialog inside a view and now you wanna put this inside a CDialog eh? Geez!
yes but it has scrollbars when you make it too small to show everything. Can you use a CFormView as a standalone dialog?
|
|
|
|
|
hi guys, I have a CALLBACK function whose prototype is LRESULT CALLBACK MouseProc(int nCode, WPARAM wParam, LPARAM lparam);
how do I get the ProcAdress associated with this function, I tried:
HOOKPROC hookproc = (HOOKPROC)GetProcAddress(NULL, "MouseProc");
and
HOOKPROC hookproc = (HOOKPROC)GetProcAddress(hInstance, "MouseProc");
both returned 0. what's the right way of doing it?
thanks a thousand
|
|
|
|
|
It looks as though you are trying to get the address of a function within your current project. If so, just:
HOOKPROC hookproc = MouseProc;
If it is in another module, then you should call GetModuleHandleEx() before calling GetProcAddress(). You need a valid HMODULE to pass into GetProcAddress().
Cheers
|
|
|
|
|
thanks that helped. I have another question: how do I get a mouse_pressed_down message in my MouseProc function, I can get the mouse coordinates, I want to be able to detect a press on the desktop, not on any particular window. would you provide me with some details? thanks
LRESULT CALLBACK MouseProc(int nCode, WPARAM wParam, LPARAM lparam){
MOUSEHOOKSTRUCT* mousehook=(MOUSEHOOKSTRUCT*)lparam;
POINT p=mousehook->pt;
char temp[20];
sprintf(temp,"mouse position is %d %d\0",p.x,p.y);
MessageBox(hWnd,temp,"",MB_OK);
return -1;
}
|
|
|
|
|
If you mean a message like WM_LBUTTONDOWN, just look for it in the wParam of your MouseProc. Regarding hooking the desktop window, I have only hooked app windows, so I recommend you tinker to find out. It might be useful to know that the desktop is the absolute top of the window hierarchy, and has no handle (many functions take a NULL hWnd to signify the desktop). Beware that it seems you might have to do global hooking to accomplish this, which should not be done for extended periods, as the entire system would be negatively affected. Don't be surprised if you have to reboot several times while experimenting!
Cheers
|
|
|
|
|
Hello!
Maybe somebody know method to create VS.NET-like docking windows and toolbars using standard
windows controls or COM-objects. I know, that explorer-bar is a COM-object. That's why I suppose that this windows and toolbars could be a COM-objects.
Thanx!
|
|
|
|
|
|
Hi all,
I'm using SAPI 5.1 to develop a text-to-speech application. What I want to do is to be able to asynchronously output spoken text to a wave file and to be notified when that wave file is finished being written. I have set up an event handler using the following calls (with error checking removed):
m_pVoice->SetInterest(SPFEI_ALL_TTS_EVENTS, SPFEI_ALL_TTS_EVENTS);
m_pVoice->SetNotifyWindowMessage(hWnd, UWM_TTSEVENT, 0, 0);
The m_pVoice variable is of type CComPtr<ispvoice>. In order to speak to a wave file, I use a CComPtr<ispstream> object that is bound to a file.
I am able to receive events whenever I call m_pVoice->Speak to speak text to a default audio device. However, if I want to speak to a wave file, the UWM_TTSEVENT message never gets fired.
The thing is, I need to know when the file is completed so that I can close it and clean up, and I need to be able to speak to multiple wave files at once.
Is this a SAPI limitation?
Thanks!
--Two Magic Lovers
|
|
|
|
|
For some reason, my code to reverse the order of a string is incorrect. Please help.
void reverse_string(int execute_mode, char * sPtr){
if (!execute_mode)
cout << "Reverse the order of characters in the current string\n";
else {
int len = strlen(sPtr);
char * ePtr = sPtr+len-1;
for (int i = 0; i < len; i++)
swap(sPtr+i, ePtr-i);
}
}
|
|
|
|
|
|
Let me guess, you end up with exactly the same string that you put in?
The problem is this:
s+i = e - len
e-i = s + len
Therefore when you reach len/2, your string should be completely reversed, however you continue to swap from len/2 to len which basically swaps all of the strings back to their position.
Good Luck
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|
|
This isn't homework is it?
Jason Henderson start page ; articles
henderson is coming
henderson is an opponent's worst nightmare
* googlism *
|
|
|
|
|
Even if is was, give him credit for following the forum guidelines. He tried on his own first and made some progress, but got stuck and came here. He posted what code he had so far, which shows that he didn't expect someone else to do his work for him.
--Mike--
If it doesn't move and it should: WD-40. If it moves and it shouldn't: duct tape.
1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click!
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
I have several buttons in a dialog based program. I want to be able to click or press enter on one button and have the focus move to another button. I have gotten the focus to move using:
GetDlgItem(BUTTON_NAME)->SetFocus();
However when I press enter the nothing happens because the button isn't highlighted.
How can I fix this?
Could I fix the problem by setting the default button instead of changing the focus. If so, how would I do that?
|
|
|
|
|
SendDlgItemMessage(hDlg, <ID of current default push button>,
BM_SETSTYLE, BS_PUSHBUTTON, (LONG)TRUE);
SendMessage(hDlg, DM_SETDEFID, <ID of new default push button>,0L);
SendDlgItemMessage(hDlg, <ID of new default push button>,
BM_SETSTYLE, BS_DEFPUSHBUTTON, (LONG)TRUE);
Try this code. DEFPUSHBUTTON is what you need to change, no the focus.
Tim Smith
I'm going to patent thought. I have yet to see any prior art.
|
|
|
|
|
Your suggestion worked with the following changes.
1) The functions do not take the hDlg parameter.
2) SetFocus() is needed to point the keyboard to the default button.
The revised code follows:
SendDlgItemMessage(<ID of current default pushbutton>, BM_SETSTYLE, BS_PUSHBUTTON, (LONG)TRUE);<br />
SendMessage(DM_SETDEFID, (<ID of new default pushbutton>, 0L); <br />
SendDlgItemMessage(<ID of new default pushbutton>, BM_SETSTYLE, BS_DEFPUSHBUTTON, (LONG)TRUE);<br />
GetDlgItem(<ID of new default pushbutton>)->SetFocus();
|
|
|
|
|
Excuse me is there any ActiveX for Control the Bitmaps or Images and Draw them or it can change the position of images ???
something for managing images.
if u want to know what i am going to do plz See this AVL tree :
http://www.seanet.com/users/arsen/avltree.html[^]
regards
|
|
|
|