|
Click here[^]
May be it will help u .
Yes U Can ...If U Can ,Dream it , U can do it ...ICAN
|
|
|
|
|
Your choice for aks this question on this forum was wrong you must ask Managed C++/CLI[^].
|
|
|
|
|
Hi Experts,
I am creating a Shell Context menu application. When I right click on any folder or file, I display the path of file/folder.
I used the following code to get the path of selected files/folders:
<br />
<br />
void CCoMenHandler::GetSelectedFiles(LPCITEMIDLIST pidlFolder,IDataObject *pdtobj)<br />
{<br />
g_szSelectedFiles.RemoveAll();<br />
<br />
if (pdtobj) <br />
{<br />
pdtobj->AddRef();<br />
<br />
STGMEDIUM medium;<br />
FORMATETC fe = { CF_HDROP, NULL, DVASPECT_CONTENT, -1, TYMED_HGLOBAL};<br />
<br />
HRESULT hr = pdtobj->GetData (&fe, &medium);<br />
if (FAILED (hr))<br />
{<br />
GetRecycleBinFiles();
return ;<br />
}<br />
<br />
char path[MAX_PATH];<br />
<br />
UINT fileCount = DragQueryFile((HDROP)medium.hGlobal, 0xFFFFFFFF,<br />
path, MAX_PATH);<br />
<br />
if (fileCount>0)<br />
{<br />
g_szSelectedFiles.SetSize(fileCount);<br />
<br />
for (UINT i=0;i<fileCount;i++) <br />
{<br />
memset(path, 0, MAX_PATH);<br />
if (DragQueryFile((HDROP)medium.lpszFileName, i, path, MAX_PATH)) <br />
{<br />
g_szSelectedFiles.SetAt(i, path);<br />
}<br />
}<br />
<br />
g_szSelectedFiles.FreeExtra();<br />
}<br />
<br />
ReleaseStgMedium(&medium);<br />
}<br />
}<br />
<br />
But If I click on file shortcut(.lnk) file it displat the target path of file, although .lnk itself also a file.
I want to retrive shortcut (.lnk) file path.
|
|
|
|
|
Hello all,
I am developing application to open http connection.
I have used CInternetSession, CHttpConnection, CHttpFile to make Application.
My Code is as Bellow:
<br />
CInternetSession iSession;<br />
CHttpConnection *httpCon = iSession.GetHttpConnection(L"localhost", 80, L"", L"");<br />
CHttpFile *httpFile = httpCon->OpenRequest(L"POST", L"test/test.php"); <br />
BOOL x = httpFile->SendRequest();<br />
<br />
This code works fine for me.
Now the Problem is that i want to pass parameters using POST method to my request.
So is there anybody who can solve my problem.
Any help will be highly appreciated
Thanks.
Manish Patel.
B.E. - Information Technology.
|
|
|
|
|
|
Hi,
I have a application developed in Vc++ and C++, SQL as backend. This is an bit old application with dont have support for Unicode. Now we need to make this application to support Unicode.
This have to be done in VC++ n C++ and SQL DB. This program is of 300000 lines of code, which is divided into different small modules.
Can any help me out, how to make this application to support Unice code.
To my knowledge we have to replace char with wcahr or TChar (i m not sure which one to use). May need to do similar thing for DB as well.
Here what I would like to ask you is
1) Is there any specific procedure to do this conversion or we need to check each and every line for char and relace it with wchar/tchar.
Can you please help me to do this.
Thanks
|
|
|
|
|
Converting a project to Unicode[^]. There are totally 9 parts or so. That should help you.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
Thank You Rajesh, It will be realy great if i can get some details with code exampls. Or if any one is there if u can share more knowledge for this conversion.
Thanks,
Maha
|
|
|
|
|
There isn't too much of code involved in the conversion. There are things like making neutral calls, using the _T macro, etc., Please go through all the parts of the tutorial I linked you to (there are 9 parts). That should get you through the task easily. But if you run into trouble somewhere in between, you discuss it with people here (by starting a new thread).
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
Click here [^]
Yes U Can ...If U Can ,Dream it , U can do it ...ICAN
|
|
|
|
|
See this[^] link does any help?
|
|
|
|
|
Now i got clear idea about Unicode, but actually what the problem I am facing is, I am work in a real-time project. In this project we have more than 300000 lines of code; it will take hell lot of time if we want to do manual Unicode implementation. So please let me know if there are any tools available to do this Unicode conversion.
Also it will be great if you can give me some tips on how to perform unit testing for the Unicode implementation (is there any tool for this as well).
|
|
|
|
|
|
hi,
i have a popup window which i want to move behind an other window and appear from bottom of the other window. i work with SetWindowPosition() function, and also modify the other window as a top most window, but my popup window move upon that window.
would you please help me.
thanks a lot
Miss_F
|
|
|
|
|
Miss_F wrote: SetWindowPosition()
Are you talking about SetWindowPos() method? May be you should show us your code.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
I put this code when the popup window is shown(in the popup class) (the other window which I want to put the popup movement behind it, is its owner and rect.bottom is the owner client rect bottom):
SetWindowPos( 0, 0, rect.bottom, 400, 100, SWP_NOZORDER | SWP_SHOWWINDOW );
GetOwner()->SetWindowPos( this , 0 , 0 , 0 , 0 , SWP_NOMOVE | SWP_NOSIZE );
// GetOwner()->SetWindowPos( &wndTopMost,0,0,0,0,SWP_NOMOVE|SWP_NOSIZE );
for ( int i = 0 ; i <= rect.bottom ; i++ )
{
SetWindowPos( 0, 0, i, 0, 0, SWP_NOSIZE|SWP_NOZORDER|SWP_SHOWWINDOW);
RedrawWindow();
Sleep(100);
}
|
|
|
|
|
hi
i have a application to read text file and delete it .
up to reading i done it . now i want to delete the text file after reading .
can any one help me
k.guru moorthy
|
|
|
|
|
Try DeleteFile()
BOOL WINAPI DeleteFile(
__in LPCTSTR lpFileName
);
BTW, don't delete your question(s) when your problem is solved.
Alcohol. The cause of, and the solution to, all of life's problems - Homer Simpson
|
|
|
|
|
|
I need to understand a few things about programming C, C++.
The first is Libraries, I've written some funtions that make using Win 32 APIs easier for me, I've placed these functions in a file called MyInclude.h which contains the prototypes and the functions themselves. This has worked well for me, I have also applied this philosiphy to an H file that contains prototypes and functions that are specific to an application.
Is this 'proper', by proper I mean generally accepted programming practice, as essentially the H file that is specific is not usable as a library? My thinking was that it makes the application code so much easier to read, but now I am having second thoughts.
I've shot myself in the foot by taking an application under development and reorganizing it by moving typedefs, prototypes and application specific functions to an H file and before proceeding further I thought I would seek some advice.
Thanks for your time and wisdom.
|
|
|
|
|
You should keep function prototypes in header files (*.h ) while function definitions should stay inside source ones (*.c or *.cpp ).
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.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
Thank you very much, I will get to work.
|
|
|
|
|
You're welcome.
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.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
For more info about about c++ see this link <a href="http://www.cplusplus.com">www.cplusplus.com</a>.
|
|
|
|
|
Good link, added to favorites, Thanks.
|
|
|
|