|
Hy everybody!
a little question...
I'm creating a invisible window (with create function), but when I do it my current app window loses his focus...
How can I create the window in the way that my current window don't loses his focus?
thanks all!
Cheers!
Ricky
|
|
|
|
|
One solution is to simply focus the parent window right after calling creating the child window.
kuphryn
|
|
|
|
|
For example I have a dialog based project with tab control.
And there is some amount of dialog resources.
When I change tabs I need to include (embed) and switch those dialogs inside the main dialog.
I dig into ICQ dlls and found that they are using the same trick in dialog with tabs.
|
|
|
|
|
If it is possible use the property sheet, it's easier to maintain and to work with...
|
|
|
|
|
|
Hey all,
I'm working on a project and need to better understand and restrictions Microsoft has on the redistribution of these DLLs. As I understand it, they ship as part of W2K, but work on 98/ME as well. There are a few technical articles that outline how to use them for enumerating network adaptors and completing other SNMP tasks, but I can't find anything about restrictions on their use.
Anyone have any experience with them?
WSNMP32.DLL
MGMTAPI.DLL
MIB.BIN
David
|
|
|
|
|
The windows 98 resource kit has an install for the MS SNMP Agent buried in here[^]
There is an snmpzp.exe file available here[^] for win95.
Also check KB139462.
|
|
|
|
|
Does anyone know anything about the UNZDLL.DLL? I am trying to find a way to extract archived .zip, .tgz, .tar files from within my application. There are dozens of commercial tools for this, all at a reasonable price (I guess). I just want to make sure that I'm not missing something obvious / easy before I go buying something.
I also found some MFC source that wraps the UNZDLL.DLL exported functions.
Thanks,
Dave
|
|
|
|
|
|
Help!
I create a propertysheet on a view. when the program runs the sheet show at once. I want to change the size of the propertysheet.
But I fail. Please help!
Your help are greatly appreciated.
davidwu
|
|
|
|
|
you have to handle the WM_SIZE message of the property sheet parent.
There you have to do:
<br />
void CDialogThatresizesThePS::OnSize(UINT nType, int cx, int cy) <br />
{<br />
CDialog::OnSize(nType, cx, cy);<br />
<br />
ResizePS(this->m_rectPS);<br />
ResizeTabCtrl(this->m_rectPS);<br />
ResizeActivePage();<br />
}<br />
<br />
void CDialogThatresizesThePS::ResizePS(CRect rectPS)<br />
{<br />
this->m_PS->SetWindowPos(NULL, rectPS.left, rectPS.top, rectPS.Width(), rectPS.Height(), SWP_NOZORDER | SWP_NOACTIVATE);<br />
}<br />
<br />
void CDialogThatresizesThePS::ResizeTabCtrl(CRect rectTabCtrl)<br />
{<br />
CTabCtrl *pTabCtrl = this->m_PS->GetTabControl();<br />
<br />
if (pTabCtrl != NULL)<br />
{<br />
pTabCtrl->ModifyStyle(0, TCS_MULTILINE);<br />
<br />
pTabCtrl->SetWindowPos(NULL, 0, 0, rectTabCtrl.Width() - 6, rectTabCtrl.Height() - 10, SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE);<br />
}<br />
}<br />
<br />
void CDialogThatresizesThePS::ResizeActivePage()<br />
{<br />
CRect rectTabCtrl;<br />
<br />
CPropertyPage *pPage = this->m_PS->GetActivePage();<br />
<br />
CTabCtrl *pTabCtrl = this->m_PS->GetTabControl();<br />
<br />
if (pTabCtrl != NULL)<br />
{<br />
pTabCtrl->GetClientRect(&rectTabCtrl);<br />
<br />
rectTabCtrl.right -= 6;<br />
rectTabCtrl.bottom -= 22;<br />
<br />
if (pPage != NULL)<br />
{<br />
pPage->SetWindowPos(NULL, 0, 0, rectTabCtrl.Width() - 2, rectTabCtrl.Height() - 4, SWP_NOMOVE | SWP_NOZORDER);<br />
}<br />
}<br />
}<br />
I've derived a PS and I've placed that code there, in this way is easy to resize it...
but I hope that using this piece of code you'll be able to resize the property sheet and that after having resized it you will arrange it in order to make it more useful to you.
Hope this helps.
|
|
|
|
|
Hello,
My Win32 app is calling a procedure stored inside a Dll, using LoadLibrary and GetProcAddress. Most of the time everything works okay.
The dll is written in Fortran. The method being called opens a file, reads in data, performs calculations and outputs results in another file.
Occasionally the calculations cause a Floating-Point Exception to occur. I don't have access to the Fortran src so I've being trying to catch the exception in the C++ calling code, using C++ exception handling but it doesn't catch.
My questions are:
1) is this possible? (can an exception being thrown by a dll linked dynamically at run time be caught? - I could try creating an import library if that's possible.)
2) can anybody give me any clues?
Thanks,
John
|
|
|
|
|
I think you need to look at the Win32 Structured Exemption Handling (SEH). I'm sure you'll find articles here on SEH and of course on MSDN.
Neville Franks, Author of ED for Windows. www.getsoft.com
Make money with our new Affilate program
|
|
|
|
|
Thanks,
Got the answer in Handling Exceptions, Part 17 in MSDN by using a 'Translator Function' to bind SEH to the more friendly C++ Exception handling mechanism.
Work's perfectly!
John
|
|
|
|
|
I'm using CADORecordset class by Carlos Antollini.
I'm not able to delete a record in the recordset
or to change its content.
When I try these operations it generates an
exception and says "Query is too complex".
Can someone help me ???
Thanks a lot
|
|
|
|
|
I think the MFC idea od passinf just the CPritInfo* for OnPreparePrinting is bad because we cannot print anything any where,especially like in my case where I need to measure the diagram and span it across the pages and inform the user the equired number of pages.I just cannot do it.Attaching/Fromhandle ing of the dc from pOnfo->m_Pd->m_pd.hDC asserts false. I have to use the inelegant m_bContinuePrinting to check the pages during print.
Any help.
-Goran
|
|
|
|
|
If you need a DC in OnPreparePrinting(), you can get one for the default printer for your application by doing:
AfxGetApp()->GetPrinterDC();
I cover the topic in my article Printing Tricks And Tips[^]
It should be of help.
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
|
|
|
|
|
how to get just the folders path like the app wizard does
-julian
|
|
|
|
|
What do you mean by the folders path?
|
|
|
|
|
Hi
i have the following bit of code which i use to pull
the 'date_in' field from my database, using ado
variant v_Time_Issued
vTime_Issued = cpSet->GetCollect(L"date_in");
date_in has the value 2003-04-22 10:19:18.000
i need to be able to format the vTime_Issued so that im just left with the
time
so all i want from date_in is 10:19
any ideas ?????
Si
|
|
|
|
|
You can create a COleDateTime with the vTime_Issued and then you can use the member function GetDay() and GetHour() to extract the required info.
Bye
|
|
|
|
|
You can create a COleDateTime with the vTime_Issued and then you can use the member function GetMinute() and GetHour() to extract the required info.
Bye
|
|
|
|
|
Use COleDateTime in your app or modify the SQL getting the date_in from the database to only show the time.
Jason Henderson My articles
"The best argument against democracy is a five-minute conversation with the average voter." - Winston Churchill
|
|
|
|
|
If you are using MFC, read on.
COleDateTime datetime;<br />
datetime.ParseDateTime("2003-04-22 10:19:18.000");<br />
TRACE("%s\n", datetime.Format("%H:%M"));
|
|
|
|
|
I’ll like to do, in Microsoft Visual C++, a user interface for W2000 OS with meters, button, indicators etc. self-made, same LabView interface.
Where I can find free tutorials, sample or book on this argument?
Thank you, Andrea.
acaselli@rolandeur.com
|
|
|
|