|
So, what is HTML strings? Do you mean you'd like to display some HTML content?
|
|
|
|
|
HTML Strings mean, I create HTML Tags in the memory and doesn't want to create an HTML file to display them, I need to display them directly onto a browser and i failed to find out a way. Tried doing the same using WebBrowser2 ActiveX control but it required only Html File path as it's input in Navigate and also tried DHtmlEdit but i was able to edit the contents using it, which is not required
|
|
|
|
|
and thx for the help in advance
|
|
|
|
|
|
Thx... that might be useful...
|
|
|
|
|
|
Hi,
In My application,in view window i have made like this..
1.Index Page
2.Introduction
3.Summary..
Like this. And also i have shortcut keys for each page as shift-1,shift-2...
And also i can move to next page by using PageDown. And also i can press the second option(2.Introduction) by mouse and i directly move to the second page.
My actual problem...
If i use pagedown and move to next page (for eg:Introduction page)...Now if i press shift-1,it directly go to Index page.
If i use mouse and move to another page,and then if i press shift-1 it does not go to index page.I mean it does not go to OnKeyUp() function. Why this problem..
Actually i use Glg.dll for this view.
I didnot use on LButtonClick() for mouse action. glg.dll has function for this.
if( gpGView->glg_animation[SCHEPAGENO].m_hWnd )
{
gpGView->glg_animation[SCHEPAGENO].ShowWindow(SW_HIDE);
SCHEPAGENO = iPanNo - 1;
if(SCHEPAGENO -> giGraphicCnt)
SCHEPAGENO = giGraphicCnt;
}
gpVIew is my view class object.
SCHEPAGENO is page number.
Graphiccnt is total no of pages.
Anu
|
|
|
|
|
Are u using MFC SDI architecture?
U have a view class and u are creating three pages in that view. The View is the parent for the three pages. Am i right?
Plz give some more deatils regarding the application,
Prasanth M V
|
|
|
|
|
Hi to all,
i m working for Win ce 6.0 platform having VS 2005 as a platform builder and SDK as a language...
i m facing the problem regarding the settings of default keys
ie...
when i m creating any menu,then we are using the up down keys to check the pop up items and we are using the Enter key to select any item,
I want to use char keys instead of this keys like 'P','R'....
I hope i'll get the answer...
thnx in advance
Pankaj
|
|
|
|
|
hi
i have a application to encrypt and decrypt data .
it is perfectly working in system .
but when i connect the windows mobile with the system it is not working . any reason????????
i used Cryto Api algorithm
k.guru moorthy
modified on Friday, February 15, 2008 1:31 AM
|
|
|
|
|
guru moorthy.k wrote: not working
What does "not working" mean
|
|
|
|
|
Hi guys. I am trying to implement multithreading in a network oriented program. I had a problem when the server would crash when more than one client application connected to it. Thats why i decided to multithread. Now with the threads the client application keeps on saying that the server is not started when i try to connect after catching "WSAECONNREFUSED".
Before i put the threads the program was working just fine only the server crashing problem so i belive it is the server app that has a problem. Below is the code for the worker thread:
//My listening connection
void CServerSocketDlg::OnListen()
{
THREADVALS * pTv = new THREADVALS;// this structure is declared in my .h
AfxBeginThread(AcceptConnection,pTv);
}
UINT AcceptConnection(LPVOID pParam)
{
THREADVALS * pTv = new THREADVALS;
pTv->m_sServerSocket.Listen();
pTv->m_sServerSocket.Accept(pTv->m_sClientSocket);
return 0;
}
//The structure in my .h
typedef struct ACCEPT
{
CMySocket m_sServerSocket,m_sClientSocket;
}THREADVALS;
//Other necessary code in my .h
UINT AcceptConnection(LPVOID pParam);
void Listen();
I have no syntax error it is just refusing to work i dont know why. Please help.
Wamuti: Any man can be an island, but islands to need water around them!
Edmund Burke: No one could make a greater mistake than he who did nothing because he could do only a little.
|
|
|
|
|
Wamuti wrote: THREADVALS * pTv = new THREADVALS;//
in this thread arg, CMySocket m_sServerSocket,m_sClientSocket; are new variable, are they intialised correctly, ie; are they set with the connection parameters.
|
|
|
|
|
I am checking them right now but let me ask, the way i have done the threads, is it okay?
Wamuti: Any man can be an island, but islands to need water around them!
Edmund Burke: No one could make a greater mistake than he who did nothing because he could do only a little.
|
|
|
|
|
Your problems have nothing to do with threads.
A single threaded application can handle multiple socket connections.
Yes, there can be advantages to using multiple threads, but your socket
code is already not going to work so adding threads won't help here.
Here's just a few problems with the code you've shown...
1) I don't know what "OnListen()" is
2) There's no benefit in creating a new thread to accept a connection
3) Why does the new thread start a listener socket
4) You can't accept a connection on a listening socket
There's nothing in the code you've shown that indicates that you know how to use
sockets. I would recommend getting that down pat before trying to throw threads at
the problems.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Mark Salsbery wrote: Your problems have nothing to do with threads.
I did not know that.
Mark Salsbery wrote: A single threaded application can handle multiple socket connections.
I'd really appreciate if you could tell me how or recommend a site i can read about that. I woild really appreciate because that's what i need.
Mark Salsbery wrote: Yes, there can be advantages to using multiple threads, but your socket
code is already not going to work so adding threads won't help here.
You've said that a single threaded application can handle multiple socket connections. What then are the advantages of multiple threads in a socket connection?
Mark Salsbery wrote: 1) I don't know what "OnListen()" is
Okay. It's a function that i have put so that i can initialize in OnInitDialog instead of clogging it with lots of code.
Mark Salsbery wrote: There's nothing in the code you've shown that indicates that you know how to use
sockets. I would recommend getting that down pat before trying to throw threads at
the problems.
A bit harsh but truth be told, you've hit the nail on the head.i am a begginner programmer working with a "Learn Visual C++ in 21 days" and trying my level best. Infact, i am making my very first socket program. Could you please recommend a site.
Wamuti: Any man can be an island, but islands to need water around them!
Edmund Burke: No one could make a greater mistake than he who did nothing because he could do only a little.
|
|
|
|
|
To use sockets in a single threaded application, you can use the
WSAAsyncSelect() function. This will cause messages to be sent
to a specified window when the socket events you select occur - particularly
useful for when an incoming connection request is received, when there's
data available to be read on a socket, and when a connection is closed.
The advantage of multiple threads is the same advantage as any multithread
application - the app can take advantage of multiple processors for better performance
with parallel processing.
I didn't mean to be harsh at all - just honest. Take the time to learn at least the very
basics of sockets and things will work much better for you in the long run - I know this from
experience
Some basic things to know inside and out -
1) The essential socket APIs (study these in the Winsock SDK):
socket()
bind()
listen()
accept()
connect()
WSAAsyncSelect() (or WSAEventSelect() to use asynchronous socket ops on a separate thread)
recv()
send()
shutdown()
closesocket()
2) A basic understanding of blocking (synchronous) and non-blocking (asynchronous)
socket modes, and how the mode is changed on a socket.
I wish I had some links but I don't. There's a few great articles here at Code Project
but the search isn't bringing them up at the moment grrr.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
I wish there was a vote more than 5 thank you so very much. I really do appeciate.
Wamuti: Any man can be an island, but islands to need water around them!
Edmund Burke: No one could make a greater mistake than he who did nothing because he could do only a little.
|
|
|
|
|
hi everybody
I wanted to work on COM in vc++
But i donot have any resource of com
So anyone can pls give me some document on com so i can learn it
Thanks in Advance
|
|
|
|
|
i am no expert in com but try :
http://www.cs.umd.edu/~pugh/com/
Wamuti: Any man can be an island, but islands to need water around them!
Edmund Burke: No one could make a greater mistake than he who did nothing because he could do only a little.
|
|
|
|
|
Still i am no expert but as you check out the previous also try going to tech tutorials here:
http://www.techtutorials.info/pcom.html
Wamuti: Any man can be an island, but islands to need water around them!
Edmund Burke: No one could make a greater mistake than he who did nothing because he could do only a little.
|
|
|
|
|
tarak Desai wrote: I wanted to work on COM in vc++
Buy Developer workshop to ATL/COM 3.0 book, it will provide beginner to expert level information on com!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You/codeProject$$>
|
|
|
|
|
Hi,
I have noticed two strange when I used the Following Typdef
Typdef struct
{
char a;
int b;
}
looking in memory Using The Visual Studio to Build and Debug
the int "b" takes four bytes
and also seems both a and b start boundry divisible by 4
as there are three slack bytes between a's value and b
IS there maybe a compiler option /Noalign to prevent this
Thankx
|
|
|
|
|
#pragma pack(1)
struct Test {
int a;
char b;
};
#pragma pack()
Maxwell Chen
|
|
|
|
|
The #pargma pack(1) tell the compiler not to align ????
|
|
|
|