|
Thanks for the information. The Visual programming guide give me no information about the activeX Listview from mscomctl.ocx.
I need the functionality like the right part of the explorer (multiselect row, sort ...) therefore the MFC class CListCtrl have not included such features.
Bruno
|
|
|
|
|
Sub : How to use Amazon Web Services..
Hi all...
Please let me know How to start with amazon web services..
I'm not finding any XML or REST Query format to send request to amazon..
I've purchased Seller account but How to use that to upload Items..I don't know...
Please help me getting start..
I hope some one definatly know about this
e-mail if attachment at sumit_kapoor1980@hotmail.com
Thanks...
..---Sumit Kapoor---
|
|
|
|
|
Hi! I got one small problem and I wonder if somebody could help me with this program in C++. Here is the program:
Const SND_ASYNC = &H1
Private Declare Function PlaySound Lib "winmm.dll" Alias "PlaySoundA" (ByVal _
lpszName As String, ByVal hModule As Long, ByVal dwFlags As Long) As Long
' Play a WAV file.
'
' FileName is a string containing the full path of the file.
' If SyncExec is True, the sound is played synchronously
' Returns True if no errors occurred
Function PlayWAV(N:\sound\1.wav, Optional SyncExec As Boolean) As Boolean
If SyncExec Then
' play the file synchronously
PlayWAV = PlaySound(FileName, 0, 0)
Else
' play the file asynchronously
PlayWAV = PlaySound(FileName, 0, SND_ASYNC)
End If
End Function
Program is signing me an error in line 1. I don't know why. If somebody has a solution, please help me with my program!
Rachel
|
|
|
|
|
HI
Check out New site for source www.maxcode.com
Never consider anything Impossible before trying to solve that..---Sumit Kapoor---
|
|
|
|
|
You do realize that the code you've shown is VB and not C++, don't you?
joze5 wrote:
Program is signing me an error in line 1. I don't know why.
What's the error?
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
#include<iostream>
#include<fstream>
#include<string>
int main()
{ using namespace std;
ofstream outfile("F:\myoutfile.txt");
ifstream infile("F:\myinfile.txt");
if(!infile)
{
cerr<<"error,unable to open input file\n";
return -1;
}
if(!outfile)
{
cerr<<"error,unable to open output file!\n";
return -2;
}
string word;
while(infile>>word)
outfile<
|
|
|
|
|
have you tried using double backslash in the path name as in C++ and C a single backslash followed by a letter is a special case, e.g. \n is newline
hth
|
|
|
|
|
ofstream outfile("F:\\test\\myoutfile.txt");
ifstream infile("F:\\test\\myinfile.txt");
ok!
|
|
|
|
|
Compiler doesn't looks for your files... that is not a compiler error !!!. is not a sintaxis error... because is a string... You know what I mean ??
|
|
|
|
|
I have to get back the static text on a dialog programatically. Say version number on help about dialog which will keep on changing .
But when the code like getwindow text executes the dialog is not active . So grtting invalid handle .please advise
Suman ray
|
|
|
|
|
assuming you have an object in your main program for this dialog and you are also using MFC, then you can assign a variable (CString probably) to the text box using the class wizard and then you should be able to access it in your main program (you may need to add a Get method).
hth
|
|
|
|
|
the problem is that there is no gurantee that this object will be created in program lifetime. In fact if the user does not click on help->about , object is never created.
Suman ray
|
|
|
|
|
Couldn't you create the object in your constructor and then override the help->about method so that it just does "m_HelpDialog.DoModal ( ) ;" ?
This way the object will always exist during the program run.
Andy,
|
|
|
|
|
raysuman wrote:
the problem is that there is no gurantee that this object will be created in program lifetime
perhaps calling IsWindow(..) with the handle of the static control to receive the text from before doing so helps
We are men. We are different. We have only one word for soap. We do not own candles. We have never seen anything of any value in a craft shop. We do not own magazines full of photographs of celebrities with their clothes on. - Steve
|
|
|
|
|
Does anybody know how windows determines the background colour to use for static and group box controls?
At the moment I have a window (not a dialog) that contains a tab control which contains group, static and edit controls. This works fine if themes are not being used. If I enable themes the background colour for the static and group box controls is different to the colour of the tab control. It would appear windows is using the background colour from the parent window instead of the tab control. I'm wondering if windows uses different rules when the parent is a dialog?
Can anybody offer any suggestions?
Systems AXIS Ltd - Software for Business ...
|
|
|
|
|
Control colour's are set via WM_CTLCOLORXXX messages and the returned brush is used to paint the controls background, and the DC passed is used to paint the "foreground".
Theme's are probably getting in the way, and I'm not sure how they fit in the grand scheme of things - I guess you just have a app with a custom manifest file and it looks ok with themes off but not on.
I do remember seeing many apps - MS ones included - that have problems with Tab controls in XP.
This artical may be of use:
http://www.codeproject.com/wtl/ThemedDialog.asp
|
|
|
|
|
Hi All,
Can someone tell me how to identify the font used by Windows Explorer when showing file names? Is it somewhere in the registry?
Thanks,
Chris
|
|
|
|
|
I belive it lives at:
HKEY_CURRENT_USER\Control Panel\Desktop\WindowMetrics\IconFont
Though if I remeber correctly it's a pain as it's stored as a REG_BINARY along with some extra info.
See
http://perso.wanadoo.fr/tmcd2/Shell.htm#IconFont
|
|
|
|
|
Hi Diddy,
Its ok I found the following... Thanks anyway..
Chris
SystemParametersInfo(SPI_GETICONTITLELOGFONT, uifnt, &fnt, 0);
|
|
|
|
|
Hi,
I am trying to get the error description for the error 12045 using the following code, but it doesnt work and gives me error 317. Any ideas how to get this working?
if (!FormatMessage(
FORMAT_MESSAGE_FROM_SYSTEM |
FORMAT_MESSAGE_IGNORE_INSERTS,
NULL,
error_code,
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language
pMsgBuf,
4*1024,
NULL ))
Thanks,
Sigma
|
|
|
|
|
Well I am using the following code. This checks for error messages of networks too
<br />
LPVOID lpMsgBuf;
<br />
DWORD dwRet = ::FormatMessage( <br />
FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_ALLOCATE_BUFFER,<br />
NULL, <br />
iErrCode,<br />
MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US),<br />
(LPTSTR) &lpMsgBuf,<br />
0,<br />
NULL);<br />
<br />
if (dwRet == 0)
{
HMODULE hDll = ::LoadLibraryEx( TEXT("netmsg.dll"), NULL, <br />
DONT_RESOLVE_DLL_REFERENCES );<br />
{<br />
if (hDll != NULL)<br />
{<br />
dwRet = FormatMessage(<br />
FORMAT_MESSAGE_FROM_HMODULE | FORMAT_MESSAGE_FROM_SYSTEM,<br />
hDll,<br />
iErrCode,<br />
MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US),<br />
(LPTSTR) &lpMsgBuf,<br />
0,<br />
NULL);<br />
::FreeLibrary(hDll);<br />
}<br />
}<br />
}<br />
<br />
if ( m_pszErrMessage!=NULL )<br />
{<br />
delete []m_pszErrMessage;<br />
m_pszErrMessage = NULL;<br />
}<br />
<br />
if (lpMsgBuf != NULL)<br />
{<br />
m_pszErrMessage = new TCHAR[dwRet+1];<br />
::strcpy( m_pszErrMessage, (TCHAR*)lpMsgBuf );<br />
m_pszErrMessage[dwRet-2 ] = 0;<br />
::LocalFree( lpMsgBuf );<br />
}<br />
else<br />
{<br />
m_pszErrMessage = new TCHAR[<br />
strlen("Unknown error in evaluating Error Code")+1];<br />
<br />
::strcpy(m_pszErrMessage, "Unknown error in evaluating Error Code");<br />
}<br />
|
|
|
|
|
The error code 12045 may not belong to system message-table. You have to know where error occur and look up error from that module.
Here is the code except from MSDN. Hope useful to you
<br />
HMODULE hModule = NULL;
LPSTR MessageBuffer;<br />
DWORD dwBufferLength;<br />
<br />
DWORD dwFormatFlags = FORMAT_MESSAGE_ALLOCATE_BUFFER |<br />
FORMAT_MESSAGE_IGNORE_INSERTS |<br />
FORMAT_MESSAGE_FROM_SYSTEM ;<br />
<br />
<br />
if(dwLastError >= NERR_BASE && dwLastError <= MAX_NERR){<br />
hModule = LoadLibraryEx(TEXT("netmsg.dll"), NULL, LOAD_LIBRARY_AS_DATAFILE);<br />
<br />
if(hModule != NULL)<br />
dwFormatFlags |= FORMAT_MESSAGE_FROM_HMODULE;<br />
}<br />
<br />
<br />
if(dwBufferLength = FormatMessageA(<br />
dwFormatFlags,<br />
hModule,
dwLastError,<br />
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
(LPSTR) &MessageBuffer,<br />
0,<br />
NULL<br />
))<br />
{<br />
DWORD dwBytesWritten;<br />
<br />
WriteFile(<br />
GetStdHandle(STD_ERROR_HANDLE),<br />
MessageBuffer,<br />
dwBufferLength,<br />
&dwBytesWritten,<br />
NULL<br />
);<br />
<br />
LocalFree(MessageBuffer);<br />
}<br />
<br />
if(hModule != NULL)<br />
FreeLibrary(hModule);<br />
|
|
|
|
|
Is netmsg.dll commonly available on all windows versions? (98, nt, 2k, xp)
|
|
|
|
|
netmsg.dll is a Network Management module. It is an example only. In your case, error message can find in another module, depend on the context.
|
|
|
|
|
Yes, 12045 doesnt fall between NERR_BASE(2100) and MAX_NERR(2999).
So any idea which module (dll) should I load for 12045?
Thanks
|
|
|
|