|
Hello,
the following should work:
In the dialog class add the following:
private:
VarType m_Var;
public:
VarType GetVar() {return m_Var;}
In the other classes at a point where you want to use the var add
VarType var = YourClass.GetVar();
this should do the trick!
Good luck!
A student knows little about a lot.
A professor knows a lot about little.
I know everything about nothing.
|
|
|
|
|
Hi,
I have a list of _bstr_t, and I'm trying to sort it using the cool features of STL ( this pred method, to make the sort I need an special compare, first removing two characters), my code looks something like:
Definition:
<br />
typedef std::list<bstr_t> CList;<br />
<br />
CList m_Files;<br />
<br />
bool pred(const bstr_t &x, const bstr_t &y);<br />
Predicate: ( just some silly test first)
<br />
bool pred(const bstr_t &x, const bstr_t &y)<br />
{<br />
return true;<br />
}<br />
Call:
<br />
std::sort(m_Files.begin(), m_Files.end(), pred);<br />
And the error that it gives me:
error C2784: '_Distance __cdecl _STL::operator -(const class _STL::reverse_iterator<_RandomAccessIterator,_Tp,_Reference,_Pointer,_Distance> &,const class _STL::reverse_iterato
r<_RandomAccessIterator,_Tp,_Reference,_Pointer,_Distance> &)' : could not deduce template argument for 'const class _STL::reverse_iterator<_RandomAccessIterator,_Tp,_Reference,_Pointer,_Distance> &' from 'struct _STL::_List_iterator<class _bstr_t,s
<="" small="">
, I know... all the thing that only have three letters are not compatible between them... ATL ... STL ... MFC... COM
Thanks in advance, greetings
|
|
|
|
|
If CP hasnt filtered out your template parameters, then you need to do something like this:
typedef std::list<CString> CList;
Apologies if this is what you entered initially!
|
|
|
|
|
Hi,
Sorry.. but I'm using ATL... son not CString
|
|
|
|
|
std::list has its own sort() function, since std::sort() uses a random access iterator (and random access in a list is expensive).
- Mike
|
|
|
|
|
|
Please tell me how to rename the "OK" and "Cancel" button in a property sheet dialog and also how to rename the property pages in the sheet.
|
|
|
|
|
You could try OK or Cancel
CPropertySheet oProp("Title");<br />
CWnd *pWnd = oProp.GetDlgItem(IDOK);<br />
<br />
if(::IsWindows(pWnd))<br />
pWnd->SetWindowText("button text");
you could rename the property page by changing the properties page resource's properties - caption. Or you could try .SetWindowText(..);
By the way, you need to set your propertypage to be premature exist by
CPropertyPage.m_psp.dwFlags |= PSP_PREMATURE;
I did not test the codes. Hope it works.
Sonork 100.41263:Anthony_Yio
|
|
|
|
|
- Create a class derived from CPropertySheet.
- Override the virtual function OnInitDialog()
<br />
BOOL CMyPropertySheet::OnInitDialog() <br />
{<br />
BOOL bResult = CPropertySheet::OnInitDialog();<br />
<br />
CWnd *pWndOk = this->GetDlgItem(IDOK);<br />
if (pWndOk != NULL)<br />
{<br />
pWndOk->SetWindowText("&Save");<br />
}<br />
<br />
pWndOk = this->GetDlgItem(IDCANCEL);<br />
if (pWndOk != NULL)<br />
{<br />
pWndOk->SetWindowText("&Quit");<br />
}<br />
<br />
return bResult;<br />
}
|
|
|
|
|
I've got a problem for CTabCtrl display
I created a CTabCtrl and let the tabs be shown at the bottom, it has problem to display visual styles in Windows XP. The Tabs won't be drawn correctly... anyone can help me out?
Thanks a lot
Kyle Chen
|
|
|
|
|
I have applied XP visual styles to CTabCtrl by using "*.manifest" file. The tab control has same look in the top of window and in the bottom of window.
Ask me more detailed, please, probably I can help you.
yiy
|
|
|
|
|
Thanks to Babayan. Maybe I should describe the problem in detail.
I can show the Visual Style to the Tab Ctrl and it works fine when the tab is on the top position. However I'd like display the tab at the bottom, in which case, the tab should be turn over (up to down from the top tab). But actually it still the same as when it's on the top - the highlight organge bar is still on the top.
You've got it?
PS. Can I past image here?
Kyle Chen
|
|
|
|
|
and maybe see links (and sometimes links into links) into
http://www.codeguru.com/forum/showthread.php?s=&threadid=260836
t!
|
|
|
|
|
Thank you, Tibor. I've read the post there but didn't find the treatment to my problem.
Kyle Chen
|
|
|
|
|
oops, rereading your question my sorry, i mixed it with my old z-order problem
t!
|
|
|
|
|
can anyone help me in image processing project that is thumb recoginition
Faizi
|
|
|
|
|
See GDI+ graphic library from Platform SDK. I remember, I have seen some such code here.
yiy
|
|
|
|
|
Hi,
I'm working on an Outlook plugin. I want create a new mail, by providing To, CC, Body attachment etc. I'm currently able launch the outlook in compose mode (writable) and set the required fields, but what I want to do is to launch this mail in read only mode, which the user should be able to forward or reply. Unfortunately I've not been able to do this. Outlook does not seem to provide any interface/method to do this. Has anyone any Ideas/suggestions on how to go about this.
Thanks,
Snakebyte
|
|
|
|
|
Hi,
Mmm... when I had such problems with Ms Word what I tried is to record a Macro just doing that thing and then look at the VBA code automatically generated ( most of the times gives a tip of where you can get that).
HTH
Braulio
|
|
|
|
|
I know the IP of my machine. The machine is in UK, and now I am in PAKISTAN. IS there any way that I can access my files in Pakistan.
|
|
|
|
|
uhm, there is an article here on CP about remoting (Look in the "Networking and Internet" section). But do you want to make an application or do you just want to get access to your files?
Then you can use VNC (www.realvnc.com) or Remote Desktop that comes with XP.
Rickard Andersson
Here is my card, contact me later!
UIN: 50302279
Sonork: 37318
Interests: C++, ADO, SQL, Winsock, 0s and 1s
|
|
|
|
|
I want to make an application. What technology would be involved in make tool like PCAnyWhere
|
|
|
|
|
|
i wish to change the font to bold as well as make colour changes to background and font for my listbox, how do i do that?
|
|
|
|
|
You could change the font type by changing the font type of your form resource. Like dialog, formview and etc.
It will change your button and list box font type when it is in the on top of dialog.
Sonork 100.41263:Anthony_Yio
|
|
|
|