|
Hi all, i have pop up messages same as in msn messenger "the user XXXX has logged in".
problem is that these dialogs (which inherites from CDialog) takes all the focus as soon as they popup. if i have in the main application a menu opened or i type something in an edit control, they immediately lose the focus
how can i fix that?
thanks in advanced
Yaron
Interface basics click here :
http://www.codeproject.com/com/COMBasics.asp
don't forget to vote
|
|
|
|
|
YaronNir wrote: problem is that these dialogs (which inherites from CDialog) takes all the focus as soon as they popup. if i have in the main application a menu opened or i type something in an edit control, they immediately lose the focus
how can i fix that?
return FALSE instead of TRUE from OnInitDialog function of the Dialog Box!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
excellent! worked like a charm!
thanks a lot
Yaron
Interface basics click here :
http://www.codeproject.com/com/COMBasics.asp
don't forget to vote
|
|
|
|
|
Iwant to change any size of a window by the mouse. How can i set it???
|
|
|
|
|
see SetWindowPos() and MoveWindow()
|
|
|
|
|
you can use MoveWindow in WM_SIZE
|
|
|
|
|
Adding the correct window style (like WS_THICKFRAME ) to the window will generally allow it to be sized via the mouse. Once it is sized by the user, you will have to reposition and resize any controls within that window yourself by handling the WS_SIZE message.
Things like SetWindowPos(...) and MoveWindow(...) allow you to change the size of a window/control in code, not by mouse.
Peace!
-=- James If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! DeleteFXPFiles & CheckFavorites (Please rate this post!)
|
|
|
|
|
Can we read the pixel values of a text file and make a bitmap from that data.
Is there any way for this?
Thank you.
KIRAN PINJARLA
|
|
|
|
|
use CreateDIBitmap or CreateBitmap
Regard's
Dhana
|
|
|
|
|
A text file has no pixel values, only text.
Do you mean that you want to take the contents, such as "Hello, World" and generate a bitmap image of that text using a particular font and size?
Steve S
Developer for hire
|
|
|
|
|
Can you be more specific a text file is text I think you need to read text file and create a bitmap for it
|
|
|
|
|
hello
i am working with automation in vc++6.0 .Can anyone tell me about how can i transfer bitmap images in the MS word using automation from my VC++6.0 application.If someone have sample application send me .I have already done this thing with the MS Excel .Now need in MSWord .Plz help me on this topic.
sukhpreet
|
|
|
|
|
If you have already done this with Excel, how?
I ask because you might well be able to use the same technique with Word.
Steve S
Developer for hire
|
|
|
|
|
I think my MFC app causes memory leak by "new", how to detect troubles of memory leak of the app?
I only want to detect for my app, not for whole system.
any suggestion for a tool or something else?
|
|
|
|
|
|
Make sure you have the following at the top of every source file:
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
If so, leaks should be reported when your application exits.
|
|
|
|
|
includeh10 wrote: think my MFC app causes memory leak by "new", how to detect troubles of memory leak of the app?
for that i prefer AUTO_PTR.... any way you can try CMemoryState Class
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
Robert Edward Caldecott wrote: ...leaks should be reported when your application exits.
But only if it was compiled in Debug mode and F5 was used to start it.
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
|
If i create a thread with AfxBeginThread, how can i later on on some point check if the tread is still running. For example Tread class of Java has a "isAlive()" method for that. But it seems that the CWinThread class that AfxBeginThread returns has no such thing.
|
|
|
|
|
Get the handle to the thread and Call GetExitCodeThread then see if it returns STILL_ACTIVE.
|
|
|
|
|
In Some Old Code some validation is done in WM_KILLFOCUS.
Now We know that this is not a good way, But we don't wan't to change the code.
If Some User's closes the dialog using "Top Right Cross Button" the dialog and its Data
becomse invalid and after that the KillFocus comes.
In This case we dont want the killfocus event to happen.
Please suggest.
Stuck in a Problem
|
|
|
|
|
Indian Idol wrote:
In This case we dont want the killfocus event to happen.
maintain a FLAG, make it false when you receieve
SC_CLOSE in WM_SYSCOMMAND!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
hi,
I have thread id and Process id of the a application, now i want to get the main window handle of the application.
I know there is EnumThreadWindows function which can achive the same, but i am not sure how to use it and also i want to store the window handle after the call to EnumThreadWindows function, I have seens lot of samples which basically send event notification to the callback function for EnumThreadWindows which i don't want to do.
Thanks in advance,
Abhi Lahare
|
|
|
|
|
Hello,
I want to launch a perl script as the pre-build step with Visual C++ .NET 7.1.
But the paths to the different EXE files I want to use in this script are not known, even if they are in the PATH environment variable. If I launch my script by hand, and not by Visual C++, it works well.
After many trials, it seems that the paths memorised in PATH are not known in the context of the pre-build command line.
Is there a way to remedy to that?
Thanks in advance
Nolyann
|
|
|
|