|
Thinn Nwe Han wrote: ...i do not know how to write a UI thread to stop my program by clicking stop button.
See here for "shutdown" solutions.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
For the buttons on my dialog based application I need to have an implementation of the OnLButtonDown and OLButtonUp methods so that I know when the mouse is in different 'click' states. Looking at the available control events these aren't availble (only available for the actual dialog).
Is there a way to do this?
TIA,
Andy
|
|
|
|
|
Derive a class from CButton and attach it to the buttons in the dialogs OnInitDialog function (or use DDX_Control to do it in DoDataExchange but you'll have to add the DDX_Control manually outside of AFX_DATA_MAP or use the class wizard to create a member variable for the button using CButton and then move them out of AFX_DATA_MAP and modify the declaration from CButton to CMyButton if you use class wizard to derive CMyButton then class wizard actually recognizes it as a valid variable type I didnt know this), then you can add WM_LBUTTONUP/DOWN handlers to your CMyButton class.
-- modified at 6:42 Monday 15th October, 2007
|
|
|
|
|
Hi, thanks for your reply, I'm having a bad start to the day so could you post a link to an article (or explain) how I can overload the CButton class?
cheers,
|
|
|
|
|
A simple article search for "deriving from cbutton" returned this[^] as the 1st article found
|
|
|
|
|
thanks again for your help (used every word for the search apart from 'deriving'! )
|
|
|
|
|
Use ClassWizard (Ctrl+W). In the Base class combobox, select CButton .
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
'class' type redefinition
this is the error i'm getting .. eventhougyh i havent definied it anywhere before in pgm . .. any solution plzzz
|
|
|
|
|
If you put a bit of relevant code, people will be able to help better.
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
|
|
|
|
|
in the header file which defines your class, put the fillowing aroung your file content :
#if !defined(__A_UNIQUE_MACRO_NAME_FOR_YOUR_FILE__)
#define __A_UNIQUE_MACRO_NAME_FOR_YOUR_FILE__
#endif //__A_UNIQUE_MACRO_NAME_FOR_YOUR_FILE__
|
|
|
|
|
Don't forget to put include guards in your header files:
#ifndef MYFILE_H<br />
#define MYFILE_H<br />
<br />
<br />
#endif
Or you can also use the #pragma directive.
|
|
|
|
|
use #pragma once
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
suganforu wrote: ...eventhougyh i havent definied it anywhere before in pgm.
Obviously you have, or the compiler would not be complaining. Use the #define and #pragma once directives in your class definition file.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Can anyone suggest any book for working VC++ with Flash 8
Thanks in advance
sai
|
|
|
|
|
Hi,
A client ask to me a program to work on a simple database.
It looks quite easy for me, but not everything!
He asked to me something that I haven't do before, so before accept the job I want to understand how complex is this, and, after that, of course, I'll have to study it:
1 Store the DB on a server(or simply on a pc more important than the other), every other client-pc asks to this server (local network) some info before send to it a new valid item of the DB. of course somethimes the client have to ask to the server the complete DB to draw it.
2 Prepare a Microsoft-Word document filling somewhere the page using some info from an item of the DB. Is it a possible solution use the word-macros? Any sample?
I haven't any idea on how solve this two features. Is it an hard task?
Have you got some keywords/article/sample to look at?
If needed I can explain more in deeper this features.
Thank you very much for every help
Russell
|
|
|
|
|
How to remove a directory and it's sub directory/files? Api RemoveDirectory only operates on empty directories.
|
|
|
|
|
You need to write a recursive function to walk down the folder tree and start deleting things from the bottom up.
For a given directory enumerate the contents, for each sub directory call your directory delete function again and then delete the directory when it returns
|
|
|
|
|
You could try experimenting with SHFileOperation() setting the wFunc member to FO_DELETE and NOT including FOF_NORECURSION in the fFlags member. I have used it to delete all files in a folder in one operation but havent actually tried the recursive delete that is implied by the FOF_NORECURSION flag.
|
|
|
|
|
|
Please Note: _rmdir The directory must be empty, and it must not be the current working directory or the root directory.
|
|
|
|
|
http://www.codeproject.com/shell/cshellfileop.asp[^]
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
Hello to all,
in my project i am uploading the files on a server,now i want one pop up dialog box having message "Starting Uploading Process" which will appear when i will click on button "Upload" and then that dialog box should get vanished automatically after 2-3 seconds and then actual uploading process should get started means that dialog box should not have "Ok/Cancel" buttons, it should get vanished automatically after 2-3 seconds rather than get vanished after clicking on "Ok" or "cancel" button, how this can be done? can anybody help me plz?
Thanks & Regards,
Anay
|
|
|
|
|
Sounds like you'll need a dialog box and a timer. Are you using MFC?
|
|
|
|
|
yes josh i am using MFC, can u tell me how it can be done?
Anay
|
|
|
|
|
AnayKulkarni wrote: can u tell me how it can be done?
Not off the top of my head. You'll need a dialog that starts a timer when its created and closes itself when the timer fires. I'm sure you can find all that in google or even here in various articles
|
|
|
|