|
How can I know the version ?
I only know that this is
Windows xp professional.
thanks
|
|
|
|
|
OK, according to MSDN, the minimum Windows version for this function is Vista. That means anything before Vista (like XP) won't have this function.
|
|
|
|
|
Thanks
now its obvious why it didnt work.
|
|
|
|
|
Hi all,
i m Using CFileDialog with filter or text file to browse only *.txt files.
but shortcut files are also visible in open file dialog .
please tell me how can i resolve this.
thanks in advance.
|
|
|
|
|
Can you post the code you're using?
|
|
|
|
|
CString filter=_T("Text Files(*.txt)|*.txt||");
CFileDialog fileDlg(TRUE, NULL, NULL, OFN_PATHMUSTEXIST|OFN_FILEMUSTEXIST,filter);
if (fileDlg.DoModal () == IDCANCEL)
{
return;
}
CString file_Path = fileDlg.GetPathName ();
AfxMessageBox(file_Path);
|
|
|
|
|
I just tried this code on a folder that has shortcuts, and the shortcuts were not displayed. Did you mean shortcuts, or folders?
|
|
|
|
|
i mean to shortcuts,
i locate a folder by CFileDialog here text files are present and some shortcut of .docx and .xlsx are also presents to these are displayed.
|
|
|
|
|
That's not what I see when I run your code.
|
|
|
|
|
i don't know why its not display on your pc, but if it display than what do yo do for this?
|
|
|
|
|
Recompile your app. Go to the folder where the exe is. Look at the timestamp. If the timestamp is the current time (minus a few seconds), then run your app (double-click) and see what it does.
|
|
|
|
|
how to play file in file frame rate using directshow
|
|
|
|
|
Hi all,
i m using a multiline editbox,and set the limite of text in this text box is 500 char using the function SetLimitText,
its working fine when i m typing over this so its not type more than 500 cahr even its not paste more than 500 char.
but when i m using SetWindowText it enter more than 500 char in this edit box please tell me how can i validate this.
thanks in advance.
|
|
|
|
|
From MSDN: "Changing the text limit via SetLimitText restricts only the text the user can enter. It has no effect on any text already in the edit control, nor does it affect the length of the text copied to the edit control by the SetWindowText member function in CWnd."
|
|
|
|
|
so please tell me there is any other option to restrict to enter more more than 500 char from any option.
|
|
|
|
|
The only other option is to write a custom edit control and intercept the WM_SETWINDOWTEXT message. This is actually not that hard; you can find articles here on CodeProject.
|
|
|
|
|
Hello Friends
I am using drawImage method of Graphics to draw on Another image(which is 8bit color depth)but it is not drawing. But If i draw On Image whose color depth is 24bit then Its Drawing.
Is there any way to draw on Image whose color depth is 8bit?(using GDI or some other way)
Thanks & Regards
Yogesh
|
|
|
|
|
I guess you first created a graphics object from an 8bpp indexed image. If so the Graphics constructor may have failed as described in msdn.
Instead of thinking to draw on 8 bit color depth bitmap, can't you draw it on an image supported by Graphics class, and finally make a 8bbpp image from it?
|
|
|
|
|
Thanks For your reply.
Yeah,i can draw first on Image supported by graphics then After that how can I convert that into 8bpp Format image?
Regards
Yogesh
|
|
|
|
|
Strictly saying it needs effort. To represent the image with only 256 distinct colours, you have to set up color palatte and to suitably map each color against this palatte. Refer Step 2 this CP article, though it is in managed code, its enough to understand the Gdi+ calls.
|
|
|
|
|
I read this second step but i want to make sure about writeBitmapData() function in which they are using IntPtr and System.convert.ToInt32.How can i use tht in c++?
Thanks & Regards
Yogesh
|
|
|
|
|
It is getting the pointer to the correct pixel in given BitmapData and copying the given index as data to that location. IntPtr is the managed code wrapper to represent a pointer. Simply replace it with native code using pointers.
yogeshs wrote: How can i use tht in c++?
Try this hand written translation
int entry = pixelSize/8;
byte* realByteAddr = ((byte*)data.Scan0) + (j*data.Stride) + i*entry;
byte dataToCopy = index;
*realByteAddr = dataToCopy;
where byte is typedefed unsigned char.
|
|
|
|
|
Hello Cool_dev,i tried this way too but no Luck.
Now , m tryingother way in which m finding the handle and trying to find the specific dc.
Thanks For Valuable time .
Regards
Yogesh
|
|
|
|
|
I was able to do this (in Win32) with:
HBITMAP varLayer;
...
HDC memDc = CreateCompatibleDC (NULL);
HGDIOBJ Obmp = SelectObject(memDc, varLayer);
varLayer is an 8bpp bitmap. Just draw using the device-context handle, memDc.
|
|
|
|
|
Good.
Possible to create a Graphics object with this memDC, like Graphics g(memDc)? Then things are much easy.
|
|
|
|