473,651 Members | 2,525 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

MFC Custom Control in Extension DLL

Hi all,

I have a problem using Custom control class inside a DLL Extension.

My Custom control use Class property to specify the register class name
for the control.
Both Dialog Class and Custom control class are inside the dll.
When i run the application i can't view the dialog and Vc++ display an
error on ShowWindow procedure.

If I use the class control and dilog outside the dll all go well but NOT
inside the dll.
I think that the problem is on registering control class that register
it on executable proc and not on the dll one.
Any idea?

Here is my resgister control class procedure.

WNDCLASS wndcls;
HINSTANCE hInst = AfxGetInstanceH andle();

if (!(::GetClassIn fo(hInst, BUTTONSBOX_CLAS SNAME, &wndcls)))
{
// otherwise we need to register a new class
wndcls.style = CS_DBLCLKS | CS_HREDRAW | CS_VREDRAW;
wndcls.lpfnWndP roc = ::DefWindowProc ;
wndcls.cbClsExt ra = wndcls.cbWndExt ra = 0;
wndcls.hInstanc e = hInst;
wndcls.hIcon = NULL;
wndcls.hCursor =
AfxGetApp()->LoadStandardCu rsor(IDC_ARROW) ;
wndcls.hbrBackg round = (HBRUSH) (COLOR_3DFACE + 1);
wndcls.lpszMenu Name = NULL;
wndcls.lpszClas sName = BUTTONSBOX_CLAS SNAME;

if (!AfxRegisterCl ass(&wndcls))
{
AfxThrowResourc eException();
return false;
}
}

I hope that someone can help me.
Thanks in advice

--
Caronte
--
Posted via Mailgate.ORG Server - http://www.Mailgate.ORG
Jul 22 '05 #1
1 4866
"Caronte" <ca*****@hotpop .com> wrote in message
news:72******** *************** *************@m ygate.mailgate. org...
Hi all,

I have a problem using Custom control class inside a DLL Extension.


[snip]

http://www.slack.net/~shiva/welcome.txt

DW

Jul 22 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2732
by: Arsen V. | last post by:
> Hello, > > How to control the structure of the HTML inside of the ItemTemplate of the > Repeater? > > For example, if a certain data column value is empty (or contains some > specific string or number), I want to be able to "hide" a part of the HTML > of the ItemTemplate. > > Say a customer has phone number and extension. The extension is optional.
6
2830
by: Nick Horrocks | last post by:
I have set up a custom error page for 404 errors. However the HTTP status code returned is 302 followed by 200, this causes search engines not to remove old pages from their index. How can I get the correct status code to be returned? Thanks
2
1724
by: Vadim | last post by:
I have downloaded Custom Control (Multi-Column DropDown With AutoComplete) from the web. In the sample I downloaded (VB.NET application) it works perfectly. I tried to put the same control to the ASP.NET application by adding the custom control's project into my solution and then added reference from my main project to this project.
3
1530
by: Hope Paka | last post by:
I want to use my custom url extension instead of .aspx. I can achieve this by writing a custom handler that implements the IHttpHandlerFactory. In the GetHandler method of the IHttpHandlerFactory i want to construct a Page class instance and load my other controls to it and return the page instance. This is what .net framework does. There is a small difference what i am thinking and the .net framework has done. .Net Framework calls the...
7
2911
by: Adam | last post by:
Im trying to add an httphandler for all *.sgf file extensions. I have developed the handler, 1. installed it into the gac 2. added it to the machine.config: <httpHandlers> <add verb="*" path="*.sgf" type="CustomExtensionHandler, Extenders.CustomExtensionHandler, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d831d925597c1031" validate="True"/> </httpHandlers>
5
1805
by: bryan | last post by:
If I understand correctly, I can write a custom handler for a given extension (say .abcd files) by writing a class that implements the IHttpHandler interface and then registering it in my web config file. Once I do that, how do I differentiate between different pages with the abcd extension, and write specific code for each page? (And keep that code with the page, similar to codebehind.?) Thanks, Bryan
7
1351
by: Flashster | last post by:
My program writes text to a file. Currently the files have a suffix of '.log' . I want to make sure that the user does not attempt to open a file that was not originally created by my program. I don't really want to write some code to the top of the text file that I'd have to filter out each time I read it, so how else would I do it? Would I perhaps: i) create a custom file type with a custom suffix and get the system to associate...
2
1308
by: PR | last post by:
Hello, I'm creating a Windows control that includes a few textboxes. In the form designer, I want there to be one property that drops down into a few sub-values for the different text boxes, somewhat akin to how Location and Size usually work for many standard controls. (There may be more appropriate ways to do this, but I'm kind of doing it as a self-tutorial.)
5
3738
by: John Kotuby | last post by:
Hi all, This is my first time trying to creaet and use a custome Web Control in a Web Site project in ASP.NET 2.0 with VS 2005 and VB. I created the control in a separate Web Control Library project. The original code for that control was written in VS 2003 for .NET 1.1. I created a Web Project and pulled the VB module into the project. I compared the syntax to the VB template classs that was built and it looked very similar. I then...
0
8347
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8275
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
8457
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7294
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6157
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4143
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4280
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2696
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1905
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.