|
Hi,
I have got Problem With ActiveX.I created ActiveX Using OWC. i tested this activex in dialog based apllication. when i closed(on application termination) the dialog got an error , memmory location feefee() could not read. problem is my program is try to free the memory that isn't allocated.how can override this problem.
by
baijumax
|
|
|
|
|
i have an application using visual c++ 5.0 where a right-click on an application toolbar icon gives a submenu. The submenus initially come up correctly, but then quickly go into the background behind the application toolbar or existing context menus. Seems to be intermittent too, sometimes they'll stay in foreground.
Also getting this problem with the windows that pop up from a click on a 'What's This' help.
The winhelp calls are all:
WinHelp(..,..,HELP_CONTEXTMENU,..)
Any ideas how I keep the new screens in the foreground?
Thanks,
tkd
|
|
|
|
|
Alright...this is a small part of a problem I'm doing for C++ class..We have to store a floating integer T. T=1.5 . Now, we have to convert this stored value to hex...Kinda like this:
float t;
t = 1.5;
std::hex << t << "\n";
Or whatever..You get the idea tho..store the value, and convert it to it's hex format.
Have any suggestions?
|
|
|
|
|
hello,
i think you ar elooking for sprintf() function
-----------------------------
"I Think It Will Help"
-----------------------------
Alok Gupta
visit me at http://www.thisisalok.tk
|
|
|
|
|
depends how do you want to convert it to hex ... you know usually only ints are converted to hexes ... floating part is not carried over.
You could do printf( "%X", (int) t ); to print it in hex, but it will print only integer part.
If you want to print its binary representation you could do printf( "%08X", *((long*) &t) );
|
|
|
|
|
I have an unusual piece of code that i am writing where i need to output 3 rectangles of 3 different sizes to a window and alternate them every second. Basically it shows a new rectangle every second. Anyhow i can do it where the rectangles are alternated its just if a smaller rectangle appears on a larger one that on doesn't go away. Is there an MFC function that i am missing?
|
|
|
|
|
YEah look for invalidateRect() api that may help in above cause
basically this api repaint any given rectangular position in the given window.
now follow simple logic,first copy the image data or triangle coordinate in another variabel ,which you want to display and send message to window to repint that position
like this(remember this is logic)
triangle a,b,c & tmp;
you hav displayed them at any given time,
now oN WM_TIMER message of Seconds
copy one triangle in another like this
tmp=a;
a =b;
b=c;
c =tmp;
and call invalidate() to repaint or display the triangle
-----------------------------
"I Think It Will Help"
-----------------------------
Alok Gupta
visit me at http://www.thisisalok.tk
|
|
|
|
|
Hi,
How can I extract an Icon from an Image List as HBITMAP, with a specific backgrund color?
TIA
Peter
we are here to help each other get through this thing, whatever it is Vonnegut jr.
sighist Fold With Us! || Agile Programming | doxygen
|
|
|
|
|
I do it by creating a new bitmap the same size as an icon in the image list, do a FillRect() with the background colour, then Draw() the icon on it.
CBitmap *CMyImageList::GetBitmap(int index, CSize size, COLORREF clrBkGrnd)
{
int count = GetImageCount();
if (!(index < count && index >= 0))
return NULL;
IMAGEINFO info = {0};
GetImgeInfo(index, &info);
CSize ImageSize(info.rcImage.right - info.rcImage.left,
info.rcimage.bottom - info.rcImage.top);
int x = 0;
int y = 0;
if (size.cx != ImageSize.cx)
x = (size.cx - ImageSize.cx) / 2;
if (size.cy != ImageSize.cy)
y = (size.cy - ImageSize.cy) / 2;
CBitmap *pbmp = NULL;
CDC DC;
if (DC.CreateCompatibleDC(NULL))
{
int saved = DC.saveDC();
pbmp = new CBitmap;
if (pbmp)
{
if (pbmp->CreateCompatibleBitmap(NULL, size.cx, size.cy))
{
if (DC.SelectObject(pbmp))
{
DC.FillSilidRect(0, 0, size.cx, size.cy, clrBkGrnd);
Draw(&DC, index, CPoint(x, y), ILD_NORMAL);
}
}
}
DC.RestoreDC(saved);
}
return pbmp;
}
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" mYkel - 21 Jun '04
Within you lies the power for good - Use it!
|
|
|
|
|
Hi, I have a simple dialog box app and would like to add a progress bar to it. The progress bar simply needs to move toward completion when a button is pressed. It needs to move toward completion based simply on a time, ie needs to be finished after the button is pressed in 5 seconds. Thanks for the help sorry i am such a noob. The progress bar ID i am using is OnOutofmemoryProgress2. Thanks.
|
|
|
|
|
add WM_TIMER functionality in your program suing winodow handller menu.
according to your calculation set the timer and using the Progressbar variable finsih it within 5 sec.
and by the way ->
The progress bar ID i am using is OnOutofmemoryProgress2. Thanks.
--> is not id,its a event on Progressbar and id is like this IDR_PROGRESSBAR1 or some thing like that.
-----------------------------
"I Think It Will Help"
-----------------------------
Alok Gupta
visit me at http://www.thisisalok.tk
|
|
|
|
|
|
I'm interested in finding a method to verify the digital signature of a file so that I'll know if it's been altered since I signed it.
I looked at WinVerifyTrust(), but it only exists in NT/XP - not Win9x (which I still need to support).
Microsoft does however have a tool called ChkTrust.exe
Does anyone know "how" chktrust.exe works under win9x?
[ Jason De Arte | Toy Maker | 1001010.com ]
|
|
|
|
|
Well, after a few hours of digging and testing my theories - I've answered my own question. There's this thing called CAPICOM.DLL that provides a number of com interfaces for checking the authenticode signature on a file. And it even (as the rumor goes) have a redistributable for win98!
With a little work, I'm sure somebody with more time on their hands than I, could write up a full featured article that also Signs and timestamps a file.
#ifndef __SIGNED_CODE_H__
#define __SIGNED_CODE_H__
#import "capicom.dll" named_guids no_implementation
#pragma once
class CSignedCode
{
protected:
CComQIPtr<CAPICOM::ISignedCode> m_spSignedCode;
public:
CSignedCode(LPCTSTR pszFileName)
{
HRESULT hr = m_spSignedCode.CoCreateInstance(CAPICOM::CLSID_SignedCode);
if( SUCCEEDED(hr) && pszFileName && *pszFileName )
SetFileName( pszFileName );
}
HRESULT SetFileName( LPCTSTR pszFileName )
{
if( !m_spSignedCode )
return E_POINTER;
return m_spSignedCode->put_FileName( CComBSTR(pszFileName) );
}
HRESULT Verify(BOOL bAllowWindowsPromptUI)
{
if( !m_spSignedCode )
return E_POINTER;
return m_spSignedCode->raw_Verify(bAllowWindowsPromptUI?VARIANT_TRUE:VARIANT_FALSE);
}
HRESULT GetDescription(CString& rstrDescription)
{
if( !m_spSignedCode )
return E_POINTER;
CComBSTR bs;
HRESULT hr = m_spSignedCode->get_Description(&bs);
if( SUCCEEDED(hr) )
rstrDescription = bs;
return hr;
}
HRESULT GetURL(CString& rstrDescriptionURL)
{
if( !m_spSignedCode )
return E_POINTER;
CComBSTR bs;
HRESULT hr = m_spSignedCode->get_DescriptionURL(&bs);
if( SUCCEEDED(hr) )
rstrDescriptionURL = bs;
return hr;
}
HRESULT GetFileName(CString& rstrFileName)
{
if( !m_spSignedCode )
return E_POINTER;
CComBSTR bs;
HRESULT hr = m_spSignedCode->get_FileName(&bs);
if( SUCCEEDED(hr) )
rstrFileName = bs;
return hr;
}
};
#endif //__SIGNED_CODE_H__
[ Jason De Arte | Toy Maker | 1001010.com ]
|
|
|
|
|
Query:
I am building an MFC app. I try to open the resource file and I get a red circle icon with a white asterisk inside that says the "resource is open in another editor".
I then close all files (presumably) and restart. I get the same message from the resource. What's up w/ that? Nothing is "open"....
thanks
|
|
|
|
|
hi,
"resource is open in another editor" is coming when you already open the resource file.You can open the resource file twise.
thanks..
|
|
|
|
|
Hello. How can I do the following: when choosing some item from a popup menu (with a right button click) another popup is shown offering some things to do with that item. I don't need it to do classic way that is to use InsertMenu method with MF_POPUP flag but so that this additional menu is shown only on mouse click.
|
|
|
|
|
Handle WM_MENURBUTTONUP to know when the user r-clicks a menu. In response to that message, call TrackPopupMenu() again with the TPM_RECURSE flag.
--Mike--
Personal stuff:: Ericahist | Homepage
Shareware stuff:: 1ClickPicGrabber | RightClick-Encrypt
CP stuff:: CP SearchBar v2.0.2 | C++ Forum FAQ
----
Pinky, are you pondering what I'm pondering?
I think so Brain, but how will we fit the hamster inside the accordion?
|
|
|
|
|
|
Hi Dudes,
How to compile HTML files like we do in HTMLHelp Creation. Is there any SDK to do that.
Thanks & Regards,
Promise (hmmm... I am afraid of it).... Some times.
If you have in the cause and
the means and in God, the hot
Sun will be cool for you.
|
|
|
|
|
DELIVER THE PROMISE wrote:
Is there any SDK to do that.
Yes. Click here[^].
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
Hi Bhavani,
Thanku very much.
I don't want to create HtmlHelp. But I want to compile Html files so that I can create an Ebook creation software. This software takes the HTML files as an input and produce an Ebook. I have to create such type of software.
Thanks for all that help.
Promise
If you have faith in the cause and
the means and in God, the hot
Sun will be cool for you.
|
|
|
|
|
am using the MFC Dialog Box project to make my program and i created another Dialog Box as my update window for the program am making.
so visual studo made the class created an object like
UDP UBox;
UBox.DoModal()
and it worked only problem is when i press Ok the update Dialog Box it close both Dialog Boxes how could i stop this i want the Dialog Box to stay open
|
|
|
|
|
Where do you call your DoModal?
<italic>Work hard and a bit of luck is the key to success.
|
|
|
|
|
in my
Onbutton_press
{
//here
}
|
|
|
|