15 мая 2023 года "Исходники.РУ" отмечают своё 23-летие!
Поздравляем всех причастных и неравнодушных с этим событием!
И огромное спасибо всем, кто был и остаётся с нами все эти годы!

Главная Форум Журнал Wiki DRKB Discuz!ML Помощь проекту


AniPushButton

mfc-l Conference @ scet.org.uk -- XINCLXmfc-l@scet.org.uk
Thursday, September 19, 1996

Environment: VC++4.0/MFC, Win95 

I have derived a class from CCanibuton (AniPushButton from the componet
gallery). I have added it to a dialogue by creating it on initial update. It
works fine on any machine with MFC4 installed on it. but it will not create
the buttons on any other machine. I have installed and registered
"ANIBTN32.OCX" on the machine. The AniPushButton works if you add it to the
dialogue in app studio but not if you create it on the fly by using the
CCanibuton::Create method.
the code I use to create the Button is:
	//Create the animated button required  - use the button frame as a guide for
positioning
	 CWnd *pFrame = GetDlgItem(IDC_BUTTON_FRAME1);
	 CRect ctRect;
	 pFrame->GetWindowRect(ctRect);
	 this->ScreenToClient(ctRect);

	 if (m_ctImagAnimatedButton.Create(NULL,WS_VISIBLE|WS_CHILD|WS_BORDER,
ctRect, this, 
		 ID_IMAG_ANIMATED_BUTTON))


 Am I missing something out when I create it?
 What do I need to install ,which MFC4 installs, to run my stand alone
version?

Thanks for you help in advance.




--

     _/_/_/  _/_/_/  _/_/_/  _/_/_/  | Tel: (0141) 337 5000  
    _/      _/      _/        _/     | Fax: (0141) 337 5050  
   _/_/_/  _/      _/_/      _/      | Net: scet@scet.org.uk 
      _/  _/      _/        _/       | AppleLink: SCET.DEV   
 _/_/_/  _/_/_/  _/_/_/    _/        | WWW: http://www.scet.org.uk
......learning through technology   |



LeRoy Baxter -- lbaxter@transport.com
Saturday, September 21, 1996

[Mini-digest: 2 responses]

I would guess that you need one of the MFC runtime dll's (mfc30.dll?, mfc40.dll?, etc)
check the redist subdirectory of VC++, also if you use QuickView you should be able
to find out exactly what dll's you need.

On Thursday, September 19, 1996 4:25 AM, mfc-l Conference @ scet.org.uk[SMTP:XINCLXmfc-l@scet.org.uk] wrote:
>Environment: VC++4.0/MFC, Win95 
>
>I have derived a class from CCanibuton (AniPushButton from the componet
>gallery). I have added it to a dialogue by creating it on initial update. It
>works fine on any machine with MFC4 installed on it. but it will not create
>the buttons on any other machine. I have installed and registered
>"ANIBTN32.OCX" on the machine. The AniPushButton works if you add it to the
>dialogue in app studio but not if you create it on the fly by using the
>CCanibuton::Create method.
>the code I use to create the Button is:
>	//Create the animated button required  - use the button frame as a guide for
>positioning
>	 CWnd *pFrame = GetDlgItem(IDC_BUTTON_FRAME1);
>	 CRect ctRect;
>	 pFrame->GetWindowRect(ctRect);
>	 this->ScreenToClient(ctRect);
>
>	 if (m_ctImagAnimatedButton.Create(NULL,WS_VISIBLE|WS_CHILD|WS_BORDER,
>ctRect, this, 
>		 ID_IMAG_ANIMATED_BUTTON))
>
>
> Am I missing something out when I create it?
> What do I need to install ,which MFC4 installs, to run my stand alone
>version?

-----From: Shiva Shenoy 

You should look at the MS KB article Q151771- Sample: Requesting a
license key...
You should have verified what the GetLastError() was returning.

I think virtual function Create is a calling CreateControl for that
control.
You may need to pass bstrLicKey when you dynamically create OCXs.
Make sure you call the appropriate Create method that takes the
bstrLicKey.




| Вернуться в корень Архива |