|
goto page property then click in overriders then click OnInitDialog
whitesky
|
|
|
|
|
[quote] "goto page property then click in overriders then click OnInitDialog" [/quote]
As long as OP wrote "classwizard" word, he/she uses VS 6.0 or older, so no "page property" to go.
Ovidiu Cucu
Microsoft MVP - Visual C++
|
|
|
|
|
oh yes so I need to VS 6.0 (return to past)
whitesky
|
|
|
|
|
No no, just do not hurry and read first the question.
OK, happens. Peace, brother!
Ovidiu Cucu
Microsoft MVP - Visual C++
|
|
|
|
|
so how do i do it?
can u please explain?
i receive the values in mainframe.cpp and i need to get these values and display in the dialog page that i open.
i want the edit controls in the opened dialog page to be updated with these values once i open the dialog page.
|
|
|
|
|
Like Naveen R already said: "Add a message handler for WM_INITDIALOG message using class wizard".
Need more details?
- select "View/ClassWizard..." menu item or press Ctrl+W.
- select your dialog class from "Class Name" combo.
- from "Messages" list select WM_INITDIALOG.
- click "Add function" then "OK" or "Edit Code".
That's all.
Ovidiu Cucu
Microsoft MVP - Visual C++
|
|
|
|
|
thanks to all. it works..
|
|
|
|
|
<A href="http://www.somesite.com/sth.asp" target=_blank>
<img height=100 src="see.jpg" width=600 border=0>
</A>
->
<A href="http://www.somesite.com/sth.asp" target=_blank>
TestText
</A>
How to do the change using IHTML**** interface?
-- modified at 23:24 Wednesday 28th June, 2006
|
|
|
|
|
I think first you have to locate your A element.
If it contained an id or name attribute, then you would use the getElementById or getElementsByName functions of IHTMLDocument2 .
Otherwise you can obtain all of A elements with getEmentsByTagName function, and then perhaps organize a loop and find your element by the value of href attribute.
After you found the element and got IHTMLElement interface, change its content using put_innerText or put_innerHTML functions.
Hope it helps.
|
|
|
|
|
Hi Guys,
Thanks for answering my earlier post about socket trouble. The trouble is my server stopped listening for new connections (Connrefused error when client connects) but old connections are alive & still receiving handshakes.
Clients couldn't get connected even hr's after. I've found the reason, my server works fine if connections arrives one by one, but when simultaneous connections arrive, the events(WSAWaitForMultipleEvents) which i used in loop stops triggering. Without events the server works fine (accepts simultaneous connections).
I'm posting crtical section of my code, could some one give me a possible solutions...
//code starts
s = socket(AF_INET,SOCK_STREAM,0); //created
bind(s,...) == SOCKET_ERROR ) //bind
listen(s,SOMAXCONN) == SOCKET_ERROR ) //listen
CClientThread *newclient;
//The following lines are causing truble when many connections arrive simultaneously, suspect WSAWaitForMultipleEvents
WSAEVENT hEvent1 = WSACreateEvent();
WSAEventSelect (server_socket, hEvent1, FD_ACCEPT);
WSAEVENT pEvents[2];
pEvents[0] = hEvent1; // Socket event
pEvents[1] = GetStopEvent(); // Thread teminate event
BOOL bDone = false;
while ( !bDone)
{
int nRetVal = ::WSAWaitForMultipleEvents(2, pEvents, FALSE, 0, FALSE);
switch (nRetVal)
{ //when too many connections arrive at a time, this case never triggers
case WSA_WAIT_EVENT_0:
// Connection to accept
SOCKET client_socket;
client_socket = accept(s,,...);
if ( client_socket == INVALID_SOCKET )
closesocket(client_socket);
return(0);
}
newclient = new CClientThread(this,client_socket,client_ip, iPort);
newclient->StartThread();
WSAResetEvent (hEvent1);
break;
case WSA_WAIT_EVENT_0+1:
bDone = TRUE; // Thread requested to stop
break;
case WSA_WAIT_TIMEOUT:
break; // Timeout
}
}
WSACloseEvent (hEvent1);
//Code ends
Thank you
Rove
-- modified at 23:32 Wednesday 28th June, 2006
|
|
|
|
|
I want to intercept print task, How can i create a virtual printer?
|
|
|
|
|
|
|
Can you help me to download Pdf995 and email to me(whitegest@sohu.com)?
the website you tell me is blocked here(i am in China).
thank you a lot.
|
|
|
|
|
A.exe use createprocess to start up B.exe,
B.exe must read a local file in its folder,
i found i only click B.exe, B.exe can open the local file,
when A.exe start up B.exe using createprocess,
B.exe fails to open the local file always.
Why?
Just relax
|
|
|
|
|
how do u try to open the file? Try opening the the file using the full path not relative.
I doubt the problem happens because of the change in the working directory of the b.exe.
nave
|
|
|
|
|
I have try both full path and relative,
but have the same problem.
Just relax
|
|
|
|
|
Can you show how to use.
whitesky
|
|
|
|
|
Main process:
STARTUPINFO si;
ZeroMemory(&si, sizeof(si));
si.cb = sizeof STARTUPINFO;
PROCESS_INFORMATION pi;
CreateProcess("A.exe",
NULL,
NULL,
NULL,
FALSE,
0,
NULL,
NULL,
&si,
&pi);
Sub Process:
GetModuleFileName(NULL,read,1000);
printf("%s\n",read);
int len = strlen(read);
strcpy(read+len-4,".tmp");
printf("%s\n",read);
FILE *f = fopen(read,"rb");
if (f==NULL) {
printf("Hello world\n");
}
Just relax
|
|
|
|
|
iLoveM wrote: FILE *f = fopen(read,"rb");
u try opening the file in write mode.
if that too failes, u can conclude one of the following
1. A file already exist in that path and is been opened by another process
2. Path is invalid
3. Don't have privilage
and let me know the results
nave
|
|
|
|
|
iLoveM wrote: FILE *f = fopen(read,"rb");
If fopen() fails, what is the value of errno ?
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
iLoveM wrote: Why?
You should be telling us why. If you are opening the file via CreateFile() and it's failing, what does GetLastError() return?
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
It's too strange!!!
STARTUPINFO si;
ZeroMemory(&si, sizeof(si));
si.cb = sizeof STARTUPINFO;
CHAR szFolderWhereFileIsLocated[250]={0};
strcpy(szFolderWhereFileIsLocated ,"put path here");
PROCESS_INFORMATION pi;
CreateProcess("A.exe",
NULL,
NULL,
NULL,
FALSE,
0,
NULL,
szFolderWhereFileIsLocated,
&si,
π);
when i put these code in a console program, the sub process can open correctly. Then in my windows program, the sub process can't open file firstly, then start up the sub process again (my program will start up the sub process every 20 sec) , it's OK.
Just relax
|
|
|
|
|
hi all ,
i am facing a problem while displaying 2 byte japanese characters in web page.
actually what i m doing is reading the japanese string as a string and then writting it to xml file and then use the xml file to fill the web page .
so what i m getting is single byte characters corresponding to the the japanese chracters.
If anyone has any answer then please reply
Surendra Vishwkarma
Surendra Vishwkarma
|
|
|
|
|