|
Hello All,
I am creating a shared addin for word application. now i have to add toolbar and menu bar to word application.
if any one have idea about this than please share with me.
Thanks
|
|
|
|
|
You will have to implement IDTExtensibility interface and in IDTExtensibility::OnConnection you have to add the Toolbar Button and Menu items.
Search for "office addin " in google you might find some article about how to create Addins.
Regards,
Swathi
"a child will grow up to become an adult, but you can never stop the adult from acting like a child"
|
|
|
|
|
How to get XP style window ( GUI ) using MFC????
Thanx n Advance.....
|
|
|
|
|
arshadkc wrote: How to get XP style window ( GUI ) using MFC????
Add this one line to your .rc file, open it in a text editor.
CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "YourApp.exe.manifest"
YourApp.exe.manifest should be your application's manifest file.
|
|
|
|
|
hi
anyone knows how can i make VC not to continue code generation after a specified number of errors/warnings?!
TC about 16 years earlier had this capability as well as nested comments!
MS isn't going to respect its users needs?!
|
|
|
|
|
it's still like that AFAIK...!
|
|
|
|
|
How can i access non static members in a static member function
thanks
|
|
|
|
|
no, because a static member has no this pointer, so it doesn't know a particular instance of the class
|
|
|
|
|
You have to explicitely pass such members as function arguments.
(Of course you can also pass the whole object the members belonging to).
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.
|
|
|
|
|
the question was not really how to do it but is it posible to do it.
i think that if he really tries to access a data member from a static one, he definitely has a design problem, and should resise his model ; either the static member shouldn't be static, or maybe the data member access can be set static itself...
|
|
|
|
|
toxcct wrote: the question was not really how to do it but is it posible to do it.
The above is only your interpretation of the OP question.
(Maybe the original poster's one is completely different than both mine and yours ).
toxcct wrote: i think that if he really tries to access a data member from a static one, he definitely has a design problem
The above (IMHO) is often, but not always, true.
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.
|
|
|
|
|
hai all,
Anyone please give examples on dlls using atl application wizard that uses char as input & output parameters. i got examples which uses int & long.
|
|
|
|
|
Hey frnds
Can any one tell me how to create 8 bit bitmap
thx in advance
|
|
|
|
|
See BITMAPINFOHEADER[^] structure (biBitCount for a 24-bit , set this to 24 and for an 8-bit , set this to 8).
|
|
|
|
|
Do you ever look at replies to your previous posts[^]?
What part of this is giving you trouble?
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
First of all,Thank u ,Mark.
I want to Display a 8 bit Bit map using my own palette,
i have designed a paltte in a variable ARGB[256][3].
Now i want to set this as system palette.
My bitmap bit should use this palette.
can u help me ..
Born To Code
|
|
|
|
|
Instead of ARGB[256][3], you may find it easier to use an array of RGBQUAD structs (or RGBTRIPLE
or PALETTEENTRY structs):
RGBQUAD MyColorTable[256];
Then to create a palette:
int nColorCount = 256;
LOGPALETTE *pLogPal = (LOGPALETTE*)new BYTE[sizeof(LOGPALETTE) +
(nColorCount - 1) * sizeof(PALETTEENTRY)];
pLogPal->palVersion = 0x300;
pLogPal->palNumEntries = nColorCount;
for (int i = 0; i < nColorCount; i++)
{
pLogPal->palPalEntry[i].peRed = MyColorTable[i].rgbRed;
pLogPal->palPalEntry[i].peGreen = MyColorTable[i].rgbGreen;
pLogPal->palPalEntry[i].peBlue = MyColorTable[i].rgbBlue;
pLogPal->palPalEntry[i].peFlags = 0;
}
HPALETTE hPalette = ::CreatePalette(pLogPal);
delete[] (BYTE *)pLogPal;
Once you have an HPALETTE, you can select it into a memory DC if you're working with device
dependent bitmaps, a screen/window DC if the screen is in a palette video mode, etc.
If you're working with an 8-bit device-independent bitmap, your color table should be copied
to the bmiColors array in a BITMAPINFO struct.
I'm not sure what type bitmap you're working with so I'm not sure what sample code to show
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Hi all,
I have made a sdi application. i want that my sdi application window should always remain in restore form it should never get maximized. How to disable maximize window option....
thanks in advance
|
|
|
|
|
// m_pMainWnd->UpdateWindow();
//Add this code to the end of application's InitInstall Procedure
SetWindowLong( m_pMainWnd->GetSafeHwnd() , GWL_STYLE , GetWindowLong(m_pMainWnd->GetSafeHwnd() , GWL_STYLE) & ~ WS_MINIMIZEBOX ) ;
|
|
|
|
|
Add cs.style ^= WS_MAXIMIZEBOX; in PreCreateWindow method of CMainFrame
BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
{
if( !CFrameWnd::PreCreateWindow(cs) )
return FALSE;
cs.style ^= WS_MAXIMIZEBOX;
return TRUE;
}
Amar
|
|
|
|
|
How can i get the result ?
I have a CListCtrl ,i have 2 columns column 0, column 1.All i whant is to select lets say 2 rows(GetCheck) , lets say in row 1-column 1 i have 10 in the second selected(GetCheck) row i have 20 , now i need the rezult 10+20=30 , 30 i need this in CEdit m_result.SetWindowText(...);
when i push the button i need to m_list.GetCheck(...); ...i think !
please help me !
Bravoone
|
|
|
|
|
can you give me more details abt your problem?
Regards,
Ram
|
|
|
|
|
Ok,i have try this:
for(int k=0; k<m_list1.getitemcount();k++)
{
if="" (m_list1.getcheck(k)="=" true)
{
="" cstring="" st,s1,s2;
s1="m_list1.GetItemText(k,2);
s2" =="" m_list1.getnextitem(k,2);
st.format("%.1f",atof(s1)="" +="" atof(s2));
="" messagebox(st);
}
="" }
but,messagebox="" give="" me="" s1="" and="" when="" i="" push="" ok="" messagebox="" s2="" but="" need="" s1+s2="sT" maybe="" the="" user="" select="" 30="" rows="" in="" list="" then="" how="" ?
=""
<div="" class="ForumSig">Bravoone
|
|
|
|
|
Your coding seems ok. nothing problem with the code. why dont you debug the code and check the value of s1, s2 and sT.
Regards,
Ram
|
|
|
|
|
is ok i now but i need s1+s2 = sT but my code make this : MessageBox(s1); and then diplay MessageBox(s2); but i need s1 + s2 = sT MessageBox(sT);
How?
Bravoone
|
|
|
|