|
Use BM_CLICK .
SendDlgItemMessage(IDOK,BM_CLICK,0,0);
|
|
|
|
|
prasad_som wrote: BM_CLICK.
they is no such thing like BM_CLICK .... are you referring BN_CLICK
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and you
|
|
|
|
|
ThatsAlok wrote: are you referring BN_CLICK
No, I'm refering to BM_CLICK[^].
|
|
|
|
|
prasad_som wrote:
No, I'm refering to BM_CLICK[^].
Ohh thanks!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and you
|
|
|
|
|
BM_CLICK Message
An application sends a BM_CLICK message to simulate the user clicking a button.
|
|
|
|
|
Hello,
I have a tricky problem and I hope anyone can point me a solution. I have an C++ Unicode application that received a parameter form the browser. If the parameter is a Greek word for example, I get something like this &u=%u03C5%u03B2%u03AD& (html entities). Does anyone know an efficient method to convert the html entity into the Greek character?
Thanks.
|
|
|
|
|
micutzu wrote: &u=%u03C5%u03B2%u03AD&
one doubt. In the above string does 03c5,03b2... represents some Greek character?
nave
|
|
|
|
|
Yes. They are. I want to obtain the unicode character represented by 03c5.
|
|
|
|
|
I think the below code will work..
wchar_t* ptext = _T("%u03C5%u03B2%u03AD&");
wchar_t* pEntity = new wchar_t[ _tcslen( ptext ) + 1];
_tcscpy( pEntity, ptext );
/// in u r case u can start from here
wchar_t pGreek[50] = {0};
int ncount = _tcslen( pEntity );
int nChar = 0;
wchar_t *pStart = pEntity + 2;
for( int i = 0, j = 0; i< ncount-2; j++, i += 6 )
{
*(pStart + 4) = 0;
*(pStart + 5) = 0;
swscanf( pStart , _T("%x"), &nChar );
pGreek[j] = nChar;
pStart+= 6;
}
AfxMessageBox( pGreek);
delete[] pEntity;
nave
|
|
|
|
|
Hi All.
I have some simple problem.
In my program, I use
HANDLE FindFirstFile(
LPCTSTR lpFileName,
LPWIN32_FIND_DATA lpFindFileData
);
I Have problem if I wont to find all files in folder.
I cant write:
FindFirstFile("C:\\My File\\*",&FileData);
or
FindFirsttFile("C:\\My File\\*.*",&FileData);
Thanks for any help.
|
|
|
|
|
I think you need to read the documentation[^] once again.
The first parameter is a handle, not a string. This handle is retrieved by calling FindFirstFile.
|
|
|
|
|
Sorry I use FindFirstFile and not FindNext.
it wos my mistake.
|
|
|
|
|
Well, then it would be nice that you explain what you mean by "I can't write". This is not clear at all. What's happening ? Do you have a compilation error ? A linker error ? Or what ?
(And of course, if the compiler give an error, then supply it to us also).
|
|
|
|
|
Now not compile error, somting else.
In program I use
hSearch = FindFirstFile("C:\\My Files\\*.*",&FileData);
if(hSearch != INVALID_HANDLE_VALUE)
{
. . .
. . .
// pFileNameOld = L"C:\\My Files\\" + FileData.cFileName
//in this
_wrename(pFileNameOld,pFileName);
}
wen I try to rename file program stop work and thets it.
in "Watch1" I see thet FileData.cFileName is equal to ".", why?
|
|
|
|
|
david bagaturia wrote: in "Watch1" I see thet FileData.cFileName is equal to ".", why?
Strange, are you sure it is ".".
Use FindClose to close file handle brefore renaming it.Check return value of _wrename for any possible arrors.
|
|
|
|
|
There are two directories in every folder named "." and "..", They are usually hidden system directories that allow navigation. You cannot do anything with them, so in your code, when you find them, skip them.
|
|
|
|
|
"." means "current directory", which is a sub directory as far as the filesystem is concerned
Likewise for ".." (parent directory)
So you need to do some extra checking to see if you're dealing with a file or a folder
|
|
|
|
|
Thanks, it help me.
I solve problem.
|
|
|
|
|
david bagaturia wrote: I cant write:
FindNextFile("C:\\My File\\*",&FileData);
or
FindNextFile("C:\\My File\\*.*",&FileData);
No, you cant. Can you tell , what you are trying to do?
|
|
|
|
|
I need to find all files in given folder,
and I use FildFirstFile. In message I made mistake and write FindeNextFile.
Sorry for that.
|
|
|
|
|
|
thanks mOnO.
It help me.
I have skype and I will send you code bu it.
|
|
|
|
|
How to check if the check box is checked or not in win 32 App ???
We use to use member of the check box to check if its checked or not checked in MFC
m_CkBox == TRUE
how to do it in win 32 app ????
I want to open the text file in note pad how to do it ???
This works in MFC
ShellExecute(NULL, "open", FileName ,NULL, NULL, SW_SHOWNORMAL);
How to do it in Win 32 API ??? I am not able to use ShellExecute in win 32 App
Thanking you,
Suresh HC
|
|
|
|
|
Suresh H wrote: How to check if the check box is checked or not in win 32 App ???
We use to use member of the check box to check if its checked or not checked in MFC
m_CkBox == TRUE
how to do it in win 32 app ????
BM_GETCHECK.
Suresh H wrote: ShellExecute(NULL, "open", FileName ,NULL, NULL, SW_SHOWNORMAL);
Suresh H wrote: How to do it in Win 32 API ??? I am not able to use ShellExecute in win 32 App
See what GetLastError returns. See the documentation for further details.
|
|
|
|
|
Thanks Thomas for the response & for the Solution.
Its working now I just did
if (::SendMessage(hwndCheckBox,BM_GETCHECK,0,0)==BST_CHECKED)
to check the status.
But still for this I am getting error
ShellExecute(NULL, "open", FileName ,NULL, NULL, SW_SHOWNORMAL);
Error:-
: error C2065: 'ShellExecute' : undeclared identifier
Error executing cl.exe.
|
|
|
|