|
Hi
We are devolopping one project in this project it is required to add the
PNG images to Dialogboxes and other controls.So please kindly any body help us in our project
#sanroop#
|
|
|
|
|
Did you see CImage class ?
|
|
|
|
|
Thanque for your reply can u please send me any example to add png image to dialobbox and other controls.
#sanroop#
|
|
|
|
|
See
#include AtlImage.h
CImage m_Image;
BOOL CAnswerDlg::OnInitDialog()
{
...
m_Image.Load(yourfile);
return TRUE;
}
void CAnswerDlg::OnPaint()
{
CPaintDC dc(this); // device context for painting
m_Image.BitBlt(dc.m_hDC,0,0,640,480,0,0);
}
|
|
|
|
|
related article - http://www.codeproject.com/wtl/wtldockingwindows.asp?df=100&forumid=3244&select=1705076&msg=1705076[^]
QUOTE -
Flying tabs are not restored properly And68rei 7:16 21 Oct '04
I played with MDIExSample.exe and discovered one troublesome bug.
1) take one of flying windows and move it outside of main window (e.g. <<1>>)
2) take another one (<<<2>>>) and attach it to first window (<<1>>), so they form tab control in separate window.
3) close the application
4) start it again. After restoring of windows' locations those 2 windows are lying one under another and don't form tab control anymore...
So, restoring works fine if tab control with some windows lies inside main window, and not if outside.
I have encountered the same problem in something that I am working on. I have looked at/compiled(in VS 2003.net) the source code in this article and can confirm that this docking bug occurs in this example. I'm not sure what zerozerofancy is talking about, as with my copy of stdafx.h there is no reference to sstate.h nor dwstate.h and the code in dbstate.h seems to already be "CDockWndMgrEx mgrDockWnds(m_hWnd)"
Anybody know what the cause is and how to fix it?
When I die I'd like to go peacefully in my sleep like my father, not screaming in terror like his passengers!!!
|
|
|
|
|
Why not ask it at the article discussion forum itself?
Nobody can give you wiser advice than yourself. - Cicero
|
|
|
|
|
I have but seeing as it's a 2 y/o article noone has replied. Or maybe it's because I smell too badly and they don't want to reply for fear of catching something?
When I die I'd like to go peacefully in my sleep like my father, not screaming in terror like his passengers!!!
|
|
|
|
|
Hi,
I am using WMI to get hardware details. WMI defines INT8. At the same time I am using one library that defines INT8, and because of this I am getting redefinition error for INT8. I can not change the code either in WMI or in other library. There could be one way by creating a Dll for all wmi code. But is there any other workaround for the same?
That would be great, if one can help me in getting following details without using WMI:
1. All drives (Fixed as well as removable) and their partitions with size, utilization and driver (description, date, version) details.
2. CPU details : No of CPUs and for each CPU ---> CPU type, CPU alias, Original clock, Real Clock, Effective clock, CPUID manufacturer, CPUID revision.
3. Motherboard details: Motherboard ID, Motherboard Name, BUS type, BUS Width, BIOS type, System BIOS Date, No of memory modules and RAM within them.
Regards!
Paddy
|
|
|
|
|
You dont need to repeate your question
|
|
|
|
|
Sorry for the same.
Regards!
Paddy
|
|
|
|
|
Padmanabh Sharma wrote: WMI defines INT8. At the same time I am using one library that defines INT8, and because of this I am getting redefinition error for INT8. I can not change the code either in WMI or in other library. But is there any other workaround for the same?
Hmmm.
You could write a (thin) wrapper-class for (parts of) WMI (or the other lib), hiding it from the outside.
In that class's .cpp, before including the WMI-stuff, you undef INT8 (it is not typedef 'd I hope) and let WMI define it.
"We trained hard, but it seemed that every time we were beginning to form up into teams we would be reorganised. I was to learn later in life that we tend to meet any new situation by reorganising: and a wonderful method it can be for creating the illusion of progress, while producing confusion, inefficiency and demoralisation."
-- Caius Petronius, Roman Consul, 66 A.D.
|
|
|
|
|
Hi,
I am using WMI to get hardware details. WMI defines INT8. At the same time I am using one library that defines INT8, and because of this I am getting redefinition error for INT8. I can not change the code either in WMI or in other library. There could be one way by creating a Dll for all wmi code. But is there any other workaround for the same?
That would be great, if one can help me in getting following details without using WMI:
1. All drives (Fixed as well as removable) and their partitions with size, utilization and driver (description, date, version) details.
2. CPU details : No of CPUs and for each CPU ---> CPU type, CPU alias, Original clock, Real Clock, Effective clock, CPUID manufacturer, CPUID revision.
3. Motherboard details: Motherboard ID, Motherboard Name, BUS type, BUS Width, BIOS type, System BIOS Date, No of memory modules and RAM within them.
Regards!
Paddy
Padmanabh Sharma
|
|
|
|
|
|
Hi,
Yes this gives me most of the details but even i m not able to get following details:
1. Motherboard ID.
2. Driver details for all partitions and removable drives.
3. Bus type and Bus width
4. CPU alias
5. Real and Effective clock
Regards!
Paddy
|
|
|
|
|
Hi,
I missed to add few of details in the list. The updated list is:
1. Motherboard ID.
2. Driver details for all partitions and removable drives.
3. Bus type and Bus width
4. CPU alias
5. Real and Effective clock
6. BIOS type and BIOS system date
7. Memory modules and RAM in each memory module.
Regards!
Paddy
|
|
|
|
|
Did your problem solve?
|
|
|
|
|
I think for these objects you need to WMI
|
|
|
|
|
Hai All,
I am doing a project in which , I have to catch HtmlForm events from an html document that I have displayed in my CHtmlView .
I am getting the htmlDocumet Like this
void CHtmlViewerView::OnDocumentComplete(LPCTSTR lpszURL)
{
IDispatch * pDocDisp = NULL;
pDocDisp = this->GetHtmlDocument();
IHTMLDocument2* pDoc;
pDocDisp->QueryInterface( IID_IHTMLDocument2, (void**)&pDoc );
IHTMLElementCollection* pElemColl = NULL;
HRESULT hr = pDoc->get_all( &pElemColl );
Dispatch* pElemDisp = NULL;
_variant_t varIdx( 0L, VT_I4 );
HRESULT hr = pElemColl->item( varIdx, varIdx, &pElemDisp );
IHTMLElement* pElem = NULL;
hr = pElemDisp->QueryInterface( IID_IHTMLElement, (void**)&pElem );
HRESULT hr;
IConnectionPointContainer* pCPC = NULL;
IConnectionPoint* pCP = NULL;
DWORD dwCookie;
hr = pElem->QueryInterface( IID_IConnectionPointContainer, (void**)&pCPC );
hr = pCPC->FindConnectionPoint( DIID_HTMLElementEvents, &pCP );
hr = pCP->Advise((IUnknown*)this, &dwCookie ); //This advise
//always fails
}
How can I rectify it.
I am refering the following ariticle
http://lists.w3.org/Archives/Public/w3c-wai-ua/2000JanMar/att-0287/htmlevent.htm
}
|
|
|
|
|
I would like to change code below in order to convert a double into a string containing thousand separator.
How to do it, in a simple way ?
<br />
CString str;<br />
double d;<br />
d = val * 2000.248;<br />
str.Format("%.3f", d);<br />
m_result = str;<br />
apffal
|
|
|
|
|
|
That works !
But how to do it with double or float ?
apffal
|
|
|
|
|
Hi All,
I was hoping someone could help me with this problem.
WaitForSingleObject(hFile, INFINITE);
How to signal the handle or end the wait?
Any info would help.
Thanks in Advance.
P1p3r
|
|
|
|
|
|
I'm Sorry,
That is a HANDLE,
which is a waitable object.
At anyrate, it's the handle returned by 'FindFirstChangeNotification'
P1p3r
|
|
|
|
|
You can poll...
bool fCancel = false;
while (!fCancel)
{
if (WAIT_TIMEOUT != WaitForSingleObject( hFile, 100 )
{
(event was signaled - do some stuff)
}
}
|
|
|
|