|
OnInitDialog()
{
CButton* pChild = GetWindow(GW_CHILD);
while(::IsWindow(pChild->m_hWnd)){
CString csClassName;
::GetClassName(pChild->GetSafeHwnd(), &csClassName, 6);
if(csClassName=="BUTTON"){
}
pChild = GetWindow(GW_HWNDNEXT);
}
}
This is what I had in mind
I'm drinking triples, seeing double and acting single
|
|
|
|
|
CHAIGNEAU wrote:
GetClassName(pWnd->m_hWnd,(LPTSTR)((LPCSTR)cs_Temp),100);
This is wrong, and is why I asked for a code snippet in my initial reply. The correct implementation should be:
GetClassName(pWnd->m_hWnd, cs_Temp.GetBuffer(100), 100);
cs_temp.ReleaseBuffer();
You should also set a breakpoint on the FindWindowEx() call and verify that cs_temp is "Button" before continuing.
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
I am trying to make an app which will act like the standard toolbar in Windows (i.e. always present, dockable)from the main window (i.e. not attached to a doc window) with application buttons. What is the best approach, use wizard and create dialog? Which class would be best to inherit from CDialog, CDialogBar, or CToolbar? Are there any examples out there which might help?
Thanks for the advice..
|
|
|
|
|
Is there anyone that has successfully used the mysql embedded server functionality? If so I would be very happy if you could supply some example code and/or point out known problems, quirks etc.
|
|
|
|
|
Have you looked at the examples supplied by MySQL
I'm drinking triples, seeing double and acting single
|
|
|
|
|
Yes, I tried the samples and have no got them working. Still I got strange errors when debugging. The examples crash on mysql_server_end. Any clues?
|
|
|
|
|
Hi,
I want to scan a file which has special characters like eof character etc..
fp=fopen("input","r");
So if I use while((ch=fgetc(fp))!=EOF) it is not scanning the entire file.Is there any way to scan the files which has special characters.
Karteek
|
|
|
|
|
karteek wrote:
...it is not scanning the entire file.
How are you confirming this?
karteek wrote:
fp=fopen("input","r");
Have you tried using fp = fopen("input", "rb");
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
Hi,
The code I wrote is:
FILE *fp1=fopen("input","rb");
FILE *fp2=fopen("output","wb");
char c;
while(1)
{
c=fgetc(fp1);
if(feof(fp1)) break;
fprintf(fp2,"%c",c);
}
fclose(fp1);
fclose(fp2);
But this code is not working
Karteek
|
|
|
|
|
karteek wrote:
But this code is not working
Define "not working."
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
The problem is that fgetc() returns an int, not a char.
Suggestion: instead of fprintf(), use fputc()
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
In windows, one solution is to search for "\r\n."
Kuphryn
|
|
|
|
|
Hi,
not working means it is not scanning the entire file.It is breaking out in between.Note the file has special characters like eof etc...
Karteek
|
|
|
|
|
karteek wrote:
not working means it is not scanning the entire file.
How are you confirming this?2
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
Hi,
I took a sample input file with special characters and tried to print them in another file.But the output file does not have all the characters present in the input file
Karteek
|
|
|
|
|
what is the purpose of this? are you just copying files?
|
|
|
|
|
Yes.I want to scan one file and write it in another
Karteek
|
|
|
|
|
so why not do that right away!?
read all the file to a buffer and write it to the other file using fread, fwrite
or you can use a call like CopyFile(...)
|
|
|
|
|
Doing so one character at a time is the epitome of inefficiency. As has already been suggested, use CopyFile() or SHFileOperation() . Using fread() and fwrite() with a decent sized buffer will also work.
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
Ok, using a binary editor such as Visual Studio, at what point do the files start to differ? The first character in the 'source' file that does not show up in the 'destination' file will give you a clue.
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
Hi,
I have a problem with my dialog box which has a richedit control box in it.The dialog box doesnt show up at all.But, if i replace the richedit control box with a edit box, everything works fine..
Can anyone help me,
Thanks
Deepak Samuel
|
|
|
|
|
read vc richedit help, answer is there
includeh10
|
|
|
|
|
Hi,
thanks for the reply, but where do i get that vc rich edit help?
regards
Deepak Samuel
|
|
|
|
|
The rich edit control DLL has not been initialized. If you are using MFC, search MSDN for CRichEditCtrl Overview. It explains exactly what is happening.
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
Call AfxInitRichEdit(), that should help.
Mickey
|
|
|
|