|
I have a dialog resource in my project with on that dialog a static bitmap. Under Windows 98 it shows the bitmap just fine but under Windows 2000 it doesn't show anything...
Does anyone know why this could be?
Thanks
Kuniva
--------------------------------------------
|
|
|
|
|
Before three hours while iam doing the final integration in my VC++ 6 project, the resource file in my app is only 111MB, but now its 165 MB. Complier throws error like REsource file too large.
Need Advice or Help to be needed. Its Urgent. If you know mail me at shivaa_27@yahoo.com.
Thanks
Shivaa.
India.
|
|
|
|
|
Split it up in two files...
|
|
|
|
|
Hello redeemer,
Thanks. But the exe size also increasing. I dont know the hell it is. How to split the rc file in to two.
Shivaa..
|
|
|
|
|
Just put some of the resource in a second file and add that file your project.
|
|
|
|
|
Excuse me? You call a resource file of one hundred and eleven bloody megabyte "only 111MB"?!
Whatever you have been drinking, or whatever mushrooms you have been chewing, I want nothing to do with them. Where are you from? The "Planet Redmond Office"?
|
|
|
|
|
hi there..
im trying for a database application .. well every thing is going fine till i come up to the add record thing .. it works if i had some entries already present in my access database ..
but if the database is empty it gives me an error message
"operation failed no current recoord"
hope u guys could hlp me out
looking forward from all the gurus of code
|
|
|
|
|
are you doing any operations like movefirst befire adding the database item. check the empty status before entering
Samir Sood
|
|
|
|
|
Why are the simplest things always hidden so well?
|
|
|
|
|
It's not hidden. It doesn't exist. (at least officially)
Try out http://www.codeproject.com/tools/vsrename.asp
|
|
|
|
|
Copy the .dsp and .dsw to another place. Rename them. Open them in a text editor (such as MSVC itself - but open them as text!). Replace appropriate sections.
Some might say "Why in the name of ... is this so complicated". It's not, it's the way of Microsoft: Whenever you can make something undocumented: Make it so!
|
|
|
|
|
Hi
I try to launch the screensaver with password protection. I tried this code:
SendMessage(GetDesktopWindow(),WM_SYSCOMMAND,SC_SCREENSAVE,0);
but this starts the screensaver without password protection.
Therefore I wrote my own function to call a screensaver and protect the workstation:
#include "stdafx.h"
#include <stdio.h>
#include <shellapi.h>
int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow )
{
char WinDir[256], ScrDir[256], RunDir[256];
GetWindowsDirectory(WinDir,sizeof(WinDir));
sprintf(ScrDir,"%s\\System32\\sstext3d.scr",WinDir);
sprintf(RunDir,"%s\\System32\\rundll32.exe",WinDir);
SHELLEXECUTEINFO sei = { 0 };
sei.cbSize = sizeof( sei );
sei.lpVerb = "open";
sei.lpFile = ScrDir;
sei.nShow = SW_SHOWNORMAL;
sei.fMask = SEE_MASK_NOCLOSEPROCESS;
if( ShellExecuteEx( &sei ) )
{
WaitForSingleObject( sei.hProcess, INFINITE );
ShellExecute(GetDesktopWindow(),"open",RunDir,"user32.dll,LockWorkStation","",SW_SHOWNORMAL);
}
return 0;
}
It first launches the screensaver via ShellExecuteEx and then waits until it's finished. (WaitForSingleObject). Right after that, the workstation is being locked using a Rundll code.
But how safe is this code? Will the user still be able to bypass the lock or is my code safe enough?
reagrds
Greg
modified 12-Sep-18 21:01pm.
|
|
|
|
|
*Puts paranoia level security hat on*
What guarantee do you have that between
<br />
WaitForSingleObject( sei.hProcess, INFINITE );<br />
and
<br />
ShellExecute(GetDesktopWindow(),"open",RunDir,"user32.dll,LockWorkStation","",SW_SHOWNORMAL);<br />
Nothing else gets a chance to run?
|
|
|
|
|
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.
|
|
|
|