|
Hi JLR,
Thanks a bunch for your information. I have solved the problem. Thanks!
|
|
|
|
|
I developed a Visual C++ (MFC) with MS Visual Studio .NET 2003, but encountered the following linking errors when compiling for realease build. However, it was compiled successfully in debug configuration. I have tried to manipulate some of the linking properties for the release configuration but still could not get it working. Could someone help me out on this? Thank you very much.
|
|
|
|
|
I have a server_client program and it was use in MS Dos. But how can I use this server_client program in a Dialog that I had designed.
|
|
|
|
|
|
I mean I already designed a dialog to send message through IP address. And I try to do my test on sending message using MS Dos. After that I don't know how to apply into the dialog that I designed.
|
|
|
|
|
You might try using ShellExecute to 'open' the DOS program that you want to use to send the message...
--
jlr
http://jlamas.blogspot.com/[^]
|
|
|
|
|
The program is layed out as follows:
(Program 1 :: EXE) -- This I cannot modify
+Contains a form which creates child windows
+Sends HWNDs of child windows to DLL to attach to.
(Program 2 :: DLL) -- This I am writing
Main Thread:
+Starts Graphics Thread, waits for return
+ Posts Message to Graphics Thread to create it's windows
+ Posts Message to Graphics Thread to subclass it's windows
Graphics Thread:
+ Creates instances of each window (each are OpenGL classes wrapped in a CWnd)
for(unsigned short i = 0; i < NUMWIN; i++)
{
pGraphicsWin[i] = new COpenGLWin ( i );
}
+ Subclass Window to the received HWND.
BOOL worked = pGraphicsWin[i]->SubclassWindow( hwnd );
+Do appropriate other stuff
Ok, my problem is as follows:
While the subclass window appears to work correctly (though I doubt it really is), when I try to access the device context ( i.e. this.GetDC() ) of one of the graphics windows, it fails.
I believe this is due to the fact that subclassing is process specific, and therefore you cannot subclass a window which is not running in the same process as your application.
Therefore, I have read up on CBT hooks, however, I can't seem to figure out where to set the hook. Also, I read that only one hook is necessary per thread, not per window, but I am confused as to how that would work!
Appreciate your help, I'm stumped!
|
|
|
|
|
hello
i work in network when we use the X25 protocole to comunicate and i want to make an application to download files from others PCs of the network,and i have no idea how to do that,are there someone who can help me ?
|
|
|
|
|
Surely you must have some kind of API to work with, and which comes with a manual. If you can, you can always use the connection oriented part of X.25, and then it's not much different from TCP/IP. I think. It's been a while since I did X.25. I read about it in the datacom courses at the university, and I briefly came in touch with it for a telecom application I wrote 6, almost 7 years ago.
Good music: In my rosary[^]
|
|
|
|
|
how do u create a dc over ur whole dialog window and allow a user to draw lines on it?
help would be appreciated
thx
|
|
|
|
|
Override the CDialog::OnPaint()
Unless you really mean the WHOLE window in which case use GetWindowDC()
It's frustrating being a genius and living the life of a moron!!!
|
|
|
|
|
ok, thx. now how do u allow the user to draw on it?
|
|
|
|
|
You could create a custom control that handled the drawing and then insert the control in the dialog.
To enable drawing you need to handle mouse messages (button down, mouse move, button up, etc.) and draw in the window accordingly.
You can look at Microsoft's scribble sample program to get ideas on how to do it. There are Win32 and .NET versions for this sample, and although they are intended as MFC tutorials, you can still use it to extract useful ideas.
--
jlr
http://jlamas.blogspot.com/[^]
|
|
|
|
|
i dont understand why i cant get the text from an editbox of a window
its a window that was created durring runtime
i tryed GetWindowText on a handle to the edit box but it outputs a bank char array
is it somehow different for getting text from editboxes that are created during runtime?
im pretty sure that the dialog window is created during runtime but i may be mistaken because its not my program that creates it
help would be very appreciated
thx
|
|
|
|
|
Sample code please
Here is a piece of my code :
<br />
CEdit searchedit;<br />
CString srchstrl;<br />
searchedit.GetWindowText(srchstrl);
Remember the text is not returned, it is placed in the CString refrence.
Elaine
The tigress is here
|
|
|
|
|
Have you tried sending the control an EM_GETTEXTEX message?
Here's the link to the the msdn library entry on EM_GETTEXTEX[^]
"There is an empty room full of people who think you are creative"
|
|
|
|
|
GetWindowText should work. Post some code to see how you are doing it, and someone may be able to spot the problem.
--
jlr
http://jlamas.blogspot.com/[^]
|
|
|
|
|
no. ive only tried WM_GETTEXT. ill go see if it works.
thanks for the help
|
|
|
|
|
i know im doing it right because it works for titlebars and stuff
read the post i made about the classes they are and maybe that will help u help me
|
|
|
|
|
can u fix this code for me? i dont understand how to use GETTEXTEX
<br />
GETTEXTEX gte;<br />
ZeroMemory(>e,sizeof(gte));<br />
gte.cb = 512;<br />
gte.codepage = CP_ACP;<br />
<br />
SendMessage(hwnd,EM_GETTEXTEX,(WPARAM)>e,(LPARAM)temp);<br />
|
|
|
|
|
Using GetWindowText may not work for windows created in another process, but sending WM_GETTEXT directly should work anyway.
--
jlr
http://jlamas.blogspot.com/[^]
|
|
|
|
|
From MSDN's documentation for the GETTEXTEX Structure[^]:
"The GETTEXTEX structure contains information about an operation to get text from a rich edit control"
Are you trying this with a rich edit control? Otherwise, I don't think it will work.
Try this instead:
const int nBufLen = 512;
TCHAR buffer[nBufLen];
SendMessage(0, WM_GETTEXT, nBufLen, (LPARAM) buffer);
--
jlr
http://jlamas.blogspot.com/[^]
|
|
|
|
|
no, i already tried that.
the classes of the edit controls im trying to read are UsTextEditPane and Ate32Class
if that helps at all
|
|
|
|
|
Tim Zorn wrote:
no, i already tried that.
And...? What was the result? Post some code to see how you are doing it and what specific error you get.
--
jlr
http://jlamas.blogspot.com/[^]
|
|
|
|
|
when we open a child window in a MDI application, and maximize it, its caption-bar diappears and its close, maximize and minimize buttons appears in the menu-bar.
when user maximizes an MDI child window and then clicks its close button, what message is sent to my program? i can't trap it.
|
|
|
|