|
So finially I've found a solution for the problem, even though I do still don't know the answer to my original question.
extern "C" UINT WINAPI RealGetWindowClassA (HWND, char*, UINT);
void CTestTabCtrl::OnPaint()
{CWnd* UpDownButton;
char Test[256];
UpDownButton = GetTopWindow();
RealGetWindowClassA (UpDownButton->m_hWnd, Test, sizeof(Test)-1);
ASSERT(!strcmp(Test, "msctls_updown32"));
if (UpDownButton)
{
UpDownButton->EnableWindow(FALSE);
UpDownButton->ShowWindow(SW_HIDE);
}
CTabCtrl::OnPaint();
}
So instead of overpainting the buttons I never display them.
Take care: UpDownButton is really a temporary window: It is dynamically created, when the number of tabs exceeds the number of displayable tabs. So if tabs are dynamically added and removed, retriving of the UpDownButton window pointer can not be done only once at initialization.
Regards
Leo
Edit: Typo in topic
|
|
|
|
|
Hi All.
With Crystal report 10 I go to generate the report file and through the DLL to runtime I go to modify the logon parameters....
With this code I go to set up the parameters of logon of the report...but there is a problem
when I set password ConnectionProperty has not been set..only password connection property....
void CDlgRptConnectionProperty::OnBnClickedOk()
{
_bstr_t bstParameterName,
bstParameterValue;
_variant_t vtValue;
IConnectionPropertyPtr pConnectionProperty = NULL;
IDatabaseTablesPtr pDatabaseTables = NULL;
INameValuePairsPtr pNameValuePairs = NULL;
IDatabasePtr pDatabase = NULL;
_bstr_t bstConnection;
HRESULT hr;
try {
pDatabaseTables = m_pReport->GetDatabase()->GetTables();
IDatabaseTablePtr pDatabaseTable = pDatabaseTables->GetItem(1);
pNameValuePairs = pDatabaseTable->GetConnectionProperties();
if( (m_typeRptConnection == ModifyConnectionADO) || (m_typeRptConnection == ModifyConnectionDAO) ) {
for( int nIndexParam = 0; nIndexParam < m_lstParameterConnection.GetItemCount(); nIndexParam++ ) {
bstParameterName = m_lstParameterConnection.GetItemText(nIndexParam,COL_0);
CString sParameterName(bstParameterName.GetBSTR());
if( sParameterName.Compare(ADO_PARAMETER_5) != 0 ) {
bstParameterValue = m_lstParameterConnection.GetItemText(nIndexParam,COL_1);
}else {
bstParameterValue = GetUserPassword(nIndexParam,COL_1);
}
IConnectionPropertyPtr pConnectionProperty = pNameValuePairs->GetItem(bstParameterName);
pConnectionProperty->PutValue(bstParameterValue);
}
}else if( (m_typeRptConnection == ReplaceConnectionADO) || (m_typeRptConnection == ReplaceConnectionDAO) ) {
pNameValuePairs->DeleteAll();
_bstr_t bstDllName;
if( m_typeRptConnection == ReplaceConnectionADO )
bstDllName = DLL_ADO;
else if( m_typeRptConnection == ReplaceConnectionDAO )
bstDllName = DLL_DAO;
m_pReport->GetDatabase()->GetTables()->GetItem(1)->DllName = bstDllName;
for( int nIndexParam = 0; nIndexParam < m_lstParameterConnection.GetItemCount(); nIndexParam++ ) {
bstParameterName = m_lstParameterConnection.GetItemText(nIndexParam,COL_0);
CString sParameterName(bstParameterName.GetBSTR());
if( sParameterName.Compare(ADO_PARAMETER_5) != 0) {
bstParameterValue = m_lstParameterConnection.GetItemText(nIndexParam,COL_1);
}else {
bstParameterValue = GetUserPassword(nIndexParam,COL_1);
}
pNameValuePairs->Add(bstParameterName.GetBSTR(),bstParameterValue.GetBSTR());
}
pDatabaseTables = m_pReport->GetDatabase()->GetTables();
long lTablesCount = pDatabaseTables->GetCount();
for( long lItem = 1; lItem <= lTablesCount; lItem++ ) {
IDatabaseTablePtr pDatabaseTable = pDatabaseTables->GetItem(lItem);
_bstr_t bstTableName = pDatabaseTable->GetName();
pDatabaseTable->PutLocation(bstTableName);
}
}
hr = m_pReport->Save(m_bstReportPathFileName);
}catch(_com_error e) {
theApp.DisplayComError(e,TRUE);
return;
}
OnOK();
}
Any idea...
Too many plans make the health badly!!
|
|
|
|
|
Hi
This is my first post to code project.When we copy some thing from word and click on Edit menu and select office clipboard, we will able to see content which we have copied in latest.If i open excel and go to Edit->Office Clipboard same data is available .And i am able to paste the data by selecting that data on office clipboard.
Actually this is vulnerability as my data is shared from word to excel when i want it only to available in word files only.What i want is to either clean office clipboard through some api or to disable sub menu item Edit->Office Clipboard so that no one is able to open offcie clipboard.
Let me tell you i have tried EmptyClipboard() which cleans windows clipboard but not office clipboard.I also tried OleSetClipboard(NULL) which is no way effective.
Please suggest some way to handle this office clipboard data.
Thanks in advance.
|
|
|
|
|
Pankaj Bohra wrote: ...so that no one is able to open offcie clipboard.
Are you on a shared PC?
Pankaj Bohra wrote: Please suggest some way to handle this office clipboard data.
According to Microsoft, there is no way to programmatically manipulate it.
"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
|
|
|
|
|
No i am not on shared PC.
|
|
|
|
|
Then why are you worried about someone else accessing your clipboard data?
"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
|
|
|
|
|
David, actually i am working on encryption and securtiy of data.And word is secured document for my scenario and excel is unsafe document.That's why i want to clear office clipboard or want to control over it.
|
|
|
|
|
Hi,
I am using Web Browser Control (IWebBrowser2) in C++ and renders a html page in it. In my html page I have a tree view control. I want a pointer to this tree view control (embedded in html page) in my C++ code. How would I get the pointer to this tree view control.
Any help would be appreciated.
Regards,
Paresh.
|
|
|
|
|
I want to built a DLL in which we can pass parameters to call a jar file and the return values of the Jar file should be available to the calling application.
Do anyone know How to perform this ?
Thanks in advance.
Nikhs
Nikhil Trivedi
|
|
|
|
|
Nikhil Trivedi wrote: ...pass parameters to call a jar file...
What do you mean by "call a jar 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
|
|
|
|
|
DavidCrow wrote: What do you mean by "call a jar file?
I meant to say that I want to unpack(Execute) a jar file from visual C++ app. and then get the result in the visual c++ for furthur processing. Suppose I am using jar file to generate an auth. number by passing a variable to the jar file, and want the auth number back in the visual c++ app. so that I can process it according to my requirement.
Thanks for your answer.
Nikhs
Nikhil Trivedi
|
|
|
|
|
Nikhil Trivedi wrote: I meant to say that I want to unpack(Execute) a jar file from visual C++ app. and then get the result in the visual c++ for furthur processing.
Use CreateProcess() for this.
"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
|
|
|
|
|
hi everyone! good day!
i just wanted to ask whats the difference between declaring a variable like this
TEST* pTest;
with
LPTEST pTest; // see code below
typedef struct
{
...
} TEST, *LPTEST;
thanks!
newbie
|
|
|
|
|
there's none... because LPTEST is just a synonym for being a pointer to a TEST .
but for readability reasons, i prefer using the TEST* notation
|
|
|
|
|
toxcct wrote: lisibility
Frenglish for "readability", huh tox'? From the french word "lire"?
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
oh sh*t ! rotfl, you're damn right... i'm changing it immediately !
|
|
|
|
|
It was good though, it made me laugh as well.
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
tnx a lot for the answers!
great help!
newbie
|
|
|
|
|
They are the same, basically it's only the MS way to fight the pointer notation fear...
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
Hello,
im like to use more stl library as before, and therefore i need some help from the comunity
for better understanding how they work!
Ok, i know now how to use vectors, loop over them and serch in them.
Now i need to know more about maps, i try to make my map but i recive an error!
This is my try:
map<string, CMyObject>NewMap;
but this is not the right way , how to make my own map?
I found an example with two params, but in the MSDN is a samle with 4 params!?
Thanks for help!
termal
-- modified at 4:48 Friday 4th May, 2007
|
|
|
|
|
termal wrote: but this is not the right way
yes it is...
what error are you getting exactly ?
is it at compile time or runtime ?
|
|
|
|
|
The third and fourth parameter to std::map are optional. Is your CMyObject class assignable and copyable?
|
|
|
|
|
hi
i seeking an easy way to send email in a windows32 application
sepel
|
|
|
|
|
Have a look at Nish's article here[^].
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|