|
But how safe is this code?
Not especially safe.
Right after that, the workstation is being locked using a Rundll code.
And that "code" would be... 42? 4711?
Will the user still be able to bypass the lock or is my code safe enough?
In order: "Yes" and "No way".
Isn't there a semi-documented RunDll32.dll entry point to start the screensaver?
|
|
|
|
|
i have a list box and a text field....
if the user select an element in the list box, the CString of the selected element should go to the text field...
i think it can be made by the " SendDlgItemMessage(IDC_SAVENAME,...."
but i don't know the uint message for doing this.
can someone help???
i use vs 6.0....
thanx a lot and have a nice weekend!
tom.
|
|
|
|
|
Are the list box and the edit box in the same window?
|
|
|
|
|
Hi all, I have a couple of quick questions that I really need an answer to.
1.) I have the following code:
try
{
//reads in info from file
}
catch(ifstream::failure)
{
//deals with error
}
How do I MANUALLY throw an exception so it is caught by this code (I don't want to wait for the failbit to be set).
2.) Why does my DirecDraw primary surface back buffer throw up multi-coloured junk when I flip to it using a high resolution and 32 bit display? If I write to this "junk" on the surface, exit the app, delete the code that writes to the surface and then restart the app, the junk is displayed as it was before, even though I haven't written to it (seems like it is accessing same area of memory for back buffer???). The initial surface is fine (plain black) and can be written to and flipped to fine, but the back buffer can't. I don't get any problems using 16 bit display at any res. The code I used is straight out of the DirectDraw SDK docs. I'm just wondering if anyone had the same problem and how they resolved it?
Obviously I'd appreciate a full answer to the questions, but any ideas or links to web pages that may answer them would be just as brilliant.
Alan.
"When I left you I was but the learner, now I am the master" - Darth Vader
|
|
|
|
|
|
hehe, but what parameter do I pass to throw? throw (ifstream::failure) doesn't work, throw (ifstream::failbit) neither and, obviously, neither does throw - where an unhandled exception occurs. Any other bright ideas clever cloggs ?
Alan.
"When I left you I was but the learner, now I am the master" - Darth Vader
|
|
|
|
|
throw (ifstream::failure) doesn't work
That's expected. First you used a syntax that isn't anywhere close C++, then you tried to throw an exception of a class that needs an argument. You might try
throw ifstream::failure("foo");
But I'd say you've got a design error if you want to throw an exception on behalf of someone else like this. Your code is then basically lying (even if it's you that catches that same execption).
Step back a second and think: Would you want to maintain that code in two, five or ten years from now?
If you're interested in failures, not just the ones that throw "ios_base<...>::failure", why not catch "exception" (as "const std::exception&" of course).
Why does my DirecDraw primary surface back buffer throw up multi-coloured junk when I flip to it using a high resolution and 32 bit display?
Because you haven't painted into the back-buffer! Check the return values of every call to DirectDraw.
|
|
|
|
|
I'd need some more info or advice. Here's the problem: I need to take a
file, the file may be any file, opened with something like a Browse button, and
to encrypt it, then send it to a specific address, the addres on the net is
also given by me, and there, if the file arrives safe at the address I wanted,
it will be decrypted and can be read by the receiver. I have some code, but I
have to use the sockets programming stuff, and to know the specific port also,
so that , if I would like, the program may run on the same machine as well,
just sending and receiving at the same port.
And all this prg I have to make in Visual C++, what I have is VC++ 6.
thanks,
steve
|
|
|
|
|
I don't understand your problem but sending and receiving on one local computer normally works with an 127.x.x.x IP address (127.0.0.1).
|
|
|
|
|
not sure what your exact difficulty is but it seems like you need help with the internet transmission end of the app----try finding on MSDN site the section entitled "Internet Programming With WinINet", it's a good place to start....if you are using MFC you can get alot of free functionality with the MFC wrappers for the wininet stuff....
good luck
1. The Lord loves a workin' man.
2. See a doctor and get rid of it.
3. Don't trust whitey.
|
|
|
|
|
int CFlowChartView::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CScrollView::OnCreate(lpCreateStruct) == -1)
return -1;
SetScrollSizes(MM_TEXT, CSize(1000, 1000));
ScrollToPosition(CPoint(500, 500));
return 0;
} This is my OnCreate handler in a CScrollView. First I set the scroll size, and I want the scrolls to start off in the middle. But for some reason nothing happens when I call ScrollToPosition. Does anyone know why this happens, and a possible solution...
Thanks for your time!
With time we live, with money we spend!
Joel Holdsworth
|
|
|
|
|
you need to put the scrollto code in OnInitialUpdate to see some results, you will need to then add code to the OnUpdate as well to scroll....also this code will not position the scrollbars in the middle of the scroll track---this code scroll the logical document point (500,500) to the upper lefthand corner of the client window-----the thumbtrack pos will be dependent on the window size( window state == normalized, maximized, etc and that relation to the scroll pos) , sorry, it's not as simple as falling out of your chair!!!
1. The Lord loves a workin' man.
2. See a doctor and get rid of it.
3. Don't trust whitey.
|
|
|
|
|
Can anyone tell me where the Address Book is stored? Is it stored as a file? Or in the registry? Is it stored just on a per user basis? Or is it stored on a per user per OE-identity basis?
Nish
Author of the romantic comedy
Summer Love and Some more Cricket [New Win]
|
|
|
|
|
|
Search for *.wab files. For NT it should be stored in -
C:\Documents and Settings\USER_NAME\Application Data\Microsoft\Address Book as a .wab file.
HTH,
- Manish
|
|
|
|
|
|
For some reason I cant add member variables to items in dialogs, either via the context menu or CTRL and double clicking. If I add say a radio button to the About Dialog it works there, but CTRL + double clicking on a control in a user defined form just brings up the add class dialog.
Any help appreciated
|
|
|
|
|
I want to convert modal dialog to modeless dialog box.Can I? the dialog box is already created and I want this conversion at run time.
VIKS
|
|
|
|
|
|
hi,
Here the issue is not like this I don't have code for dialog box and I am converting it to modal or modeless dialog box.I am in different process. I have dialog window handle of some other application of different process. and I want this conversion.
VIKS
|
|
|
|
|
vikrams wrote:
I have dialog window handle of some other application of different process. and I want this conversion.
Not possible! The modality of a window is not a window style. It's simulated via code. For example, the CDialog::DoModal will disable the parent window till the dialog is dismissed! That's how it gives us a modal feel!
Nish
Author of the romantic comedy
Summer Love and Some more Cricket [New Win]
|
|
|
|
|
thanx nish,
I got the idea. Actually I want some trigger event in order to trap the modal dialog box creation. SO whenever the modal dialog box created the parent window style is changed to WS_DISABLED
|
|
|
|
|
Hello!
I'm writing an activex control and I wondered how I could return a pointer to a class object back to a JavaScript Variable. I know that sounds really weird but I'll give you an example:
Here's the java script:
--------------------------------------------------------------------------------
1: var testbox;
2: var variable = document.testcontrol; // this points to the active control <object idclass="blahblahblah" id="testcontrol">
4: testbox = variable.CreateMsgBox();
5: testbox.SetText("Hello Universe"); // im sick of "Hello World" lol <img src="images/smilies/smile.gif" border="0" alt="">
--------------------------------------------------------------------------------
Let me explain the above code. When the variable named "variable" calls the IDispatch method CreateMsgBox(), on line 4, I want it to return a pointer from the newly created class back to the variable "testbox". Then on line 5 I can access the class methods through the "testbox".
Heres the pusedo code of the c++ code when one calls the CreateBox() function above.
--------------------------------------------------------------------------------
CCreateBox CreateBox()
{
1: CCreateBox newBox; // CCreateBox is the MsgBox class
2: return newBox;
}
--------------------------------------------------------------------------------
I hope anyone can understand this, and if anyone can help I’d greatly appreciate it!!!!!!!!!!!!!
Thank You,
Caleb
|
|
|
|
|
Not a chance in hell. Your COM component runs in a different process, and could even run on a different machine. How is the system going to marshall a class pointer for you ? Both client and server need to know about the class, in fact, you're basically talking about another COM component.
Christian
I am completely intolerant of stupidity. Stupidity is, of course, anything that doesn't conform to my way of thinking. - Jamie Hale - 29/05/2002
Half the reason people switch away from VB is to find out what actually goes on.. and then like me they find out that they weren't quite as good as they thought - they've been nannied. - Alex, 13 June 2002
|
|
|
|
|
Dim Rs1 As New ADODB.Recordset
Rs1 is a pointer to the Recordset interface of the ADODB object. I believe this is what you are asking for.
If the control is already embedded in the document using an
|
|
|
|