|
Of course, of course, of course!!! Thank you, thank you, thank you! (Lesson learned: don't try to code when you're sick!)
/ravi
Let's put "civil" back in "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
You're welcome. I've just added a sample code, but I guess you've already fixed it. OK then - yet another reason to feel more healthy )
Regards,
BB
|
|
|
|
|
I need a sample from the Aug 2001 Platform SDK CD. I don't have the CD available to me, but need it fairly urgently. It's the customdial sample, and should be located in the
\Samples\NetDs\RAS\CustomDial sample
directory on the CD. I'd appreciate it if somebody could email this to me.
________________________
http://www.webreaper.net
|
|
|
|
|
Mark, I've made it available here[^]. (You didn't post your email address ).
/ravi
Let's put "civil" back in "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Thanks very much.
________________________
http://www.webreaper.net
|
|
|
|
|
Glad you got it- I was about to email it to you myself.
"Do unto others as you would have them do unto you." - Jesus
"An eye for an eye only makes the whole world blind." - Mahatma Gandhi
|
|
|
|
|
How can I search for a string by columns in the listview using FindItem.
Thanks
|
|
|
|
|
Hmm, I think you might have to use GetItemText() instead.
/ravi
Let's put "civil" back in "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
I wrote the following program to test what I think is a bug in the implementation of VC++ 6 templates. For some reason the first call's parameters are ignored and the second call is repeated twice.
<br />
#include "stdafx.h"<br />
#include <stdio.h><br />
<br />
template<class DATAType,DATAType data>Test()<br />
{<br />
printf("Sizeof DATAType %d\n",sizeof(data));<br />
printf("Data = %d\n",data);<br />
}<br />
<br />
int main(int argc, char* argv[])<br />
{<br />
Test<char,0>();<br />
Test<int,1>();<br />
return 0;<br />
}<br />
The output is:
Sizeof DATAType 4
Data = 1
Sizeof DATAType 4
Data = 1
I had a friend compile this on g++ and it worked as expected.
Sizeof DATAType 1
Data = 0
Sizeof DATAType 4
Data = 1
|
|
|
|
|
and if you reverse the order of the calls, it uses the char version of the function twice.
cool.
definitely looks like a bug, to me.
-c
Image tools: ThumbNailer, Bobber, TIFFAssembler
|
|
|
|
|
A quick fix on this is to pass data as a parameter to the function instead of a template parameter.
John
|
|
|
|
|
This is a well-known VC++ bug. The compiler is unable to deduce the template parameters unless they're present in some form in the arguments for the function. Try the following workaround (I don't have my VS handy, but I'm reasonably sure it works):
#include "stdafx.h"
#include <stdio.h>
template<class DATAType,DATAType data>Test(DATAType* dummy=0)
{
printf("Sizeof DATAType %d\n",sizeof(data));
printf("Data = %d\n",data);
}
int main(int argc, char* argv[])
{
Test<char,0>();
Test<int,1>();
return 0;
}
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
How can i display an image stored in the resources in the application in an HTML File which is displayed in a CDHtmldialog ???
I would like also not to have to specify the name of the application, if this is possible.
Thanks.
|
|
|
|
|
In your res file you need a folder resource named "GIFS".
Then add your image to the project in that folder and name it with quotes:
"MyImage.gif"
Then in the html page refer to it like you normally would in any html file:
background="GIFS/MyImage.gif" (as an example for using it as a background)
Art
|
|
|
|
|
Hi,
I get the following runtime error:An attempt was made to access an unnamed file past its end.
With this code where i try to open a textfile and put them in a stringarray.
<br />
CFile cfFile;<br />
<br />
cfFile.Open(dlg.GetPathName(), CFile::modeRead);<br />
<br />
CArchive ar (&cfFile, CArchive::load);
<br />
CStringArray test;<br />
test.Serialize(ar);
Thanks for helping!
Willem
|
|
|
|
|
You may want to first serialize the size of the CStringArray , followed by each CString element. See "Serializing a homogenous collection class" in this[^] article
/ravi
Let's put "civil" back in "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
hi guys ,
i build a DLL file using .DEF function specifier ,now when i want to use the DLL in other application compiler throw me LNK2019 like errors .
does anybody give me a pattern in using DLL within win32 application .
thank u in advance.
|
|
|
|
|
hello,
i have another problem with child window, when i want to allow resizing i display border and when i want to prevent resizing i hide border.
now i do this to show Sizable Border:
pChild->ModifyStyle(0 ,WS_SIZEBOX ,SWP_NOSIZE | SWP_NOMOVE |SWP_SHOWWINDOW );
pChild->SetWindowPos(NULL, 0, 0, 0,0,
SWP_FRAMECHANGED |
SWP_NOMOVE | SWP_NOSIZE |
SWP_NOZORDER);
before do this i have scrolled my view with :
ScrollWindow(-posHorz,-PosVer);
my problem is when i want to show the border the view do a "ScrollTo (0,0)" ! i put "SWP_NOMOVE " in the SetWindowPos my child window don't move and why my view repositioned to (0,0) ??
i have try to remove SWP_FRAMECHANGED in the SetWindowPos and my view don't move but sizable borders aren't show!
If you know how to add sizable border and remove them easily ...
Excuse me for very bad english
|
|
|
|
|
Hail everyone,
I wonder, what gonna happen with STL container, let's say vector, if there is no memory for add new element? Method push_back returns nothing. In source code of vector I was able to find only 2 exceptions, _Xlen (length_error) and _Xran (out_of_range), but nothing else.
I'm not very familiar with STL, so any help is appreciated.
Thanks in advance.
|
|
|
|
|
Here are two excellent STL references.
http://www.sgi.com/tech/stl/
http://www.josuttis.com/libbook/idx.html
try()
catch(...) // Catch any exceptions.
Kuphryn
|
|
|
|
|
in: BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
Is there a limitation to size the MainFrame?
The following code-snippet works up to: int sz=7, but not with sz=8. Why?
int ySize=::GetSystemMetrics(SM_CYFULLSCREEN);
int xSize=::GetSystemMetrics(SM_CXFULLSCREEN);
cs.cy = ySize*sz/10;
cs.cx = xSize*sz/10;
cs.x=(xSize-cs.cx)/2;
cs.y=(ySize-cs.cy)/2;
return CFrameWnd::PreCreateWindow(cs);
Gabor Kalman
|
|
|
|
|
I've just tested it and it works with sz == 10 as well.
You may send me a sample project if you wish (mail@BartoszBien.com).
Regards,
BB
|
|
|
|
|
If it is a problem related to CFormView (which is inherited from CScrollView ), check if CScrollView::ResizeParentToFit is not called where it should not be. Hasn't tested it, but this may be the case.
Regards,
BB
|
|
|
|
|
Hello,
I have some queries
1. Is it possible to directly access Video RAM from User Application?
2. If not, How to read/write data directly to Video RAM ?
When searched, I found that certain IOCTLs ( like IOCTL_VIDEO_MAP_VIDEO_MEMORY ) available for Video RAM access. But It seems that these IOCTL are being used by the video driver. Can we have access to these IOCTLs and How?
Can you provide some clue as to how we can go ahead.
Regards
Sandeep
|
|
|
|
|
You can use DirectDraw to get access to the video memory! Just create a primary DirectDraw surface !
Daniel
---------------------------
Never change a running system!
|
|
|
|