|
I have a Property Sheet and I need to disable the close button, the red "X" button that appears on the right top of the sheet. What is the procedure for disabling it?
|
|
|
|
|
CMenu* pSysMenu = GetSystemMenu( FALSE );
pSysMenu->DeleteMenu( SC_CLOSE, MF_BYCOMMAND );
|
|
|
|
|
Thanks
|
|
|
|
|
Hi,
I would like to know if there is a better way of writing a particular pattern of the code as mentioned below. I have been encountering this type quite frequently and do not like the way it is implemented. The code piece is as follows
class Address
{
public:
Address():m_address("")
{}
Address(const CString& addr) : m_address(addr)
{}
CString GetAddress()------------------ (1)
{
return m_address;
}
CString GetAddress() const ------------------ (1a)
{
return m_address;
}
const CString& GetAddress() const -----(2)
{
return m_address;
}
private:
CString m_address;
};
Now somewhere in main method
Address addr("Living somewhere on Earth");
further down a call is made into a third party library which only takes char* and has a method like
void FormatAddress(char* address); -------(3)
Now if I make a call to this method, I must do this
FormatAddress(const_cast<char*>(addr.GetAddress().GetString()); -------------(4)
So my query is whether the whole piece of code is correct, sure it does compile and gives the result as expected
but I am looking to improve my programming skills and want to write a better and cleaner code.
Out of the methods 1 and 1a which is more correct? Does it makes sense to make the m_address variable as mutable.
Thanks and Regards
|
|
|
|
|
LPCTSTR GetAddress() const
{
return m_address;
}
as the only access function
when void FormatAddress(...) is NOT changing the input paramters
Greetings from Germany
|
|
|
|
|
Can any one direct me to develop a generic report writer with VC++ 6. What I need is I have some data in some text files and I want to display it in some report-viewer-style. Please don't ask me to dump it into some standard database and use a third-party tool to view it.
There are some utilities provided in this site itself but is not up-to-the mark.
|
|
|
|
|
Member 275519 wrote: I have some data in some text files and I want to display it in some report-viewer-style.
Can't you use SDI/MDI with doc/view architecture...?
|
|
|
|
|
Thanks
But I didn't get you. What I want is a report-viewer-style presentation. I want to display the data page by page. I want a form-view or a control in SDI/MDI which will represent a white-paper (page) and I can arrange the headers,body,sub-footer and footer in it. Is there any kind of window-class already developed and distributed in codeproject. I just want a child window ( control ) which will represent a A4-size paper. Rest I can do....
|
|
|
|
|
Member 275519 wrote: Is there any kind of window-class already developed and distributed in codeproject.
You may search for that...
Member 275519 wrote: I just want a child window ( control ) which will represent a A4-size pape
What about simply coding that??? If you just want to show it page by page, a Dialog Application is enough...
|
|
|
|
|
On the status bar in first pane how can i show the help information about the menu items when they are selected or positioned in a dialog based application?
thanks in advance
|
|
|
|
|
|
Anjali Patil wrote: dialog based application?
Anjali Patil wrote: On the status bar in first pane
Excuse me, a dialog has a status bar? Why can't you just use the doc/view architecture instead? A lot of such work will be done by the framework automatically for you then!
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
but requirement is like this.
i should use dialog box only.
|
|
|
|
|
Does this[^] article help?
Regards,
Sandip.
|
|
|
|
|
Hi
experts i tried a lot to update the IOlkAccount properties data but failed,please provide me code for the use the
HRESULT IOlkAccount::SetProp(DWORD dwProp, ACCT_VARIANT *pVar);
i need a code that set the following propeties of the IOlkAccount interface.
PROP_ACCT_ID
PROP_ACCT_IS_EXCH
PROP_ACCT_NAME
PROP_ACCT_SEND_STAMP
PROP_ACCT_STAMP
PROP_ACCT_USER_DISPLAY_NAME
i hope experts will give soon a code for my above problem!
Sanjay Vishwakarma
|
|
|
|
|
Hi,
I am working on an MFC application where I am capturing acreen saving it in a gif file and need to transfer to the server using HTTP . Please help me with some code.
Thanks In Advance
Dhiraj
|
|
|
|
|
Isn't this a repost. I believe i read your same post in mornings (which was down voted probably by admin).. I think you also deleted previous one..
This will not help you to get answers..
Regards,
Sandip.
|
|
|
|
|
yes u are correct. Sorry I wont post it again as i was unaware of down voting by admin.
Anyways Thanks.
|
|
|
|
|
GIF is a bit dated - why not at least JPEG so you can use more than 256 colors?
What are you having trouble with?
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
The problem I am facing is that after I am capturing the desktop and saving it in a gif file I need to send this file to a HTTP server for uploading and also i need some additional parameters along with the file.
How to achieve this. If possible please help me.
Thanks In Advance.
|
|
|
|
|
hi all
i am working on VC6 project and i am migrating it from 32 bit to 64 bit processer on wimdows.
now i want to know that how to get the details of binaries i.e. how will i come to know that my binaries are 64 bit or 32 bit.
we have command on unix by which we can get this information but do we have it on windows or is there any alternative way to know it.
moreover what machine flag for itanium64 machine we have to use.
please someone rely me soon...
|
|
|
|
|
vikas choudhry wrote: i want to know that how to get the details of binaries
Do you mean you want to do this programmatically, inside the binary? or with some program, external to the binary?
|
|
|
|
|
no not in programme.
i have made my binaries now from command prompt i want to check whether these binaries are 32 bit or 64 bit binary.
it is possible in unix but i am not sure about windows so please suggest me how can we get this information.
|
|
|
|
|
|
Guess What, You didn't get the time to read this[^]
You need to google first, if you have "It's urgent please" mentioned in your question.
_AnShUmAn_
|
|
|
|