|
amitmistry_petlad wrote: but how can I add the icon in the listview
SHFILEINFO has an hIcon member that holds the icon of the corresponding file type. You can use that icon.
|
|
|
|
|
Hi all.
result of this code is "cant create File" and I dont know why.
can help??
<br />
wchar_t FileName[250]= L"C:\\File Manager Service Log\\log.txt";<br />
wchar_t *pFileName = MySystemTime(FileName);<br />
HANDLE F;<br />
<br />
F=CreateFile((LPCTSTR)pFileName,<br />
GENERIC_READ, <br />
FILE_SHARE_READ,<br />
NULL,<br />
CREATE_NEW,<br />
FILE_ATTRIBUTE_NORMAL,<br />
0);<br />
<br />
<br />
<br />
if(F == INVALID_HANDLE_VALUE)<br />
{<br />
printf("cant create File");<br />
<br />
getchar();<br />
return;<br />
}<br />
|
|
|
|
|
david bagaturia wrote: wchar_t *pFileName = MySystemTime(FileName);
HANDLE F;
Does pFileName conatins valid path here ? If yes, then there should not be any problem with file creation.Use GetLastError to narrow down the error.
|
|
|
|
|
try calling GetShortPathName before the create file function..
|
|
|
|
|
What happens if you run this code
wchar_t FileName[250]= L"e:\\Test is ok\\log.txt";
HANDLE F;
F=CreateFileW(FileName,
GENERIC_READ,
FILE_SHARE_READ,
NULL,
CREATE_NEW,
FILE_ATTRIBUTE_NORMAL,
0);
CloseHandle(F);
|
|
|
|
|
using the function AcceptSecurityContext for authentication. But the fn returns error when trying to authenticate on a virtual machine.
SEC_E_NO_AUTHENTICATING_AUTHORITY
No authority could be contacted for authentication. This could be due to the domain name of the authenticating party being wrong, the domain being unreachable, or to a trust relationship failure.
in case of virtual machines, is there one more level involved?
thanks
|
|
|
|
|
Hello, I would like to click the "OK" button of the window programmatically.
How can I do this if I know the ID of window and button.
Thanks & Regards,
Suman
-- modified at 3:07 Monday 19th February, 2007
|
|
|
|
|
Use WM_COMMAND .
SendMessage(hWnd,WM_COMMAND,(LPARAM)IDOK,0);
|
|
|
|
|
Hi prasad_som, where would one find a very good example of the SendMessage function, Explaining all of the commands that can be used and so on. I have looked on MSDN but the example they give is a bit crappy ...
Many Thanx
Regards,
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
|
|
|
|
|
Programm3r wrote: Hi prasad_som, where would one find a very good example of the SendMessage function, Explaining all of the commands that can be used and so on
SendMessage is very generic function, can be used with all window messages.
It includes command messages.
So, you can see in documentation of messages(WM_SETTEXT etc.), how it can be used with SendMessage , how to send extra information etc.
Or something else you was looking for ?
|
|
|
|
|
No thank you, I'll dig around and see what I can find. But thnk you very much for the help and steering me into the right direction.
Many Thanx
Regards,
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
|
|
|
|
|
Welcome !
|
|
|
|
|
Its easy it has four parameters SendMessage(Handle to window,Specifies message,WPARAM,LPARAM);.;)
Like this:
SendMessage(hWnd,WM_CLOSE,0,0);
|
|
|
|
|
See this[^] thread.
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
Thanks a lot for great help from you both!!
Best Regards,
Suman
|
|
|
|
|
Hi,
I have created MSI package using VS 2005, but whenever i install the msi package it is asking for me where to install, but i want it to ask only at the first installation, if am installing second time it should not ask me, it should go to default folder which i have selected previously
Manjunath S
GESL
Bangalore
|
|
|
|
|
Hi,
I need to change the color of the CStatic text. How can i do that ?
Thanks
Bye
|
|
|
|
|
sakthimuthu wrote: I need to change the color of the CStatic text. How can i do that ?
See here[^].
|
|
|
|
|
Use OnCltColor .
HBRUSH CMylg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
{
HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
if (pWnd->GetDlgCtrlID() == IDC_STATIC)
{
pDC->SetTextColor(RGB(255, 34, 0));
pDC->SetBkMode(TRANSPARENT);
}
return hbr;
}
|
|
|
|
|
if i do so, I am getting error like,
"m_brush Undecalred Identifier"
How do i resolve this ?
Thanks
|
|
|
|
|
sakthimuthu wrote: "m_brush Undecalred Identifier"
You just delete that line.
That brush variable stands for backfground color for text, if you want different.
|
|
|
|
|
Where is m_brush on your code?
|
|
|
|
|
It was there, considered as member variable of dialog class. Refer MSDN example of OnCtlColor .
|
|
|
|
|
hi,
I have added this "OnCtrlColor" on my code. But, When i do debugging it the program control does not come to this "OnCtrlColor" fn.
Why ?
Can you help me ? Kindly
bye
|
|
|
|
|
Did you insert WM_CTLCOLOR of peroperty window to your project or insert OnCtrlColor to your code
|
|
|
|