|
During the constructor, modify the m_psp struct of the newly added property page in this way:
this->m_YourPropertyPageDlg.m_psp.dwFlags |= PSP_PREMATURE;
hope this helps.
|
|
|
|
|
Yeah too cool !! Exactly what I was looking for !! Thank you very much Joan !
Sincerly.
|
|
|
|
|
Could someone do me a favor and run depends.exe on windows 95 and let me know if the User32.dll has SendMessageW in it.
I have been able to check windows 98 and it has it, but I dont have a build of windows 95 installed.
I would really appreciate it.
Thank you
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|
|
User32.dll has SendMessageW in it.
FYI: I have access to Win31/95/98/NT 4.0/2000/XP. I not sure about the millinium edition, but I have the installation CD for it.
Trust in the code Luke. Yea right!
|
|
|
|
|
;PHi to all,
MFC TREE CONTROL QUERY
I am working on CTreeCtrl with checkboxes. I donot want checkbox for parent item and at same time require check boxes for child items. Please suggest any way
My tree hierarcy is as
Parent1
Child1.1
Child1.2
Child1.3
Child1.4
Parent2
Child2.1
Child2.2
Child2.3
Child2.4
|
|
|
|
|
Hey Friends
This error message I am getting when I have Created
a Class Inherited from CPropertyPage ie CPropertyPageInherited
Then I again inherit from CPropertyPageInherited
to create a new class CPropertyPageInheritedInherited
But the message map is giving me this error .
If I delete all the message map entries of CPropertyPageInheritedInherited then the code compiles but I need it.
Am I clear in explaining the Problem ?
private: static struct AFX_MSGMAP_ENTRY const * const CPropPage_SecurityGroup::_messageEntries' : 'selectany' can only be applied to statically initialize
d data items with external linkage
|
|
|
|
|
Can you please post the message maps of your two derived classes?
Cheers
Dave
|
|
|
|
|
The First Inherted Class Message Map is
BEGIN_MESSAGE_MAP(CConfigurationPage, CPropertyPage)
//{{AFX_MSG_MAP(CConfigurationPage)
// NOTE: the ClassWizard will add message map macros here
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
I have Used the macro
DECLARE_DYNAMIC(CConfigurationPage)
in the Header file for this first inherited file
The Second Inherited class's message map is
BEGIN_MESSAGE_MAP(CPropPage_SecurityGroup, CConfigurationPage)
//{{AFX_MSG_MAP(CPropPage_SecurityGroup)
OnRvnItemClick)
ON_WM_CREATE()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
Here I have Used the Macro DECLARE_DYNCREATE(CPropPage_SecurityGroup) in the header file .
Am I Right ?
|
|
|
|
|
The first item in your second message map appears wrong (OnRvnItemClick) - although it is possible that codeproject has gobbled some of the characters.
If you are trying to catch a right mouse button click, then you want ON_WM_RBUTTONDOWN(). Alternatively, if OnRvnItemClick() is in response to a click on a button on the page, then it is sent as a command message, and so should be handled by:
ON_COMMAND(ID_BLAH, OnRvnItemClick)
Let me know how you go.
Dave
|
|
|
|
|
Hey Friends
This error message I am getting when I have Created
a Class Inherited from CPropertyPage ie CPropertyPageInherited
Then I again inherit from CPropertyPageInherited
to create a new class CPropertyPageInheritedInherited
But the message map is giving me this error .
If I delete all the message map entries of CPropertyPageInheritedInherited then the code compiles but I need it.
Am I clear in explaining the Problem ?
private: static struct AFX_MSGMAP_ENTRY const * const CPropPage_SecurityGroup::_messageEntries' : 'selectany' can only be applied to statically initialize
d data items with external linkage
|
|
|
|
|
I want to create a CWnd in my dll,the dll file was called by a dialog based program.In the dll ,I use function as follow to create a CWnd:
static CThreadManager *theManager=new CThreadManager;
if(theManager->CreateEx(WS_EX_TRANSPARENT,"TheManager","ThreadManager",WS_POPUP,rc,pWnd,ID_WND,NULL))
{
AfxMessageBox("create successfully!");
}
else
{
CString str;
UINT nCode=GetLastError();
str.Format("error occured and the error code is %d",nCode);
AfxMessageBox(str);
}
the paramter pWnd is a pointer to the Dialog which called the dll,and the Macro ID_WND is a definition for the CWnd.
I found that when these code execute,the function
CreateEx(...)
return FALSE.
But the error code is equal to 0.And I look up MSDN and find that error code 0 is stand for "The operation completed successfully."
I don't know how to deal with it !
And anybody please help me ?
Thanks a lot!
Don't look at me in that way!
|
|
|
|
|
The second parameter of CreateEx() is the name of the registered window class. Have you registered the window class "TheManager" previously via a call to AfxRegisterWndClass()?
Dave
|
|
|
|
|
Thank you !
I Register the class and the function was return TRUE;
Thank you!
Don't look at me in that way!
|
|
|
|
|
I remember seeing a Day from Date covergence algorithim posted a few months back, but for the life of me I can remember what it was. Does anyone know it ?
Regardz
Colin J Davies
Sonork ID 100.9197:Colin
I'm guessing the concept of a 2 hour movie showing two guys eating a meal and talking struck them as 'foreign'
Rob Manderson wrote:
|
|
|
|
|
Try this[^] or this library[^].
-Nick Parker
The true measure of a man is how he treats someone who can do him absolutely no good. - Samuel Johnson
|
|
|
|
|
Thanks Nick
Couldn't open the SourceForge site
The algorithm was about a 4 or 5 liner
I can remember about 1/2 of it so I'll see if I can fill in the blanks.
Regardz
Colin J Davies
Sonork ID 100.9197:Colin
I'm guessing the concept of a 2 hour movie showing two guys eating a meal and talking struck them as 'foreign'
Rob Manderson wrote:
|
|
|
|
|
how can i make CListCtrl control have flat style or CListCtrl skinable?
thank you!
|
|
|
|
|
Turn off the WS_BORDER style and/or WS_EX_CLIENTEDGE extended style until you get the look you want.
--Mike--
THERE IS NO THERE IS NO BUT THERE IS
MAGIC PIXIE DUST BUSINESS GENIE CODE PROJECT
Homepage | RightClick-Encrypt | 1ClickPicGrabber
"You have Erica on the brain" - Jon Sagara to me
|
|
|
|
|
thank you!
|
|
|
|
|
How to Highlight the selected area frame when I have selected some cells and issue the copy command,like Excel?
Kanghongyuan
|
|
|
|
|
Dear all
Can someone tell me how to use "This" point, and what "This" is ?
Thanks
|
|
|
|
|
this is a pointer to the class in which the current function is a member.
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
Here are some examples of when this is used:
1. Sometimes you will see it as a function parameter. For example, registering a callback: Server::RegisterCallback( this );
2. It is used for a lot of overloaded operators:
Vector const & operator +( Vector const & b )<br />
{<br />
...<br />
return *this;<br />
}
3. When overloading operator= you must make sure that the source is not the same as the destination:
Vector const & operator =( Vector const & b )<br />
{<br />
if ( this != &b )<br />
{<br />
...<br />
}<br />
return *this;<br />
}
You will probably never see "this->" because there is never a need for it -- it is automatic.
|
|
|
|
|
I am trying to attach to a process with my debugger, but I want to specify a different debugger. I seem to recall there being a registry key that I am supposed to set. Anyone know what it is, and are there other steps I have to take?
Jon Sagara
I have no complaint with the “mentoring concept” or the marriage concept or the sex concept. But if you pay for any of those, something’s wrong.
-- John T. Reed in The real estate B.S. artist detection checklist [^]
|
|
|
|
|
Does this help?
From the "Debugging Applications" book:
Common Debugging Question
--------------------------------------------------------------------------------
How do I change the default debugger that the operating system will use when a crash occurs?
When an application crashes, Windows 2000 looks in the registry key HKEY- _LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AeDebug , and Windows 98 looks in the [AeDebug] section of WIN.INI to determine what they should call to debug the application. If no values are in the key, Windows 2000 reports the address of the crash. If an access violation caused the crash, Windows 2000 also reports the memory location that the process couldn't read or write. Windows 98 displays the standard crash dialog box, and if you click the Details button, it will list the module, address, and registers at the time of the crash.
Three possible string values can be placed in the AeDebug key or section.
Auto
Debugger
UserDebuggerHotKey
If Auto is set to 0 (zero), the operating system will generate the standard crash dialog box and enable the Cancel (Windows 2000) or Debug (Windows 98) button if you want to attach the debugger. If Auto is set to 1 (one), the debugger is automatically started. The Debugger value specifies the debugger the operating system will start on the crashed application. The only requirement for the debugger is that it supports attaching to a process. The UserDebuggerHotKey value identifies the key that will be used to break into the debugger. Refer to the section "Quick Break Keys" later in the chapter to find out how to set this value.
You can set the AeDebug key manually, but Dr. Watson (Windows 2000 only), WinDBG, and the Visual C++ debugger allow you to set it through various means. Dr. Watson and WinDBG use the -I command-line switch that will set them as the default debugger. To set the Visual C++ debugger as the debugger the operating system will call, on the Debug tab in the Options dialog box, check Just-In-Time Debugging.
If you do look at the AeDebug key, the value that's entered for Debugger looks like a string passed to the wsprintf API function: "drwtsn32 -p %ld -e %ld -g." That's exactly what it is. The -p is the process ID for the crashing process, and the -e is an event handle value that the debugger needs to signal when its debug loop gets the first thread exit debug event. Signaling the event handle tells the operating system that the debugger attached cleanly.
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|