|
YEah you are right Mr David (as usual),but still there are some way out to stop assert window, let find it!!!!!
-----------------------------
"I Think It will Work"
Formerly Known As "Alok The Programmer" at CP
-----------------------------
Alok Gupta
visit me at http://www.thisisalok.tk
|
|
|
|
|
I followed the rest of the thread, and I think you're missing the point about the message. The message is there to tell you about a serious error in your application. You need to diagnose the problem and either prevent it from happening, correct it and continue, or notify the user and exit gracefully.
Automatically detecting the message box and closing it is not the way to deal with the problem.
Software Zen: delete this;
|
|
|
|
|
hi,
anybody know how to add OWC chart And Pivot Table (OWC10) to Cpropertysheet.Examples And Links will be Appreciated.
by
baijumax
|
|
|
|
|
Hello i´m stuck with a problem
I have a simple struct
struct Square
{
int Inboard;
};
struct Square Sq[8][8];
and then i use a inbedded for loop to set the value to Inboard
for(i=0;i<8;i++)
{
for(j=0;j<8;j++)
{
Sq[i][j].Inboard=1;
}
}
It works, but in the same time as it puts a value in Sq[i][j].Inboard it also put in a value in Sq[i+1][j-8].Inboard
why is that??
znize
|
|
|
|
|
Let us say that i is 2 and j is 3. That means that [i][j] is accessing the (2*8)+3 or 19th element in the array. (Remember that multi-dim arrays are really just one long array). Now if you access [i+1][j-8] that means you are accessing ((2+1)*8+3-8 which is (3*8)-5 which is 24-5 or the 19th element again.
It isn't storing two values, you are looking at the same value.
Tim Smith
I'm going to patent thought. I have yet to see any prior art.
|
|
|
|
|
Thanx for your replay....
then i have to solve my problem different!
Thanks a lot!
Johan
|
|
|
|
|
znize wrote:
then i have to solve my problem different!
If you are simply initializing the whole structure to 1, memset() would be a far better solution.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
How can you use memset to initialize integers to a value where all four bytes are not the same value?
Tim Smith
I'm going to patent thought. I have yet to see any prior art.
|
|
|
|
|
Tim Smith wrote:
...all four bytes...
Oops, my bad. I overlooked that "minor" requirement.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Eeeeek! memset is not the way to initialize anything to a value, other than clearing buffer contents to zero.
Software Zen: delete this;
|
|
|
|
|
Hi all
For opening a Database I used CoInitialize in my Service. This creates a hidden window "OleMainThreadWndClass".
Now the problem is whenever I try to logoff or restart windows is not able to proceed because of running OleMainThreadWndClass window.
This issue is only present in NT. If I run the service disabling "interact with desktop" there is no problem.
How can overcome this.? What could be the problem ?
Thanks in advance
Regards
Shiraz
btw: I cannot close the database while logoffs becaouse it is a service and it should keep running.
The Best Relligion is Science.
Once you understand it, you will know God.
|
|
|
|
|
Hi I'm using GDI+ for a C++ application which is a great library. But this library sooo powerfull is not able to do a simple thing I need to do
I have a picture 1 x 10 px that I want to stretch to a very flat 100 x 10 px. As result I have a wonderful alpha gradient which is not what I want. Of course I tried to change the interpolation mode to InterpolationModeNearestNeighbor which give me a better result but still not perfect since and - I don't why - the area painted is not completly filled.
There is the very simple code :
// Load in some initialisation function
// a 1 x 100 picture sized
m_pBitmap1 = Bitmap::FromFile( csFilename.AllocSysString() );
// Then in onpaint method
CPaintDC dc(this);
Graphics graphics(dc.m_hDC);
graphics.SetInterpolationMode( InterpolationModeNearestNeighbor );
graphics.DrawImage(m_pBitmap1, 0, 0, 100, m_pBitmap1->GetHeight());
Can somebody provide me some explainations or even better... a solution ?
Thanks
|
|
|
|
|
Maybe I am missing something, but why not just use the GDI function StretchBlt . It does not do any of the funky gradient stuff you don't want. Use Graphics::GetHDC to get the HDC handle, and then call Graphics::ReleaseHDC when you are done. It is a very simple way to mix GDI and GDI+ in the same drawing routine.
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" mYkel - 21 Jun '04
Within you lies the power for good - Use it!
|
|
|
|
|
Actually, if the stretch blt mode is HALFTONE (anti-aliasing), the image will indeed be alpha blended. Very annoying when you don't want it turning your image into a gradient, but do want a bit of smoothing on the edges. Take a look at SetStretchBltMode if you're curious.
Chris Richardson
|
|
|
|
|
I haven't tought to mix GDI and GDI+, that's definitely a good idea..
Thank you for the explanations about the anti-aliasing processing.
thanks, thanks, thanks
|
|
|
|
|
Hi,
is there a way to get a pointer to controls on a dialog, when
I don´t know the IDC_... of those controls.
I only have a pointer to the window on wich the controls are such as:
HWND *hWnd;
hWnd = GetForegroundWindwow() ...
Can someone show me a solution ?
Thanks, John
|
|
|
|
|
EnumChildWindows - The EnumChildWindows function enumerates the child windows that belong to the specified parent window by passing the handle to each child window, in turn, to an application-defined callback function. EnumChildWindows continues until the last child window is enumerated or the callback function returns FALSE.
|
|
|
|
|
In my main program, I am trying to create a Dialog, where along with the CFileDialog, I should also be able to have my active X. The trouble, I have is that the dialog doesn't show up ance I add the activeX. Without the Active X, It works O.K. Any suggestions would be appreciated.
I am following the example from David J. Kruglinski's Programming Microsoft Visual C++
Thanks in advance
|
|
|
|
|
Hi All,
I just want to disable the ability to switch to other Windows programs, when my programing is running(just like as the login prompt). I thought of using "SetSysModalWindow" but it now it comes under the Obsolete command set. Is there any other method by which we can achieve the same.
Thanx in advance
Sujan
|
|
|
|
|
Two parts required:
1. Install low level keyboard hook and intercept keystrokes that allow you to switch between program, like ALT+TAB for example.
2. Modify the system policy so that the task manager is not invoked.
|
|
|
|
|
Part three: Wait for your users to complain like hell, and rightly so.
Neville Franks, Author of ED for Windows www.getsoft.com and coming soon: Surfulater www.surfulater.com
|
|
|
|
|
In the case of our application, we do it for security reasons.
Don't want the operator to switch to Solitaire when he should be monitoring the nuclear power plant status...
|
|
|
|
|
Blake Miller wrote:
In the case of our application, we do it for security reasons.
Don't want the operator to switch to Solitaire when he should be monitoring the nuclear power plant status...
That's fine, but I have to wonder whether the original posters app truly has these constraints. There seems to be more and more posts about folks wanting to add global hooks and muck with other applications and that worries me.
Neville Franks, Author of ED for Windows www.getsoft.com and coming soon: Surfulater www.surfulater.com
|
|
|
|
|
Hi Neville,
Our need was also something like blake's. we just want to user to use only our application when our program is running.
Thanx
Sujan
|
|
|
|
|
Blake Miller wrote:
Don't want the operator to switch to Solitaire when he should be monitoring the nuclear power plant status...
Use Windows in a critical application? Shudder.
|
|
|
|