|
One solution is messages. Send a message from the worker thread to the main thread, which updates the controls in the dialog box.
Kuphryn
|
|
|
|
|
I want to output this characters which range between 0x0000 and 0xFFFF, but some of them can not output, I don’t know the reason, and how I can know which character can output?
|
|
|
|
|
All characters can be output. It's up to the particular device (e.g., display, printer, file) as to whether it can be rendered or not.
|
|
|
|
|
.. and also remember that if you are 'outputing' your characters via an edit control, ensure that the font being used can render unicode characters. Not all can display the all the character sets.
"..Even my comments have bugs!"
Inspired by Toni78
|
|
|
|
|
Thought CPians might be interested in the future of some of the boost www.boost.org[^] libraries, which are being considered in a technical report for the next Committee meeting.
http://std.dkuug.dk/jtc1/sc22/wg21/docs/library_technical_report.html[^]
Below is a message with a bit more information.
From: Beman Dawes (bdawes@acm.org)
Subject: Re: Boost and the next C++ Standards
View this article only
Newsgroups: comp.std.c++
Date: 2003-07-03 16:48:01 PST
scott@coyotegulch.com (Scott Robert Ladd) wrote in message news:<pan.2003.06.30.00.48.26.743059@coyotegulch.com>...
> What is the likelihood of the Boost libraries (in whole or in part) being
> integrated into the next C++ Standard?
Ah! The committee needs to do some communicating. So... See
http://std.dkuug.dk/jtc1/sc22/wg21/docs/library_technical_report.html
> I keep getting asked the question, and wondered if any consensus had
> emerged among C++ standardizers.
For this Technical Report, the cutoff date has already passed. So
except for two or three proposals still in the pipeline, the content
of this first Library TR are firming up.
Of the 12 proposals accepted so far, 10 grew out of the Boost
libraries.
(One Boost library, static assert, is also likely to become part of
C++, but as a core language feature rather than part of the library.)
--Beman Dawes
If you can keep you head when all about you
Are losing theirs and blaming it on you;
If you can dream - and not make dreams your master;
If you can think - and not make thoughts you aim;
Yours is the Earth and everything that's in it.
Rudyard Kipling
|
|
|
|
|
Hi
I have another Assertion problem.
You see I have Dialog app. This has other custom dialogs. But in this situation, 2 dialogs. The main dialog is used to call a 2nd dialog when necessary. The app receives information via the net (TCP stream style).
Now info comes in, and the MainDlg class has a thread that listens for the information. Info comes in, it is sent to the 2ndDlg.
Now in the 2nd dlg, I have declared a OnInitDialog function which sets the info from the Main Dlg and places it in the List Control of the 2nd Dlg. But I get the Assertion failure.
And this is the function that causes that:
// CString support (windows specific)
_AFX_INLINE int CString::Compare(LPCTSTR lpsz) const
{ ASSERT(AfxIsValidString(lpsz)); return _tcscmp(m_pchData, lpsz); } // MBCS/Unicode aware
I dont know how this is because I said:
2ndDlg.receivedInfo = MainDlg.Info ;
Then,
2ndDlg.DoModal() //this should initialise the window of Dlg.
Help is appreciated. Thanks.
Live in peace
|
|
|
|
|
Problem solved. Thanks. Followed your advice and further eradicated the check that says
if(CString == NULL) <-this gave me the new Assertion ERROR.
Perfect. McLaren 4-5, will be podium tomorrow, hopefully a 1-2. Watch and see!! I feel it.
Let the network do the work for you.
|
|
|
|
|
Hi!
I've been playing around with custom command routing a bit, and I've noticed that if you route a command message to a custom object, object.OnCmdMsg(...) , and the function returns TRUE(saying it has handled the message and called the message handler), but I return FALSE instead (saying the message hasn't been handled), the command handler for the custom object is never called (even though it already should've been called(?)).
I hope someone can give me an explanation on why the handler isn't being called, and that the description above isn't to messy
|
|
|
|
|
This is the correct behaviour. MFC knows nothing about your custom object, even though you do. MFC checks to see if the current view handles the message. If it doesn't, it sends it to the current document. If the document doesn't handle it, it sends it to the current frame, the main frame (in an MDI application), and finally to the application if necessary. It never looks below the view.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
You can find more information in Paul DiLascia article in Microsoft Systems Journal, 1995 (I don't remember month).
|
|
|
|
|
Hi
I tried to make a dialog resizeable by changing its style using SetWindowLong:
<br />
CWnd* wnd = blablabla<br />
<br />
DWORD style = ::GetWindowLong(wnd->m_hWnd, GWL_STYLE);<br />
style |= (WS_THICKFRAME);<br />
::SetWindowLong(wnd->m_hWnd, GWL_STYLE, style);<br />
wnd->SetWindowPos(NULL, NULL, NULL, NULL, NULL, SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_FRAMECHANGED);<br />
When I move the mouse cursor above the frame of the window I manipulated with this code the cursor changes to a resizing cursor, but I can't resize the window.
Then I found out, that this code only works, when I add a minimize or maximize button in the ressource editor.
So I changed the line in the code to:
style |= (WS_THICKFRAME | WS_MINIMIZEBOX | WS_MAXIMIZEBOX);
But this also doesn't work.
Please give me the solution to this problem
Thx a lot
Dave
|
|
|
|
|
Hi
I'm getting crazzy
I wrote a (very) little test-program for you. It's just a dialog with a button on it. When you click on the button it does nothing but calling
the function.
ModifyStyle( NULL, WS_THICKFRAME | WS_MINIMIZEBOX | WS_MAXIMIZEBOX, SWP_NOSIZE | SWP_NOMOVE );
As I said the window isn't resizeable after that, but the cursor changes to a resizing cursor.
I'm using Win2k, but I don't think that this makes any differences.
Could you please download the program and test it on your computer, wether it works or not. Perhaps this helps me to get the solution.
Link (On index.html: link to Border_Test.zip - 32k including Sourcecode and Executable): http://mitglied.lycos.de/dave2m/
Thanks for your Consideration.
dave
|
|
|
|
|
Hi
As Spy++ said "Internet Explorer_Server" isn't the child of a main window.
There does exist "Shell Embedding" and "Shell DocObject View" as its parents.
My question is: how can i simulate a mouse click to the "Internet Explorer_Server" controll?
I can't use the mouse_event function because the window i want to hit may be minimized or invisible.
I recognized that there are lots of massages send to the main window and its children when I click on the control.
Can you help me?
Thx a lot
Dave
ps. sorry for my bad english
|
|
|
|
|
neotrace wrote:
how can i simulate a mouse click to the "Internet Explorer_Server" controll
Send it WM_LBUTTONDOWN and WM_LBUTTONUP messages.
--Mike--
"I'm working really, really fast at the moment, so a 3 minute outage becomes, due to time dilation, a 5 minute outage."
-- Chris Manuder, relativistic system administrator
Ericahist | Homepage | RightClick-Encrypt | 1ClickPicGrabber
|
|
|
|
|
Hi !
The Problem is this...
I want to login to a remote machine through a program using vc++/c++. I have administrator privilages of remote machine i.e. username and password are known in advance.
Can it be possible to pass the username and password as parameters to any API(if exists)or in any user define method.
Thanks in advance !
bye
Gautam
|
|
|
|
|
logging in can mean a lot of things. What do you intend to accomplish?
Do you want "remote desktop" abilities? If so, the machines have to be XP, 2000Server, or 2003Server (I think)... and then is available by an ActiveX control...
Other types of access are available programaticallly...
But it's not clear what exactly you are looking for....
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
Peter Weyzen<br />
Staff Engineer<br />
<A HREF="http://www.santacruznetworks.com">Santa Cruz Networks</A>
|
|
|
|
|
ok
this is what i want to do.
In my programs I am using some windows apis like(RegConnectRegistry,RegOpenKeyEx,GetFileVersion etc)to connect remote registry
or getting any information from remote machine.
These APIs works only when I login to remote machines using their username and passwords.
This thing i want to do programmatically, any program or api that can use username and passwords of remote machines.
gautam
|
|
|
|
|
oh.
And I take it that you are not operating in any sort of domain environment, where priveleges, access, and passwords are centrally administered. If you were, these API's would work assuming that you had actual access priveleges.
So, you want to arbitrarily be able to connect to a machine, with their known credentials, and make the connections to these remote APIs.
That I don't know the answer to.
Take a look through "Network Management" portion of the platform SDK.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
Peter Weyzen<br />
Staff Engineer<br />
<A HREF="http://www.santacruznetworks.com">Santa Cruz Networks</A>
|
|
|
|
|
Hi,
is it possible to check if an external application has been started, in Windows 98/NT/2K? This application runs in background mode (silent mode), i can see it only in processes tab of Task manager.
I am programming with (ANSI) C.
Thanx in advance,
Aenaos
|
|
|
|
|
One solution is FindWindow().
Kuphryn
|
|
|
|
|
Have you looked at EnumProcesses() and related functions?
|
|
|
|
|
if it's a program that you control, consider adding a mutex with a global name.
The external app creates it, your program checks to see if it's in-use (running from that other program). This way is handier than EnumProcess -- if you ever change the names of programs, you don't have to rename your mutex.
-p
see CreateMutex and WaitForSingleObject API's.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
Peter Weyzen<br />
Staff Engineer<br />
<A HREF="http://www.santacruznetworks.com">Santa Cruz Networks</A>
|
|
|
|
|
I'm trying to align a struct like so:
<br />
__declspec(align(16)) struct myStruct<br />
{<br />
char a;<br />
int b;<br />
short c;<br />
};<br />
and i get align is undefined when trying to compile.
I even copied the sample from MSDN and had no luck.
Anyone knows what's the problem? Is it a compiler switch
not used? Or only used in VC7?
thanks
|
|
|
|
|
sharlila wrote:
Anyone knows what's the problem? Is it a compiler switch
not used? Or only used in VC7?
The align declspec option is not supported in VC6. Try using the #pragma pack() option instead:
#pragma pack(push, 16)
struct myStruct
{
char a;
int b;
short c;
};
#pragma pack(pop) Hope this helps,
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
thanks for replying, I was afraid it was the answer, however,
MS didn't say it's not for VC6.
anyways, I also saw this option (pragma pack) but it doesn't
allow me to go over 32 (align goes to 4k if I'm not mistaking).
so is this the final answer?
|
|
|
|