|
Im looking for a good tutorial on importing text files, rearraging the data, then writing it to a new file. Anyone know a good one???
thanks
|
|
|
|
|
Use CFile objects in MFC to read character-data from the text file. Save this data into an array/matrix of characters. Then do your rearranging, whatever that is. After that, write it into a new file using a new CFile object again.
See the documentation of CFile for examples.
-Antti Keskinen
----------------------------------------------
The definition of impossible is strictly dependant
on what we think is possible.
|
|
|
|
|
i need to download the msdn
but i cant find it
where i get exact downloadable link of msdn library
pls help
thanx
regards
rajesh
|
|
|
|
|
I dont know why would any one spend hell lot of time downloading the msdn when you can view it online, as far as i know there is no option to download MSDN, Try getting hold of MSDN 2004 cds.
I Touched Osama Bin Ladens Bushy Beard
|
|
|
|
|
|
Is there any way to do that? Tried to PlaySound() -method, did not seem to work. Thank you.
|
|
|
|
|
I already found the way in Multimedia section, sorry for bothering.
|
|
|
|
|
Hi All,
I was trying to detect a File Open/save Dialog box event of any generic windows application using windows hook. I got a very good suggestion from this forum of installing a WH_CBT hook and check the classname of every window created , if it matches the FileOpen Dialog's classname do my stuff.
This actually works very nicely but now I have a slightly different problem.
I need to use WH_GETMESSAGE hook for mouse/keyboard events detection as well. So I am trying to get away with installing just a WH_GETMESSAGE for HCBT_ACTIVATE event. I actually do get this event just like I get one if I had installed a WH_CBT hook. However I do not get a pointer to the HWND like a get from the wParam parameter if I had installed a WH_CBT.
I checked both the ((Message)lParam)->wParam as well as wParam but I do not get the valid HWND pointer.
Need help. Thanks in advance.
Regards,
Zahid
Regards,
Zahid
|
|
|
|
|
How can debug a dll in a runtime?
I have a command line program which uses a dll and i would like to debug the dll during run-time. how can i do that.
Shenthil
|
|
|
|
|
In your DLL project
Specify your Debug - Executable for debug session. (the executable which uses the DLL)
Sonork 100.41263:Anthony_Yio
|
|
|
|
|
Alternatively, in the EXE project, go to Project > Settings > Debug tab > Additional DLLs category. Add any DLLs to be debugged along with the project here.
A third way, IIRC, is to add both projects to the same workspace.
|
|
|
|
|
|
Thanks. I am working on it. Also, do u know how to turn off disassemble while debugging.
|
|
|
|
|
Hi
I am trying to use the ATL class 'CRegKey'. I want to use the member function
'EnumKey()' which is described at the website.
If i look into the header file myself, that member function and some others aren't included.
Am i working with an old version of the ATLBASE.H? Can i upgrade this file and get all features of CRegKey?
I have Windows2000, Visual Studio 6.
Any ideas?
Greetings
Jens
|
|
|
|
|
Anonymous wrote:
Am i working with an old version of the ATLBASE.H? Can i upgrade this file and get all features of CRegKey?
I have Windows2000, Visual Studio 6.
It looks like the function is only available with the ATL that comes with VS.NET and VS 2003. Even the latest platform SDK doesn't have it.
Michael
But you know when the truth is told,
That you can get what you want or you can just get old,
Your're going to kick off before you even get halfway through.
When will you realise... Vienna waits for you? - "The Stranger," Billy Joel
|
|
|
|
|
Hello,
what I would like to do is to display a logo (jpg or bmp) in a static control on a dialog.
This logo will always have the same size and will be stored in a file logo.jpg or logo.bmp located on user station, it will be loaded in the dialog at initialization time (no bitmap stored in the ressources).
This will allow me to be more flexible and to customize the dialog for each user station.
I will just give each user a different file logo.jpg or logo.bmp.
Thanks in advance for any information
Regards
DD
|
|
|
|
|
CStatic::SetBitmap() (or send an STM_SETIMAGE message) and LoadImage with LR_LOADFROMFILE parameter (for BMPs). JPGs you can load with OleLoadPicturePath() and obtain hBmp through IPicture::get_Handle. You can also use IPicture::Render() to draw loaded image.
|
|
|
|
|
In MFC I have a populated combobox. Now I want the second item to be selected be the first item to be visible. SetTopIndex() is the functionality I require but it only seems to work for ComboBox with Type: Simple???
When the droplist is shown I just want to nudge the scrollbar up one. Can I get a handle to the vertical scrollbar in the drop list, if so how?
Sort is turned off, VC6 sp5.
Any help would be greatly appreciated. ps. take it easy im a newbie.
|
|
|
|
|
hello,
here is a problem..
in my project i m showing the program icon in the system tray when it is installed( like yahoo messanger icon when installed).now i want to take the mouse on the icon and right button clicked.it should show the popup menu containing one item string when i passed 0(zero) to a variable which is saved in a system file(created for my project) .now i changed the file by giving some other value
like 1(one) to the variable ,save that file,then i took my mouse on the icon and right click,this time it should show 2 items in the menu for examp. 1.messanger, 2. logon etc. in the popup menu.
how can i achieve this dynamically without restarting the computer .
point : my file variable value is read by registry and setting the new value correctly, which i tested by putting messageBox..so i m reading from the registry either 0 or 1 correctly. the problem is how to create dynamically these 2 menus one having one item & the other having 2 items according to the values passed either 0 or 1 respectively???
any idea anybody???
skpanda
|
|
|
|
|
A quick example put together from memory on dynamic menu creation
HMENU hMenu = ::CreatePopupMenu();
switch (itemCount)
{
case 5:AppendMenu(hMenu, MF_STRING, 5, "Item 5");
case 4:AppendMenu(hMenu, MF_STRING, 4, "Item 4");
case 3:AppendMenu(hMenu, MF_STRING, 2, "Item 3");
case 2:AppendMenu(hMenu, MF_STRING, 2, "Item 2");
case 1:AppendMenu(hMenu, MF_STRING, 1, "Item 1");
case 0:
break;
}
int selection = TrackPopupMenuEx(hMenu, x, y, TPM_RETURNCMD, ...);
DestroyMenu(hMenu);
Roger Allen - Sonork 100.10016
Roger Wright: Remember to buckle up, please, and encourage your friends to do the same. It's not just about saving your life, but saving the quality of life for those you may leave behind...
|
|
|
|
|
I need a class or a code sample with a commets for receiving a file through the proxy with autorization.
Please, help me
Best regards,
Eugene Pustovoyt
|
|
|
|
|
|
HTTP
Best regards,
Eugene Pustovoyt
|
|
|
|
|
Hi,
use this code.
#include <afxinet.h>
//assumes server, port and URL names have been initialized
CInternetSession session("My Session");
CHttpConnection* pServer = NULL;
CHttpFile* pFile = NULL;
try
{
CString strServerName;
INTERNET_PORT nPort;
INTERNET_PROXY_INFO proxyinfo;
proxyinfo.dwAccessType = INTERNET_OPEN_TYPE_PROXY;
proxyinfo.lpszProxy = CStrProxy;
proxyinfo.lpszProxyBypass = NULL;
session.SetOption(INTERNET_OPTION_PROXY, (LPVOID)&proxyinfo, sizeof(INTERNET_PROXY_INFO));
pServer = session.GetHttpConnection(strServerName, nPort);
pFile = pServer->OpenRequest(CHttpConnection::HTTP_VERB_GET, strObject);
pFile->AddRequestHeaders(szHeaders);
pFile->SendRequest();
pFile->QueryInfoStatusCode(dwRet);
if (dwRet == HTTP_STATUS_OK)
{
UINT nRead = pFile->Read(szBuff, 1023);
while (nRead > 0)
{
//read file...
}
}
delete pFile;
delete pServer;
}
catch (CInternetException* pEx)
{
//catch errors from WinInet
}
session.Close();
Have A Nice Day
Murali.M
|
|
|
|
|
I don't understand what a szHeaders string must contains!?
Best regards,
Eugene Pustovoyt
|
|
|
|