|
|
IncrediBuild[^] is a development tool that substantially boosts C/C++ compilation speed, reducing a project's build time by up to 90%.
|
|
|
|
|
Hi Friends
I need to shutdown a PC By Code ?
I know ExitWindowsEx but can't understand all the Parameters
The Code Should be able to turn off the PC On All Windows OS.
|
|
|
|
|
BOOL ExitWindowsEx(<br />
UINT uFlags,
DWORD dwReserved
);
set uFlags to EWX_POWEROFF to turn off !!
|
|
|
|
|
I have to get the Bitmap of a HTML page,without displaying it .
The class used to load HTML is CDhtmlDialog .This is the sample code
CDhtmlDialog key;
Key.Navigate(fileName,0,NULL,NULL,NULL,0);
Key.SetWindowPos(this,rect1.left,rect1.top,rect1.Width(),rect1.Height(),SWP_SHOWWINDOW);//OK working
CDC * pDc=Key.GetDC();
HDC htmlDC=pDc->GetSafeHdc();
//create a sample image
CImage dest;
if(dest.CreateEx(118,88,24,BI_RGB,NULL,0)==FALSE)
{
AfxMessageBox("Error in extracting the Keyframe");
return FALSE;
}
HDC destDC=dest.GetDC();
SetStretchBltMode(destDC,HALFTONE);
//copy the
if(StretchBlt(destDC,0,0,118,88,htmlDC,0,0,rect1.Width(),rect1.Height(),SRCCOPY)==FALSE)
{
AfxMessageBox("Unable to Extract Key Frame");
return FALSE;
}
Now the problem with this is that the BItMap is not of the HTML page but of the application Mainframe window !!!!!!
|
|
|
|
|
Hey Friends Can someone suggest a way to get the active
FrameWindow From the Document Class in case of an MDI .
|
|
|
|
|
http://www.codeguru.com/FAQS/FAQ-A01.html
|
|
|
|
|
I want to generate an alarm on the pressing of a certain button in my MFC application. I am totally blank in it. Plz suggest me relevent apis/codes e.t.c to do the particular task.
Reply me soon
|
|
|
|
|
Hi, I tried to change the default document icon in my application but it doesn't reflect in the saved file. Does anybody help me how to do it?
|
|
|
|
|
Did you change both the 16x16 and 32x32 versions of the document icon? Depending on how you have windows explorer setup, only one of these is actually displayed.
Dave
|
|
|
|
|
I have downloaded smtp wrapper classes(infact an MGF project). The code compiles but when I send the mail an error message box appears. I am providing the right SMTP server address(IP) but connection to the server fails.
Thats where the error lies.
if( !m_wsSMTPServer.Connect( GetServerHostName(), GetPort() ) )
{
m_sError = _T( "Unable to connect to the server" );
m_wsSMTPServer.Close();
return FALSE;
}
Please suggest me what to do as I am a beginner and can't figure the errors out easily. So kindly guide me step by step or if you have any codes in working order Plz send me as I am running out of time.
__________________
Reply me soon
|
|
|
|
|
HI,
I'm sure this problem has been reach at least by one developper : in a property sheet, property pages are not initialized (the window handle is invalid) while the user don't activate it.
What is the right manner to initialize all property pages ? Cause I must read the content of all of them in order to produce a XML output and I don't want to produce an update of the modified data.
Thanks !!
|
|
|
|
|
During the OnInitDialog (or equivalent) of the propertysheet, you need to iterate through all the pages and make each one active in turn, I think SetActivePage() is what you want. You may have to add in a small message pumped delay between each SetActivePage() call so that he page can create itself properly.
Roger Allen
Sonork 100.10016
Were you different as a kid? Did you ever say "Ooohhh, shiny red" even once? - Paul Watson 11-February-2003
|
|
|
|
|
Thanks Roger,
The same idea comes to me but I wasn't sure that it was such a good idea because I think this method will produce flickering during initialization, isn't it ?
For my current project, it'es not a problem because I use multiple SDI views and the view containing property sheet isn't showed by default
Thank you agin !
|
|
|
|
|
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!
|
|
|
|