|
What is the relationship between the two dialogs? Are they siblings? Does one "own" the other? Are they both modal?
"Talent without discipline is like an octopus on roller skates. There's plenty of movement, but you never know if it's going to be forward, backwards, or sideways." - H. Jackson Brown, Jr.
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
The two dialog boxes are modal dialog boxes
|
|
|
|
|
///////if your main class is CMainDlg In another dialog you can use
<br />
#include "MainDlg.h"<br />
CMainDlg *m_Main=GetParent();<br />
m_Main->Yourfunction();<br />
|
|
|
|
|
Hey guys,
My name is Danny and I am working on a project using MFC based dialog and property pages. This question may sound really dumb, but I've added a key down handler for a property page I'm working on and for love or money I can't seem to get it to respond. I've thrown brake points everywhere and I can't get it to respond.
Are there any suggestions out there?
Thanks Guys.
Danny Nowlan
|
|
|
|
|
Map the WM_KEYDOWN message there you wil get which key is being pressed
Rinu Raj
|
|
|
|
|
|
Hi,
I'm using the OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult) method to find out when a user uses a scrollbar. Except I'm not sure what to be checking lParam against. I've casted lParam to be a NMHDR*, but when I check the value of pNMHDR->code, it's usually 0xFFFFFFF4.
Can anyone tell me what xxxxx should be in the following line?
BOOL CBaseFormView::OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult) <br />
{<br />
NMHDR* pNMHDR = (NMHDR*)lParam;<br />
<br />
if(pNMHDR->code == xxxxx) <br />
{<br />
}<br />
}
Or can someone tell me if I'm going about this the wrong way?
Thanks,
skyapie
|
|
|
|
|
You will get control at OnVScroll() OnHScroll() when the suer scrolls the scrol bar
Rinu Raj
|
|
|
|
|
That will work if the scrollbar is for the view, not for a list control or list box in the view...
|
|
|
|
|
skyapie wrote: I'm using the OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult) method to find out when a user uses a scrollbar
If this scrollbar is of this view only then it will not send WM_NOTIFY message. Handle WM_VSCROLL message
skyapie wrote: BOOL CBaseFormView::OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult)
{
NMHDR* pNMHDR = (NMHDR*)lParam;
if(pNMHDR->code == xxxxx)
{
//Do stuff
}
}
This code will work , if you want to handle scrolling of child window of this view, lets say scrolling in listcontrol present as child of this view.
|
|
|
|
|
Hi !
I'm compiling my project with warnings at level 3. I didn't change any warning-behavior with #pragma.
The problem is that I get many warning C4100 (unreferenced formal parameter) because of included headers. How can I get rid of these warnings for which I cannot do anything anyway ?
(btw : I've seen somewhere that warning C4100 is level 4, but it occurs at level 3, that's strange ! any hint about this ?)
Thanks for your help !
Jerome
|
|
|
|
|
|
You just want to disable th ewarning right use #pragma
#pragma warning( disable: 4100 )
Is that not working ???
Rinu Raj
|
|
|
|
|
Which IDE are you using ? IF you use VC2005, there is an option in project properties that lets you disable specific warnings. Go in 'C/C++' -> 'Advanced' -> 'Disable specific warnings'. Put the warning number (without the 'C').
And don't know if this feature exists in VC6 (I already searched for it but couldn't find it). I don't know for VC2003 (never used it).
using pragma won't help I suppose because you probably don't want to modify these header files. And they probably don't include stdafx.h.
|
|
|
|
|
Cedric Moonen wrote: using pragma won't help I suppose because you probably don't want to modify these header files. And they probably don't include stdafx.h
but he can always do this :
#pragma warning(disable:4100)
#include "the_header.h"
#pragma warning(default:4100)
|
|
|
|
|
Sure. But if he needs to include that file in several places, this can be a pain...
|
|
|
|
|
How to remove or changing from the default color to required color of the splitterbar between two panes?
|
|
|
|
|
See here[^] maybe it is some helpful to you
|
|
|
|
|
I didnt find any useful info there
|
|
|
|
|
Is there any equivalent to sprintf() & co. for STL-Strings ? I really don't want to use a buffer to work around that.
|
|
|
|
|
For anyone who is interested, i found a good way. I use an ostringstream object to write my formated data to via standard stream operators. Then i use it's member function str() to return me a basic_string :
<br />
string teststring;<br />
ostringstream teststream;<br />
unsigned int testnumber = 1234;<br />
<br />
teststream << "The Number is " << testnumber << " !!!!" << endl;<br />
<br />
teststring = teststream.str();<br />
<br />
cout << teststring;<br />
|
|
|
|
|
Check out the Boost[^] library - it includes an excellent formatting class called boost::format .
Kicking squealing Gucci little piggy.
|
|
|
|
|
hi,
I am using keyboard to simulate mouse
GetCursorPos
SetCursorPos
function, and I'd like to ask
how can I simulate Click
(even into window doesn't belonging to my process)
thank you
Viliam
viliam
|
|
|
|
|
SendMessage - you can send the click messages to the window.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
thankx I'll try
do you know how to find windows handle for current mouse position
(to send message to)
thank you
viliam
|
|
|
|