|
RegisterWindowMessage()
SendMessage()
Alternately, set up a list of classes to notify (add to the list on dialog creation, remove from it on deletion), and just call a method on each when the time to update comes around.
---
the work, which will become a new genre unto itself, will be called...
|
|
|
|
|
Make sure the dialogs you popup has the mainframe as the parent window, after catching the event in the mainframe forward the message to all the descendent using this api
SendMessageToDescendants(...)
"When death smiles at you, only thing you can do is smile back at it" - Russel Crowe (Gladiator)
|
|
|
|
|
thanks but, I surely not explain well, so :
I have an MFC App, with :
- a CMyToolBar derived from CToolBar which contain a Button (PastDate)
- the View contain a Property Sheet with 3 Property Pages (CHoraire,...) which contains 3 Grids (CGridCtrl from C. Maunder)
- the ON_COMMAND of the PastDate button is done in CMainFrame.
What I want is :
when I click on the PastDate button , it has to change the data shown in the grids.
But how ???
I tried the ::PostMessage(HWND_BROADCAST, MY_MESSAGE,...)
but I have a link Error.
Thanks a loooooooooooooooot
BrutalDeath0
|
|
|
|
|
Since you have handled the message from the toolbar in the main frame, try using SendMessageToDescendants to send it to all the descedants. Or get the handle of the view and send the message to it.
Still Alive!!!
Thank you God.
|
|
|
|
|
In VS 2003, As far as understood I have to open add variable wizard for each new member variable adding and press finish button to add the varible. In VS6 I can add variables without calling wizard at each member variable adding. Is this also possible in VS2003 ?
|
|
|
|
|
Friends,
I am developing front end application using Netmeeting API in the back. I don't want to let user know that i am using netmeeting. But i am unable to get rid of small dialog box that appears while i ask API to dial a number. The dialog box shows the IP address or number i am dialing to. It gives clue that i am using NetMeeting.
Can anyone tell me how to get rid of this dialog.
Thanks.
|
|
|
|
|
Is there any way not to show the busy mouse pointer when memcpy is called? I am calling this function in the loop. Seemingly every time i call this function mouse pointer becomes busy and go back to original status. it is kinda bothering that is what my customer said! Is there any way to avoid this? I am using Vs6 on Windows2000
Thanks in advance
Shin
|
|
|
|
|
This is good joke!!!
well what you do is before you spend HUGE time in MEMCPY , use API SetCursor(IDI_YOUR_CURSOR)
or
use thread so that it wont get jammed in your function..I havent seen your code, so this might be the solution
regards
Balkrishna talele
|
|
|
|
|
Um, memcpy doesn't show the busy mouse pointer. It is a simple routine that just moves bytes. There is another problem with your application.
Tim Smith
I'm going to patent thought. I have yet to see any prior art.
|
|
|
|
|
:-DI downloaded the mails from the pop3 server using pop3 protocol and was able to save the mails in my local folder as a text file,how could i convert the text files into "DBX" format,hope any body has the answer for it.
Sundaram.R
|
|
|
|
|
Hi, I work on my control. I have to use WinAPI (not MFC). I have problem that the control doesnt recieve focus input when I click on it. I checked with Spy++ and I saw that focus recieved the parent dialog and the mouse input my control. Do you know why the control doesnt recieve focus ???
Wizard_01
|
|
|
|
|
HEllo,
Step 1)
BEGIN_MESSAGE_MAP(CMYCLASS)
MESSAGE_HANDLER(OnFocus,WM_SETFOCUS)
.
.
END_MESSAGE_MAP
LRESULT OnFocus(int idCtrl, LPNMHDR pnmh, BOOL& bHandled);
or
Step *)
Just use SetFocus()
or
If you are not getting mosuse events and other focus, then you will have to use message map of NCHITTEST
BEGIN_MESSAGE_MAP(CMYCLASS)
MESSAGE_HANDLER(OnNChitTest,WM_NCHITTEST)
.
.
END_MESSAGE_MAP
LRESULT OnNChitTest(int idCtrl, LPNMHDR pnmh, BOOL& bHandled);
LRESULT CMYCLASS::OnNChitTest(int idCtrl, LPNMHDR pnmh, BOOL& bHandled
{
return HTCLIENT;
}
thats all,
if you didnt solve the problem, send you code to me, I shall try to solve it,
cheers
Balkrishna Talele
|
|
|
|
|
Oh I must use only WinAPI(not MFC). Why WindowProc doesnt revieve WM_SETFOCUS(and key input) when I click in client area and revieve only mouse input ??
Wizard_01
|
|
|
|
|
See if you are Creating some static stuff or Something on Parebt window in SDK or ATL, WinProc will give you only parent focus and mouse event, so you need to explicitly tell him that i want child foucus, so you have to add NCHITTEST which is indeed not MFC stuff....
regards
Balkrishna Talele
"Ask until you dont get satisfaction!!!"
|
|
|
|
|
ok, control return HTCLIENT, but it still doesnt work :/
Wizard_01
|
|
|
|
|
Hello,
Simple and best, if your project is hobby project and not important for your company, just zip the code and send it to me....I shall try to find it out!!!
with the proper commented question WHAT n WHERE
regards
Balkrishna Talele
|
|
|
|
|
I thing that is not good idea It is in pascal. Do not ask why I use that when I have powerful and wonderful language as is C++ . But my teacher on high school dont think so! (((
Wizard_01
|
|
|
|
|
In your WindowProc for your control, handle the WM_LBUTTONDOWN (and/or WM_RBUTTONDOWN) message. Inside that message handler, call SetFocus, passing in the HWND of your control. There may be another way, but I'm not sure of it.
Chris Richardson
|
|
|
|
|
im having problem in crystal report 6 (using DB2 database).
the database was created by our DBA which makes him the owner of the database and tables as well (sample table: DBA.owners_name). i was given an account, PROG_I which gives me minimal authorization to the database (i have to run "set schema DBA" in VC to access/operation with the database). when im trying to print a report file in Crystal report, a message pop-up saying "PROG_I.owners_name" is undefined reference. does anyone give me an approach or technique?... thanks
|
|
|
|
|
Sounds like you will need to edit the report changing the PROG_I.column references to DBA.column references. As far as I know, there isn't a simple way to do this, although in CR7 and later I know you can modify these things at runtime from automation code.
Be much cleaner to edit the reports though.
Steve S
|
|
|
|
|
I am currently working on wrapping a third-party control into a MFC-based .dll. I have gotten used to properties in C# and was wondering if there were any design or implementation issues related to the use of the following within my class to mimic properties in C++.
private int m_Count;
int getCount()
{
return m_Count;
}
void setCount(int i)
{
m_Count = i;
}
__declspec( property( get=getCount, put=setCount ) ) int Count;
- Nick Parker My Blog
|
|
|
|
|
|
Cool, Something new i learned today
"When death smiles at you, only thing you can do is smile back at it" - Russel Crowe (Gladiator)
|
|
|
|
|
Hi All,
I'm looking for a regular expression parser that is fairly easy to use/implement in an MFC program. I've looked at the boost libraries regex++, but it seems like over kill for what I want. Any info is appreciated. Thanks.
- monrobot13
|
|
|
|
|
Here is the problem I am having:
UINT WorkerThread(LPVOID pParam)
{
while (1==1)
{
UpdateData();
//do something
UpdateData(false);
}
return 0;
}
void main()
{
AfxBeginThread(WorkerThread, (LPVOID)this, THREAD_PRIORITY_NORMAL);
}
The UpdateData() function does not work in the Worker Thread. I have researched this quite a bit, and apparantly others were having the same problem. However, no one was able to come up with a straight answer. Anyone know how to use UpdateData() in a worker thread? Any help is appreciated.
-Dev578
|
|
|
|