|
My first guess would be to post a message from CChildView::OnCreate() . In the handler for that message, start your other processing. This is likely to not work, however, if the "other processing" ties up the main thread enough such that it cannot finish rendering the UI.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
After adding various handlers (WM_ACTIVATE & WM_SHOWWINDOW) which just produce trace statments so I can see the order of events. I have come to the conclussion there there are two ways of tackling this... (could be more!)
1) Start a thread in response to a WM_ACTIVATE (with mechanizm to prevent it from being run a 2nd time).
2) Finish off the initialization from the InitInstance() function in the CWinApp derived class.
Do these seem good options?
Out of curiosity how could it be done if was using doc/view?
|
|
|
|
|
Robin Imrie wrote:
Out of curiosity how could it be done if was using doc/view?
Probably in the CView::OnUpdate() method.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
How to delete a directory ?
Thanks...
|
|
|
|
|
you can use SHFileOperation() function to delete a directory
nave
|
|
|
|
|
_rmdir(),RemoveDirectory()
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Hi
i want to send a message to multiple windows,those window have same caption name. is there any way to send a perticular message to those windows only.firstly i wanted to use FindWindow then using their handle i will send message, but all those window have same caption. Can any one help me please.
tunu
|
|
|
|
|
aaaan wrote: I want to send a message to multiple windows,those window have same caption name. is there any way to send a perticular message to those windows only.firstly i wanted to use FindWindow then using their handle i will send message, but all those window have same caption. Can any one help me please.
First register a window message for your application using RegisterWindowMessage and provide a handler for this message, then broadcast this message.
This message will only be processed by your application since the Message id will be unique for your application.
|
|
|
|
|
i'm not sure at all the OP wants to send a own defined message.
it seems more that he is trying to send an already defined message to some windows the OP don't own at all
|
|
|
|
|
toxcct wrote: i'm not sure at all the OP wants to send a own defined message.
My bad.
|
|
|
|
|
Thanks Nibu thomas
But my problem is i do not want to broadcast. I only want to send message to those perticular window.So please give me some idea regarding this.
tunu
|
|
|
|
|
aaaan wrote: I only want to send message to those perticular window.
HWND_BROADCAST is one option, but this sends the message to all top level windows.
|
|
|
|
|
Another solution is to create another message( a unique message so that only your application can process this mesasge ) and send that message to the window you got through FindWindowEx. If the window responds, u can came in to conclusion that u have got the handle you want, if not find the next window with the same name using FindWindowEx
nave
|
|
|
|
|
aaaan wrote: firstly i wanted to use FindWindow then using their handle i will send message, but all those window have same caption.
Well, wasn't that the point...? E.g. :aaaan wrote: i want to send a message to multiple windows,those window have same caption name
It sounds to me like you want to send messages to windows with the same title, but you cannot use ::FindWindow() because you find windows with the same title, which ...errhh... are the ones you want to send the message to...
I must have gotten you wrong. Can you rephrase it?
What message do you want to send? Is it your own user-defined or an ordinary windows message such as WM_CLOSE ?
What is the criteria that makes a certain window a candidate for receiving such message?
What have you done so far and why do you think it's not working?
"It's supposed to be hard, otherwise anybody could do it!" - selfquote
|
|
|
|
|
But do those same-titled windows belong to the same class?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Can we generate a beep sound on some event in vc?
Can you help in that?
Thank you.
KIRAN PINJARLA
|
|
|
|
|
|
kiran.pinjarla wrote: Can we generate a beep sound on some event in vc
Beep(f,t); // f- frequency in hertz,t- time in milliseconds
Also you can check out MessageBeep : The MessageBeep function plays a waveform sound
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
|
kiran.pinjarla wrote: Can we generate a beep sound on some event in vc?
Can you help in that?
MessageBeep( MB_ICONASTERISK );
Other values that can be used include...
MB_ICONEXCLAMATION
MB_ICONHAND
MB_ICONQUESTION
MB_OK.
|
|
|
|
|
Thank you one and all.
KIRAN PINJARLA
|
|
|
|
|
And if you have a .wav file of a beep, you can use sndPlaySound() .
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hi
I want to write a Code in VC++ for:
> Creating / Logging into a SECURE FTP Session.
> In Secure FTP Session, Change the directory using "cd"
> In Secure FTP Session, Create a Directory using "mkdir"
> In Secure FTP Session, delete a Directory using "rm -R"
Plese help me as it is very urgent.
Thanks a tonn
binjo
|
|
|
|
|
Maybe this[^] could help you?
"We trained hard, but it seemed that every time we were beginning to form up into teams we would be reorganised. I was to learn later in life that we tend to meet any new situation by reorganising: and a wonderful method it can be for creating the illusion of progress, while producing confusion, inefficiency and demoralisation."
-- Caius Petronius, Roman Consul, 66 A.D.
|
|
|
|
|
binjo1979 wrote: it is very urgent
as ever.
binjo1979 wrote: Write Script Code
who ? me ?
know that C++ is not a scripted language but compiled !
|
|
|
|