|
Have you added a handler for the button's click ?
In order for a toolbar's (which a ReBar control is) button to be available, you must have a valid message map entry that handles the click on that button. If this entry is not available, the button is automatically disabled.
-Antti Keskinen
----------------------------------------------
The definition of impossible is strictly dependant
on what we think is possible.
|
|
|
|
|
Thanks a lot. Now it works.
But I have another problem: I have two Bands on a CReBar control. How can I resize the two bands to make them both visible?
(Sorry formy English!!!).
|
|
|
|
|
Use GetRebarCtrl under CReBar to get the ReBar control. Then use CReBarCtrl::SetBandInfo to set the band properties. Familiarize yourself with REBARBANDINFO structure. It has a member called cx to set the band's width.
-Antti Keskinen
----------------------------------------------
The definition of impossible is strictly dependant
on what we think is possible.
|
|
|
|
|
Hi all,
Is it possible to detect the insertion and removal of removable storage? I need to know so I can call up a photo management application when this is done.
Regards,
Mark
|
|
|
|
|
Yes it is possible.
See this[^] link on the MSDN Library. It directs you to the home page of 'Remote Storage Manager' service.
This service can be queried to send notifications on a device's state. If you cannot find useful information from that link, use the keyword 'BeginNtmsDeviceChangeDetection' as a search parameter. This is a function that is used to request a notification object.
-Antti Keskinen
----------------------------------------------
The definition of impossible is strictly dependant
on what we think is possible.
|
|
|
|
|
|
I am importing a tlb in MFC which accepts safearray as parameter.
I have to pass filenames in this parameter. can anyone pl tell how can i pass filenames by safearrays as i am novice in vc++
|
|
|
|
|
I know Win32. So I am sending U same. Else gv the id where I can send U complete code. One more thing SafeArray is meant for passnig values from Vb client to vc Dll. Anyway for time being:
<br />
#include "stdafx.h"<br />
#include <windows.h><br />
#include <tchar.h><br />
<br />
#import "..\Colors\Colors.tlb"<br />
<br />
using namespace COLORSLib;<br />
<br />
<br />
int main(int argc, char* argv[])<br />
{<br />
CoInitialize(NULL);<br />
try<br />
{<br />
IColorObjectPtr pSA(__uuidof(ColorObject));<br />
_variant_t var = pSA->Colors;<br />
SAFEARRAY* psa = var.parray;<br />
BSTR* bstrArray;<br />
SafeArrayAccessData(psa,reinterpret_cast<void**>(&bstrArray));<br />
for(UINT i =0;i<psa->rgsabound->cElements;i++)<br />
_tprintf(_T("%ls\n"),bstrArray[i]);<br />
SafeArrayUnaccessData(psa);<br />
}<br />
catch(_com_error e)<br />
{<br />
_tprintf(_T("Error: 0x%08 %ls\n"),e.Error(),e.ErrorMessage());<br />
}<br />
<br />
CoUninitialize();<br />
return 0;<br />
}
hope it help.
Cheers!!
Siddharth
|
|
|
|
|
hi siddharth,
Thanx for ur reply.
Actually I have to use a DLL in MFC that is a ATL DLL in
VC++. This DLL converts from one file format to another. and it accepts a
safearray to perform its functionality.This DLL is running fine from VB as i
have tried and now i am trying to use it in VC++. i tried to pass safearrays
and i guess i am not still at the right position. if u can help me thanx a
lot. one thing more is that i don't have tlb of this dll. my mailid is ritu@sebiz.net
|
|
|
|
|
my program created using MFC which i chose static dynamic link. i also insert a MSFLEXGRID in the program. the computer i use is win2k. i test program on other machine and it only run on win2k comp but not on XP or NT. anyone know why? needed special file?
|
|
|
|
|
It sounds like you don't have the FlexGrid control registered on the other machines.
On your Win2K machine, find the file MSFLXGRD.OCX, which will probably be in \Windows\System32. Copy it to your WinXP machine in the same place. At the command line, use REGSVR32 to register the control.
Software Zen: delete this;
|
|
|
|
|
|
I want to create .pdf from image or text file.
and I have not download PDF SDK from adobe site.
Cour you tell me how to get PDF SDK to create PDF file.
Thanks!
|
|
|
|
|
Hello!
Check this website: http://partners.adobe.com/asn/acrobat/docs.jsp. You can find all sorts of documentations and the PDF SDK there. Hope that helps.
Later,
Caleb
|
|
|
|
|
Oneguy asked me the following question
int a=5;
int &b=a;
Where b is stored,
I answered him in Symbol table...and he said no...and then I asked him , can u plz tell me after interview where it is stored...he didnt replied.Does any one know , where the Standalone reference are stored, How and When..
regards
Balkrishna Talele
|
|
|
|
|
When i tried to compile the above code i got the following error
error C2440: 'initializing' : cannot convert from 'int *' to 'int &'
A reference that is not to 'const' cannot be bound to a non-lvalue
P.R.A.K.A.S.H
|
|
|
|
|
it was just typing mistake...
consider this example
int a=5;
int &b=a;
where is b stored...if so why...REMEMBER , The ans is not stack or heap
regards
Balkrishna Talele
|
|
|
|
|
&b is a reference to a, so b and a are taking the same memory location.
global or stack depending on the scope.
|
|
|
|
|
The answer depends on the scope where the variables are defined. If the variables are defined at file scope, i.e. outside of any function definition, then their storage is global, like this:
int a=5;
int &b=a;
void Function()
{
}; 'Global' variables are constructed by the C++ runtime when program execution begins.
If the variables are defined within a function (hence they have function scope), like this:
void Function()
{
int a=5;
int &b=a;
}; then they are allocated on the stack.
The fact that the variable b is a reference shouldn't alarm you. It is still an ordinary variable.
Software Zen: delete this;
|
|
|
|
|
But free standing reference do not have storage ???? they are only referred
|
|
|
|
|
Balkrishna Talele wrote:
free standing reference do not have storage
That is true. A reference is "an alternative name for an object" (The C++ Programming Language by Bjarne Stroustrup). const references can generate storage requirements, however, if they involve the construction of a temporary value.
I'm sorry if I caused you any confusion .
Software Zen: delete this;
|
|
|
|
|
thanks for that feedback, But I heard that all the free standing are in Symbol Table generated by compiler.. Is that true
cheers
balkrishna Talele
|
|
|
|
|
Balkrishna Talele wrote:
I heard that all the free standing are in Symbol Table generated by compiler.. Is that true
Given the definition that I quoted, that is a reasonable statement.
Software Zen: delete this;
|
|
|
|
|
Dear Friends,
You are all aware of "Find Text Dialog Box" very common in Microsoft Applications. This dialog box can be invoked mostly from edit menu. With its help we can serch text in the current document and also perform find/Replace operation.
But this dialog box is a part of a certain application. I need to make the same "Find dialog" in such a manner that it is application independent. I can open any text document and bring my "Find Dialog" on top of it. Then it can perform "Find" operation on that document and highlit that text.
Is it possible. If yes then how..
|
|
|
|
|
If you question is THIS
Q ) I want to bring SAME Find and Replace Dialog in any of MY(yours) application??
A)) Indeed, Yes you can,
How?
Use ATL DLL and make the necessary function....and call them from your application by initalizating it.... (just see ATLFire sample from MSDN...and The begining ATL 3.0 COM which pops ups the about dialog of ATLFire..in same way you can do yours too....)
regards
Balkrishna Talele
|
|
|
|