|
brahmma wrote: Fast! I was typing that and you posted it
I've bookmarked this FAQ link. Every forthnight, such question arise on forum.
brahmma wrote: PS: I know that Michael Dunn is a tech freak. That doesn't mean you need to wrap his name within the tags
I just wanted to highlight his name(one way is to show in different color), as link refered is not mine.
Prasad
MS MVP - VC++
|
|
|
|
|
|
Hi,
Is there any method in (API/MFC)to find public key token of signed assemblies.
Warm Regards,
Mushq
|
|
|
|
|
|
double atof(
const char *string
);
-- Converts a string to double.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Hi,
You can define a variable for an edit control of type double. There is a field in the Add Variable wizard that allows you to select the target type.
If you still remain with the CString variables, than;
double d1 = _tcstod(m_strMyEdit1, NULL);
double d2 = _tcstod(m_strMyEdit2, NULL);
double res = d1 + d2;
// Now to fill the resulting edit control
CString sRes;
sRes.Format(TEXT("%f"), res);
// Either this ..
m_strResultEdit = sRes;
UpdateData(FALSE);
// .. Or this ..
GetDlgItem(IDC_MYRESULTEDIT)->SetWindowText(sRes);
--
=====
Arman
|
|
|
|
|
See the atof function documentation [^].
Note that, Thanks to the provided CString::operator LPCTSTR , you can directly apply atof to a CString variable, for instance:
CString sMyData;
float fMyData;
sMyData = "5.375";
fMyData = atof(sMyData);
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
What IDE are you using? MSVC6? In MSVC6 ClassWizard is used to hook up a control to a member variable and it allows you to choose the type. Later MSVC's have similar features.
Steve
|
|
|
|
|
I have a project developed in MFC. In this project I have a Tree View. In this tree, some nodes has clones(copy of the parent nodes). If I change the visiblity of a node, when I save and reopen the file the changes get reflected except for the nodes that has clones. (i.e) If turn off the visiblity of a node that has clones, when I save and reopen the file, the visiblity of the node didn't turned off. What should I do to get the visiblity of the nodes that has clones also turned off when I save reopen the
file?
The code is:
for (i=0; i<howmanychildren(); i++)
="" {
=""
="" (getchild(i))-="">SetVisible(visible);
}
return TRUE;
}
HowManyChildren() is a method that returns number of children of a particular node. GetChild(i) is a method that returns the Child at i.
I have to check the node at i is a clone, and to get it's visiblity.
|
|
|
|
|
I would like to know all the versions of SDK and DDK of Microsoft release its windows 98, where could i get it? For example,DDKs what i know it is 98DDK, 2kDDK, XPddk, IFSDDK2000, windowsever2003DDK(what's their number rules?like 2600, 3970, 3970.1860, 3970.2075 and so on.) SDKs is 2003 Feb version and the Newest Platform SDK which release at 2006 Mar. and recently MS release its Vista SDK. How about its history? and others like WMP SDK, DXSDK and for embeded Windows Mobile 5.0 Smartphone/PPC SDK, it is too much.
One day a pretty girl asked me:"Do u think you are handsome?" "I don't think so!".She gave a slap in my face:"Why lying?"...
|
|
|
|
|
Here[^].
Regards,
Paresh.
|
|
|
|
|
Oh my god, all earth men know that is official website of MS. Do you play a joke on me, Paresh?
One day a pretty girl asked me:"Do u think you are handsome?" "I don't think so!".She gave a slap in my face:"Why lying?"...
|
|
|
|
|
I want to do a periodic checking of data inside a thread. Can i start Timer in a UI thread derived from CWinThread?
-- modified at 1:50 Friday 27th April, 2007
|
|
|
|
|
"Timer" - what exactly you mean? If you mean CWnd::SetTimer/KillTimer pair, than you can do it only if there is a window in your UI thread and meantime it is logical to assign the timer to it.
Do you have windows? Or only is message pump there?
--
=====
Arman
|
|
|
|
|
The short answer is "yes, you can".
From Arman's reply I guess you didn't think about a UI-thread and a CWinThread derived object from the start and you don't really need a UI-thread.
I suggest you create an ordinary worker thread, see here[^] how to do it and avoid common pitfalls.
Create a waitable timer with ::CreateWaitableTimer( NULL, FALSE, NULL )[^] inside your worker thread and wait on the timer handle with e.g. ::WaitForMultipleObjects(...) .
Start the timer with ::SetWaitableTimer(...)[^] and make it periodic.
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
hello sir..,
how can i load the html page into CMyListView ... this class derived from CListView Class ... but i want to display the html page into My view...
please tell me any suggestion
Regards,
Srinivas
|
|
|
|
|
You can try using Web Browser control.
Please refer this[^]
Regards,
Paresh.
|
|
|
|
|
I guess "load html" means to show the html file as it is done by browsers. So the answer is "no way" unless you have a browser control inside your view.
--
=====
Arman
|
|
|
|
|
For show html files you can use of CDHtmlDialog it create a dialogbox that use of html,
Also you can use of CHtmlView class that it has an example on the MSDN "MFCIE".
|
|
|
|
|
Hi all.
I am converting my old project developed in VC 6.0 to VS 2005. But the new project is failed to create the .lib file in VS2005 which causing error while using that project in others. Please help me if any one knows the solution.
Kishore.
|
|
|
|
|
|
Not showing any error. I want to create a .dll file; and .lib file is also needed. whereas it is able to create the .lib file only when the configuration type is set to .lib file where as i need both .dll and .lib files.
But the same is working fine in another project for which the configuration type is to create .dll; it is making both dll and lib files.
I have tallied all the settings of both projects but it is successful for only that project. All others are not able to create .lib and .dll at a time.
I dont know how only one project is creating both successfully and all others are not able to do that.
Kishore.
|
|
|
|
|
Hi,
I have some PNG files, which are not displaying properly in my application control, while they are opening perfectly fine in the browser.
some of the files , which is creating problem have the foll. info..
Bit depth - 24
Width - 96 pixels
Height - 96 pixels
Horizontal Resolution - 96 dpi
Vertical Resolution - 96 dpi
some files, which are opening properly have the foll. info..
Bit depth - 24
Width - 48 pixels
Height - 48 pixels
Horizontal Resolution - 96 dpi
Vertical Resolution - 96 dpi
i tried to use the libpng, to convert the files, in to the dimension , which is converting properly..but could not found the solution.
Can u pl. suggest something.. how to display them properly or what API should I use for the conversion.
Thanks.
Vineet Kumar Singhal
Sr.Software Engineer
Mumbai
Tough Time Never last, but Tough People do.
|
|
|
|
|
Could you please tell, what do you mean by "Not Diplaying properly",
are they distort, not seen, or partially seen ?
Regards,
Paresh.
|
|
|
|
|
here I mean that the images are distorted.if i open it with "Windows Picture and Fax Viewer" it shows distorted.
if I open it on a web control /ACDsee, it opens perfectly fine.
I am displaying at 2 locations.. at the lacation where web control is opening it, it works fine.., while for the second control, which is a static image control,is displaying it distorted.
Regs
Vineet Kumar Singhal
Sr.Software Engineer
Mumbai
Tough Time Never last, but Tough People do.
|
|
|
|