|
kiranin wrote: I am asking first how can i add files and folders?
Does DlgDirList help?
TCHAR szPath[ MAX_PATH ] = { _T( "C:\\" ) };
DlgDirList( szPath, IDC_LIST_ID, 0, 0 ); This code fills out a list (IDC_LIST_ID ) with all files from C:\\ directory.
Take a look at DlgDirListComboBox too.
|
|
|
|
|
See
<br />
WIN32_FIND_DATA find;<br />
HANDLE handle=FindFirstFile("*.bmp",&find);<br />
while(FindNextFile(handle,&find)!=0)<br />
m_List2.AddString(find.cFileName);
FindClose(handle);<br />
and see CreateDirectory(...) for create a new directory
|
|
|
|
|
It is adding files only, how can i add whole attributes in a list control as report and also images,
and if i right click on it slecting the wholoe files in the list control y?
|
|
|
|
|
You said only insert files&folders for attribute did you see members of WIN32_FIND_DATA dwFileAttributes/ftCreationTime and... for inser image to your ListCtrl you can use CImageList
and 3th section i dont understand what do you need?
|
|
|
|
|
how can i open that files by double clicking on it?
If it is *.txt files it will be open with note pad ,if it is folder it will open windows explorer .
How can i do it?
|
|
|
|
|
I saw a question on codeproject about how to open files with my app but i dont know it was your question or no anyway when you double click you can use from ShellExecute but before use from this function check your string with SetCurrentDirectory and see return value if its 1 your string is directory if 0 your string is a txt file Is this your question?
|
|
|
|
|
Hi Everybody, i am struggling from last week to get some positive feedback from expert exchange. .. pls help me out here.
WE are using AT commands to get the signal strength. While testing in Terminal service in two Scenarios:
1. We can't create a AT command session once Modem is connected.
2. We can't connect the Modem to internet if AT command session is open
The problem is we can't use the same port to open two session. Is there a way to create AT command session with device directly instead of going through Port? Or Can we open a port in share mode?
I have also check it in VB6 and .net 2005 through code, the behavior is same i am getting "Can't open port" error.
Any assistance would be great help.
|
|
|
|
|
we use the function ShowWindow(SW_HIDE) to my project window
but I don't know how to communicate with the the window that be hide.
Anybody know what the function use for this issue.
|
|
|
|
|
Get your Window's Handle by ::FindWindow(...) then communicate with it vi it's handle .
|
|
|
|
|
You can use FindWindow.
Alternatively when you are hiding the window you should be having a pointer to the window or some handle to it. Using that window handle/pointer you can send message to your hidden window....
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
if you have a handle to your window you can use from it.
|
|
|
|
|
Hello
In PPC, I want to overlap two pictures and then save the overlapped
picture in the specified folder.But I use the CImage, I find that many
functions are unuseful in PPC ,and GDI functions also don't support
that.
Are there functions in PPC support to overlap pictures??
Any suggestion is useful!! Thanks!!
|
|
|
|
|
|
PPC=> Pocket PC based on WinCE
Any suggestion is useful!! Thanks!!
|
|
|
|
|
Hi, I'm tryning to get an image of a webcam and apply it into an openGL texture.
I'm initializing the window with capCreateCaptureWindow
connect to the webcam with capDriverConnect
Then I use the following code to get an HBITMAP.
capGrabFrame
capEditCopy(hWndCam)
OpenClipboard(hWndCam)
hbitmap = (HBITMAP)GetClipboardData(CF_BITMAP)
How do I get a pointer to the data to be able to feed my glTexImage2D
|
|
|
|
|
I think ::GetBitmapBits can solve your problem .
|
|
|
|
|
thanks, I forgot to tell, I'm using it with Qt and I can't mix it with MFC. Is there any gdi solution?
|
|
|
|
|
GetBitmapBits is API that used in gdi .
It's declaration is :
WINGDIAPI LONG WINAPI GetBitmapBits( IN HBITMAP, IN LONG, OUT LPVOID);
|
|
|
|
|
thanks A_Fa. I tried and my buffer is always empty. The microsoft documentation recommends using GetDIBits, but I get the same result. Do I have to set some HDC or something?
|
|
|
|
|
the MSDN description:
hIconSm: Handle to a small icon that is associated with the window class
hIcon: Handle to the class icon.
But I still confused!
when I creat a window "WNDCLASSEX wc", I could always only see the icon load by the wc.hIconSm when excuting, where to find the big icon load by wc.hIcon?
|
|
|
|
|
hIcon is the large icon (32 x 32) that you can see when hitting Alt+Tab for instance. hIconSm (16 x 16) is shown in the taskbar/tray and in the titlebar of the window.
|
|
|
|
|
|
And see here[^] maybe it is some helpful to you
|
|
|
|
|
Hi guys!
I'm using CStdioFile to read a text file that also may contain some binary data. Problem is, sometimes I hit EOF even though its not the case (e.g. CStdioFile::ReadString returns FALSE but there's still data to be read), possibly because of the binary data in the text file that may contain a EOF char.
Any idea how to solve this? Or do I have to resort to using CFile in binary mode and interpret the text myself?
Thanks
|
|
|
|
|
Tanzim Husain wrote: Or do I have to resort to using CFile in binary mode and interpret the text myself?
umm yeah... since there is binary data in the file it is "by definition" NOT a Text File.
|
|
|
|