|
Maybe the compiler thinks that no exeption will be thrown from your code and therefore removes the seemingly redundant code. What happens if you turn all optimizations off?
Behind every great black man...
... is the police. - Conspiracy brother
Blog[^]
|
|
|
|
|
Bob Stanneveld wrote:
Maybe the compiler thinks that no exeption will be thrown from your code and therefore removes the seemingly redundant code. What happens if you turn all optimizations off?
A Debug Build works as expected so I have to assume that turning optimizations off will resolve the problem. I would have thought that the optimizer shouldn't touch try-catch code, but then if it is working at the assembler level it probably doesn't know. That said this just seems like a real trap waiting to open.
Neville Franks, Author of ED for Windows www.getsoft.com and Surfulater www.surfulater.com "Save what you Surf"
|
|
|
|
|
That is/was a known problem in VC6.
http://support.microsoft.com/default.aspx?scid=kb;en-us;247203
Tim Smith
I'm going to patent thought. I have yet to see any prior art.
|
|
|
|
|
Tim Smith wrote:
That is/was a known problem in VC6.
http://support.microsoft.com/default.aspx?scid=kb;en-us;247203
Thanks Tim, You've nailed it. I would like to assume this can only happen when the try block only contains fairly trivial code. My worry is testing every try-catch block in a Release build. I certainly don't want to turn off optimizations for all of these functions.
Neville Franks, Author of ED for Windows www.getsoft.com and Surfulater www.surfulater.com "Save what you Surf"
|
|
|
|
|
Is there any available components like addons for Visual Studio, which facilitate interface programming tasks. As it is easy under Builder C++ just attach context menu component to form and automaticaly coding its items by a single mouse click and the other similar components. While in VC++ getting CDocument/CView interface and manualy adding context menu instance to class and boring initialization it and the like.
9ine
|
|
|
|
|
hi ,
i'm presently in a project where i want to use windows password for my users authentication. I don't know how.
Could any one please provide me the resources.
Thanx,
Seenivasan Palaniappan
Long Live
|
|
|
|
|
What do you mean by 'use windows password' ? If you want just something that let the user enter a password in an edit box (and hiding the characters), you have an option with the editbox that let you do that (check the password option).
|
|
|
|
|
I think that he want's to use the users and groups from a windows domain controller for automatic authentication.
Behind every great black man...
... is the police. - Conspiracy brother
Blog[^]
|
|
|
|
|
Well maybe you can accept user login details and do an impersonate login, if it succeeds then consider that it is a valid user.
<bold>- Nilesh
<italics>"Reading made Don Quixote a gentleman. Believing what he read made him mad" -George Bernard Shaw
|
|
|
|
|
Hi ,
I didn't get your question. But i assume that you want to check if the user is really a windows user and has entered his username and password correctly. If that is the case, then you can use concepts from http://win32.mvps.org
Also, refer to the "Authorization Functions" under the Win32 SDK help.
CreateProcessAsUser and CreateProcessWithLogon can be used.
Happy coding.
Regards,
Suresh Ponnusami
|
|
|
|
|
hi all..I am making a dialog based application and I want to make the windows size is in maximize size by default and I also want the windows can redraw itself when I resize the windows and play with the scroll, but I don't know hoe to...pls help
|
|
|
|
|
Write this in OnInitDialog to show it as maximized.
this->ShowWindow(SW_MAXIMIZE);
To handle redrawing functionality you will have to write your code in OnPaint.
Einstein: "Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe."
My Articles
|
|
|
|
|
thx...btw where I can get some examples of redrawing functionality, because I am a newbie...
thx..
|
|
|
|
|
Hi all
I want to know some system information like Sound Card, Video card, Network Card and Peripherals like Printers,infrared, Scanners etc.
Thanks and Regards
|
|
|
|
|
Maybe this API's EnumDevices / EnumPrinters might help.
<bold>- Nilesh
<italics>"Reading made Don Quixote a gentleman. Believing what he read made him mad" -George Bernard Shaw
|
|
|
|
|
You can retrieve such information from REGEDIT , using CRegKey class.
I do not exactly remember where they are stored but if you search in google it will definitely help you.
"Success is the ability of going from one failure to another with no loss of enthusiasm" - W.Churchill
|
|
|
|
|
|
Reference the following code in C++ using Registry API methods
HKEY hKey;
DWORD n, RtnCode, RtnCode1;
char valName[256];
DWORD valNameBuf = 256;
char valData[256];
DWORD valDataBuf = 256;
bool bMatch=false;
for(n = 0, RtnCode = ERROR_SUCCESS; n
|
|
|
|
|
memset is what you need. As in memset(&valData[0], 0, 256);. You should also fix the rest of your code, unless you're actually programming in C. Putting all the variables at the top makes your code harder to read, and creating any variables without giving them default values is a recipe for bugs due to uninitialised values.
Also, your code is not displaying properly because you didn't check 'Do not treat <'s as HTML tags'.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hi, all:
I am using VS6 SP5 on Win2000 Pro SP4. I have a relative big project (~ 370 *.h and *.cpp files, plus resource files). I try to import about 50 bitmaps ( 32X32 256 color ) into resource view. I can import about 30 or so, then the imported image become empty bitmap in the Resource Editor. If I delete some of the bitmaps, then I can import those I failed to import before. Sometimes after importing 20+, if I click on Save All, or Build button, Visual Studio crashs.
When I try to edit the source files (*.h or *.cpp), I find that frequently the studio editor seems hang up for a few seconds. The cursor or mouse react very slowly, a few seconds dely. I guess it is related.
I do have pretty powerful machine ( more then 1GB RAM ).
Is this MS Visual Studio bug? I am stuck and if you can shed any lights on this, I really appreciate. Thanks in advance.
Dion
|
|
|
|
|
I am currently working on a project with 70+ bitmaps...most are 15k bitmaps with ard 5 of 1000-2000kb bitmaps. My program is still working find...abit slow in certain situations....i think its because mfc isnt suppose to be a good graphic processor. If you need one, thats where direct x comes in.
just my 2 cents.
Aaron
|
|
|
|
|
Anonymous wrote:
....i think its because mfc isnt suppose to be a good graphic processor. If you need one, thats where direct x comes in.
That's not true. Photoshop does not use DX, neither should you if you just have a handful of tiny bitmaps floating around. If it's slow, you need to look at your code to figure out why.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Do you have all those windows open at the same time?
How much RAM is on your video card?
Possibly you are running out of video RAM for some reason.
If your video card is using 'shared' memory, then maybe you can increase the amount of RAM that the video driver will use?
|
|
|
|
|
|
Anyone come across this problem where some of the afx_msg get execute twice?
afx_msg like onButton1 get call twice...and AfxMessageBox("here"); also get execute twice....anyone know wats the problem?
Aaron
"To start a war takes the word "fight", To end it takes a whole lot more explanation"-- someone
|
|
|
|