Free Mfc Profile Layouts

🛑 ALL INFORMATION CLICK HERE 👈🏻👈🏻👈🏻
Free Mfc Profile Layouts
User/Email Password
Forgot Password?
LOGIN | REGISTER
Want to make your own layout? It's easy! Just choose your site from the list below.
Tumblr Generator
Create your own themes for your Tumblr!
Myspace 2.0 Editor
Create your own layout for version 2.0 of myspace profiles!
Myspace Editor
Control nearly every aspect of your profile with our easy to use Myspace editor.
Blogger Editor
The power of Pimp My Profile is now available for Blogger!
hi5 Editor
Pimp your hi5 with our hi5 layout editor.
Friendster Editor
Make your Friendster more friendly with our Friendster Editor!
TheForumSite.com Editor
Edit your TFS profile ... Now use the same editor for your profiles and journals!
Pimp-My-Profile.com is in no way endorsed by or affiliated with myspace, hi5, blogger, friendster, twitter or any other site.
Copyright © 2006-2022 Funky Llama Productions, LLC, its licensors and contributors. All rights reserved.
Login |
Legal Information |
Privacy |
Terms of Use |
Contact |
Advertise
We no likey: monster energy, heineken
Clustered by LiquidWeb
User/Email Password
Forgot Password?
LOGIN | REGISTER
Pages: 1 2 3 4 5 6 7 8 ... 2634 2635 2636 2637 2638 2639 2640 2641 · >> Jump to page:
Search Layouts
MySpace
Twitter
Youtube
Tumblr
Friendster
hi5
Blogger
Sort layouts by Newest · Rating · Popular · Most Rated · Views
Pimp-My-Profile.com is in no way endorsed by or affiliated with myspace, hi5, blogger, friendster, twitter or any other site.
Copyright © 2006-2022 Funky Llama Productions, LLC, its licensors and contributors. All rights reserved.
Login |
Legal Information |
Privacy |
Terms of Use |
Contact |
Advertise
We no likey: monster energy, heineken
Clustered by LiquidWeb
Search within:
Articles
Quick Answers
Messages
Please Sign up or sign in
to vote.
Templates are a great way of reusing code, unfortunately MFC makes it hard to write MFC friendly template classes...
Software Developer (Senior)
JetByte Limited
Len has been programming for over 30 years, having first started with a Sinclair ZX-80 . Now he runs his own consulting company, JetByte Limited and has a technical blog here .
JetByte provides contract programming and consultancy services. We can provide experience in COM, Corba, C++, Windows NT and UNIX. Our speciality is the design and implementation of systems but we are happy t ...
Len has been programming for over 30 years, having first started with a Sinclair ZX-80 . Now he runs his own consulting company, JetByte Limited and has a technical blog here .
JetByte provides contract programming and consultancy services. We can provide experience in COM, Corba, C++, Windows NT and UNIX. Our speciality is the design and implementation of systems but we are happy to work with you throughout the entire project life-cycle. We are happy to quote for fixed price work, or, if required, can work for an hourly rate.
We are based in London, England, but, thanks to the Internet, we can work 'virtually' anywhere...
Please note that many of the articles here may have updated code available on Len's blog and that the IOCP socket server framework is also available in a licensed, much improved and fully supported version, see here for details.
You must Sign In to use this message board.
Spacing
Relaxed Compact Tight
Layout
Normal Open Topics Open All Thread View
Per page
10 25 50
Free C++ libraries with source code on www.neatcpp.com : TWAIN, DirectShow, Interprocess Communications, etc...
Len Holgate
www.jetbyte.com
The right code, right now.
Len Holgate
www.jetbyte.com
The right code, right now.
Christopher Stratmann 23-Mar-06 1:40
Article Copyright 2000 by Len Holgate Everything else
Copyright © CodeProject , 1999-2022
Web01
2.8.2022.07.15.1
Templates are cool. Being able to write code that can work on objects of any type that satisfies the minimum functionality that you require, make reusing code considerably easier. No more type-unsafe generic coding methods, like void * 's and macros. Templates solve all manner of problems.
Using templates with MFC classes, especially MFC classes with message maps, isn't easy. Why would you want to do so? Well, how about a class derived from a list box that can manage the lifetime of the objects displayed in it? You could put items into the list and store pointers to them in the item data and when the box is destroyed, it can clean up and delete the objects for you. One problem with this is that at the point where the list box deletes your object, it only has a void * pointer to it. Calling delete on that pointer wont call the object's destructor.
Luckily, although you have to jump through a few hoops, it's not that difficult to make MFC classes work with templates. The main problem are the message map macros.
If you look at the standard BEGIN_MESSAGE_MAP macro, you can see the problem:
If the class you're declaring a message map for is a template class then the macro expands all wrong... The template bits are missing. What you really need is something more like this....
The macro above recognizes the fact that the class is a template and puts the template bit in the right places.
where TListBox<> is the derived class you're setting up the message map for, CJBListBox is the base class and the bit is what ever is appropriate for your template definition.
When it comes to implementing the handler, you do it in the usual way...
And because you KNOW the type of object that you're storing in the list box's item data ptr, you can implement DeleteAll() like this:
Of course, it's not quite that easy. The class wizard often goes nuts when it sees these classes, so it's best to fully implement the class for a particular data type before you turn it into a template. Alternatively, keep the original class wizard macro to hand, and just comment it out when you don't need to do class wizard stuff.
If you comment the Template version out and uncomment the standard version, then you can add more message handlers using class wizard. Then you should switch the comments and adjust the generated code to suit.
Since there are different versions of the message map macros for when _AFXDLL is defined and when it's not, the full code required is as follows:
The sample code shows this in action. First we define a list box that knows how to manage the lifetime of objects within it, then we derive another template class from it that knows how to populate itself from an STL style iterator that's passed to its constructor.
While I was tidying up the example code, I realized that I needed a template class in the form:
Of course, as soon as I put this into the macro, it broke... The problem is that the comma required between the part of the template becomes two macro parameters... I quickly wrote a quick fix, a macro that explicitly took the extra template parameter. The problem was that this was ugly (I now had 2 template message map macros) and it wasn't extensible. (If I needed a template with 3 parameters, or if the base class needed multiple template parameters, I had to change the complex macro to cope.) At around this time, I saw the message on the guest book from Dave Lorde mentioning a similar problem...
After some thought, it became obvious that the problem could be solved by another level of indirection. I added the following simple macros to the top of the header file and removed the extra message map macro:
The message map macro needed one final change (including the <>'s for the initial template declaration)...
Now you can use the macro as follows:
wrapping multiple template parameters in the appropriate macros before use. The main message map macro never needs changing, if you need more parameters just add another simple macro pair to the top of the file. What's more, these macros can be used when the base class has multiple parameters too!
When the dialog is initialized, the list is created and passed the iterators it needs. There's a horrible hack in here so that when it gets its first message (and we know the actual window exists!), we populate the list box from the iterators. When the box is destroyed, we clean up. If anyone knows a better way to tell when a window has been created and actually exists so we can send messages to it, please tell me!
The nice thing about the code presented is that it can be used for any kind of object that can be iterated over by an iterator. The sample shows the same code being used for a list of GUIDs in the registry and a list of GUIDs obtained from the component category manager.
See the article on Len's homepage for the latest updates.
This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)
General News Suggestion Question Bug Answer Joke Praise Rant Admin
Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.
.h file:
template
class CSpinTmpl :
public CSpinButtonCtrl
{
DECLARE_MESSAGE_MAP()
public:
CSpinTmpl(){};
~CSpinTmpl(){};
protected:
public:
afx_msg void OnDeltapos(NMHDR *pNMHDR, LRESULT *pResult)
{
LPNMUPDOWN pNMUpDown = reinterpret_cast(pNMHDR);
// TODO: Add your control notification handler code here
*pResult = 0;
};
};
.cpp file
#define TEMPLATE_1(t1) t1
#define TEMPLATE_2(t1, t2) t1, t2
#define TEMPLATE_3(t1 ,t2 ,t3) t1, t2, t3
#define TCLASS_1(theClass, t1) theClass
#define TCLASS_2(theClass, t1, t2) theClass
#define TCLASS_3(theClass, t1, t2, t3) theClass
#ifdef _AFXDLL
#define BEGIN_TEMPLATE_MESSAGE_MAP(theTemplate, theClass, baseClass) \
template const AFX_MSGMAP* PASCAL theClass::GetThisMessageMap() \
{ return &theClass::messageMap; } \
template const AFX_MSGMAP* theClass::GetMessageMap() const \
{ return &theClass::messageMap; } \
template AFX_COMDAT const AFX_MSGMAP theClass::messageMap = \
{ &baseClass::GetThisMessageMap, &theClass::_messageEntries[0] }; \
template AFX_COMDAT const AFX_MSGMAP_ENTRY theClass::_messageEntries[] = \
{ \
#else
#define BEGIN_TEMPLATE_MESSAGE_MAP(theTemplate, theClass, baseClass) \
template const AFX_MSGMAP* theClass::GetMessageMap() const \
{ return &theClass::messageMap; } \
template AFX_COMDAT const AFX_MSGMAP theClass::messageMap = \
{ &baseClass::messageMap, &theClass::_messageEntries[0] }; \
template AFX_COMDAT const AFX_MSGMAP_ENTRY theClass::_messageEntries[] = \
{ \
#endif
BEGIN_TEMPLATE_MESSAGE_MAP(TEMPLATE_2(class GubiciGabariti, class Jezgro),
TCLASS_2(CSpinTmpl, GubiciGabariti, Jezgro), CSpinButtonCtrl)
ON_NOTIFY_REFLECT(UDN_DELTAPOS, OnDeltapos)
END_MESSAGE_MAP()
First error in the list:
messageMap' : is not a member of 'CSpinTmpl
I'm just thinking if typedef can solve the problem?
use typedef and then use MFC message map macroes as usual?
template class TImageCollectionListCtrl : public TCollectionListCtrl
BEGIN_TEMPLATE_MESSAGE_MAP(TEMPLATE_2(class T, class TI),
TCLASS_2(TVehicleCollectionListCtrl, T, TI),
TImageCollectionListCtrl)
? I get a too many parameters error
Thank you so much for providing this code. I was able to finally create a template dialog.
Chris
I used the latest version of the original macro from afxwin.h and made the appropriate modifications.
#ifdef _AFXDLL
#define BEGIN_TEMPLATE_MESSAGE_MAP(theTemplate, theClass, baseClass) \
template const AFX_MSGMAP* PASCAL theClass::GetThisMessageMap() \
{ return &theClass::messageMap; } \
template const AFX_MSGMAP* theClass::GetMessageMap() const \
{ return &theClass::messageMap; } \
template AFX_COMDAT const AFX_MSGMAP theClass::messageMap = \
{ &baseClass::GetThisMessageMap, &theClass::_messageEntries[0] }; \
template AFX_COMDAT const AFX_MSGMAP_ENTRY theClass::_messageEntries[] = \
{ \
#else
#define BEGIN_TEMPLATE_MESSAGE_MAP(theTemplate, theClass, baseClass) \
template const AFX_MSGMAP* theClass::GetMessageMap() const \
{ return &theClass::messageMap; } \
template AFX_COMDAT const AFX_MSGMAP theClass::messageMap = \
{ &baseClass::messageMap, &theClass::_messageEntries[0] }; \
template AFX_COMDAT const AFX_MSGMAP_ENTRY theClass::_messageEntries[] = \
{ \
#endif
Ken
It said: error C2039: “_GetBaseMessageMap” : is not member of “JetByteTools::TListBox”
Johnson Zhou
Hi,
i get warning C4211 on BEGIN_TEMPLATE_MSG_MAP
I's there a solution ?
I get this error when linking using this cheat, any idea of why?, thx in advance.
David Huelves Ramos
Thank you for this great piece of code
I was trying to apply this to my application, and I have noticed that I need to make INPLEMENT/DECLEAR_DYNCREATE macro to be templated also... I have tried couple of things in the same way you have templated the message map, but I can't get it compiled...
Do you know what is wrong with my attempt?
#define IMPLEMENT_TEMPLATE_RUNTIMECLASS(theTemplate, class_name, base_class_name, wSchema, pfnNew) \
template theTemplate AFX_COMDAT const AFX_DATADEF CRuntimeClass class_name::class##class_name = { \
#class_name, sizeof(template theTemplate class class_name), wSchema, pfnNew, \
RUNTIME_CLASS(base_class_name), NULL }; \
template theTemplate CRuntimeClass* class_name::GetRuntimeClass() const \
{ return RUNTIME_CLASS(class_name); } \
#define IMPLEMENT_TEMPLATE_DYNCREATE(theTemplate, class_name, base_class_name) \
template theTemplate CObject* PASCAL class_name::CreateObject() \
{ return new class_name; } \
IMPLEMENT_TEMPLATE_RUNTIMECLASS(theTemplate, class_name, base_class_name, 0xFFFF, \
class_name::CreateObject)
Thank you!
Thanks for the nice Article !!! I ran into this issue trying to make a template class for the CInPlaceEdit class of Chris Maunder's MFC Grid Control - "template class TCInPlaceEdit : public BASE_EDIT". The Template would have allowed the reuse of the CInPlaceEdit Class for any type of control rather than having to create 2 new classes (one derived from CGridCell, one to replace CInPlaceEdit)for every control class. My problems came when trying to use the MFC CRunTimeClass mechanism. I could not get the RUNTIME_CLASS macro to work with the template class above. When I did get it to compile I got link errors saying the template class Default Constructor method was undefined. I instantiated an object at the file scope but that still didn't help. Anyway, I had to remove the template from my project (deadlines!)and continue but I hate to leave something unsolved; even if it requires asking help from someone with more experience. I've worked a lot with templates in Object Oriented Databases but my MFC experience is somewhat limited. Do you have any ideas or examples of using RUNTIME_CLASS with templates of this type ??? Any input would be appreciated. Thanks, John.
Last Visit: 31-Dec-99 18:00 Last Update: 11-Aug-22 15:21
Inside Mockplus
UI design
UX design
Design and Prototyping tools
Web design
Mobile design
Interaction design
Product design
News and Events of UX design
UX design guest post
Blog
>
UI design
>
50 Free Profile Page Design Samples&Templates [PSD+Sketch] for Inspiration
#profile page design
#user profile page design template
#Dribbble profile page design
Products
Mockplus Cloud
Mockplus DS
Mockplus RP
Mockplus DT
Mockplus Enterprise
Use Cases
Free wireframe tool
App prototyping tool
Web prototyping tool
Remote collaboration
Integrations
Resource
New releases
All features
Blog
Design glossary
Support
About us
Contact us
Students&teachers
Mockplus for startup
Compare
InVision
Zeplin
Axure
Products
Mockplus Cloud
Mockplus DS
Mockplus RP
Mockplus DT
Mockplus Enterprise
Use Cases
Free wireframe tool
App prototyping tool
Web prototyping tool
Remote collaboration
Integrations
Resource
New releases
All features
Blog
Design glossary
Support
About us
Contact us
Students&teachers
Mockplus for startup
Compare
InVision
Zeplin
Axure
Mockplus - Design Faster. Collaborate Better.
Prototype, design, collaborate, and design systems all in Mockplus
To get the latest and most quality design resources!
Best wireframing and prototyping tool for APP and Web design.
One platform for design, prototype, hand-off and design systems.
With various streaming apps cropping up left and right, we have noticed drastic changes in mobile or web application user interface designs. Whether it's a web page or an app, profile page design is a crucial part in social networking platforms .
The user profile page is the most direct way for people to know each other , and it is also a symbol of pers
Free Hd Adult Tube
Pussy Licking Instructions
Athena Blaze Videos