|
Take a look at this article here; scroll down and look at the "Binary files" section
Hope this helps!
--PerspX
"Nowadays, security guys break the Mac every single day. Every single day, they come out with a total exploit, your machine can be taken over totally. I dare anybody to do that once a month on the Windows machine." - Bill Gates
|
|
|
|
|
Thanks for the response, I've tried it, but with this result:
memblock="y;["
Isn't a udl file in unicode ??
If so how would one do it ?
Thanks again ...
Regards,
The only programmers that are better that C programmers are those who code in 1's and 0's
Programm3r
My Blog: ^_^
|
|
|
|
|
I could not find the specifications for ‘.udl’, but I saw no indication that it has to be Unicode (just statements like plain text). I would open it as plain text, Unicode, and binary with a hex editor and look at it closely. After that a little research should provide the answer.
INTP
"Program testing can be used to show the presence of bugs, but never to show their absence."Edsger Dijkstra
|
|
|
|
|
Assuming this file is in UTF-16 encoded UNICODE, ie every character is a 16 bit word, Notepad may have put a header on the file to indicate this (despite it supposedly being plain text ). I would try opening it in notepad and then saving in a separate file with UTF-8 encoding. Ordinary text processing code should then be able to read it. If not you've got a binary file.
If you have to read the unmodified UDL file then you'll need to find the size of that header ( I think it's four bytes but I'm not sure ), skip over it and then read wide characters a wchar_t or WORD or short at a time from the file.
Nothing is exactly what it seems but everything with seems can be unpicked.
|
|
|
|
|
|
Hi,
I am using VC++ 6.0 for my project,in which I am using DialogBox and in
dialogBox I am using picture control.So i want to change picture at run time
so how can I do this.
Thanks and Regards
Atul Mahajan
|
|
|
|
|
Use the STM_SETIMAGE message. See the MSDN documentation for more information.
Hope this helps!
--PerspX
"Nowadays, security guys break the Mac every single day. Every single day, they come out with a total exploit, your machine can be taken over totally. I dare anybody to do that once a month on the Windows machine." - Bill Gates
|
|
|
|
|
Hi PerspX!
im using VC6.0, in my dialog based application if i try to load the bitmap with the following code in OnPaint() Function, its taking more memory and its not clearing,
CPaintDC dc(this); // device context for painting
HBITMAP m_Bmap;
CRect rect;
HDC memdc;
CString path,m_ifilename1,m_ifilename2;
path=AfxGetApp()->m_pszHelpFilePath;
for(int i=1;i<=path.GetLength();i++)
{
if(path.Mid(i,18)=="VTS_VC_0003_070605")
{
path = path.Mid(0,i+18);
break;
}
}
m_ifilename1 = path + "\\"+"3.bmp";
GetClientRect(&rect);
m_Bmap=(HBITMAP)::LoadImage(NULL,m_ifilename1,IMAGE_BITMAP,0,0,LR_LOADFROMFILE);
memdc=::CreateCompatibleDC(dc.m_hDC);
::SelectObject(memdc,m_Bmap);
BitBlt(dc.m_hDC,0,0,rect.right,rect.bottom,memdc,0,0,SRCCOPY);
i need to know whether its possibble to load jpeg image in dialog background (to reduce the memory) ?
pls help me
thanks in advance
Abdul Khathir A.
|
|
|
|
|
What's the source of the bitmap? A resource? A File? What type of bitmap?
Mark
Mark Salsbery
Microsoft MVP - Visual C++
"Thanks,I overlooked the docs."
|
|
|
|
|
You can use of SetBitmap with a new handle to bitmap.
|
|
|
|
|
Hi,
I have added functionality to add history in my list control by using the following function.
BOOL GetHistory(CStringList & list)
{
STATURL url;
CString strUrl;
ULONG uFetched;
IUrlHistoryStg2Ptr history;
IEnumSTATURLPtr enumPtr;
if(FAILED(CoCreateInstance(CLSID_CUrlHistory,
NULL,
CLSCTX_INPROC_SERVER,
IID_IUrlHistoryStg2,
( void**)&history)))
{
return false ;
}
if(FAILED(history->EnumUrls(&enumPtr)))
return false;
while(SUCCEEDED(enumPtr->Next(1,&url,&uFetched)))
{
if(uFetched==0)
break;
strUrl = url.pwcsUrl;
list.AddTail(strUrl);
}
return true;
}
Only IE history is added to my list control.How can i add history of other browsers also.
|
|
|
|
|
revanth1985 wrote: How can i add history of other browsers also.
Do they store history data in the C:\Documents and Settings\<user>\Local Settings\History folder?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
ya.only IE histroy is located in the above location.But if i browse using other browsers such as mozilla,opera etc,i am not getting the history.I want to load history of all the browsers in a list control.How can i go further?
|
|
|
|
|
revanth1985 wrote: But if i browse using other browsers such as mozilla,opera etc,i am not getting the history.
So where do they store their history information?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Actually i am not able to trace the path in which thay store their history information.
|
|
|
|
|
Why? Just visit some benign site that IE has not been used for, and then search for filenames, file contents, and registry entries for part of the URL.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hi,
I created a Dialog based application "Sample" using VC 6.0 using the Wizard.
When I opened the resource file namely Sample.rc using a text editor,
I found
IDD_ABOUTBOX DIALOG DISCARDABLE 0, 0, 235, 55
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU.
What is the significance of the word DISCARDABLE above.
I removed the word and on compiling and running the application, could not
find any noticable change in any style.
MSDN was of no much help either.
|
|
|
|
|
Marimuthu.pesit wrote: MSDN was of no much help either
You simply have to refine your search...
http://msdn2.microsoft.com/en-us/library/Aa380908.aspx[^]
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.
|
|
|
|
|
Man, I miss 16-bit Windows
Mark Salsbery
Microsoft MVP - Visual C++
"Thanks,I overlooked the docs."
|
|
|
|
|
Marimuthu.pesit wrote: What is the significance of the word DISCARDABLE above.
It tells Windows that IDD_ABOUTBOX can be discarded (i.e., swapped to disk) if it needs room for something else.
Marimuthu.pesit wrote: I removed the word and on compiling and running the application, could not
find any noticable change in any style.
It's not something that you'd notice.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Where can i find ttool.exe for Visual Studio 2005
S.Yamini
|
|
|
|
|
I am creating a login dialog of a system.I create a picture for the background.My requirement is to add controls top on that image.So how can i do if.If you can pls give me related links.
bhw
|
|
|
|
|
I use a bitmap for a background on my login dialogs.
I just draw it on the dialog window in response to WM_ERASEBKGND.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
"Thanks,I overlooked the docs."
|
|
|
|
|
Did you use of WM_ERASEBKGND for show images and also if you search on the codeproject you can find articles about your problem.
|
|
|
|
|
hi sir,
i have mp3,avi and picture files . i have to show that files into my application like preview so..
i designed one dialog based application. after that i added the media player component into my dialog box. and created one object for that component.then how can i run that component .. means what the functions to run the media player .how to pass the file to media player component.
Regards,
Srinivas
|
|
|
|