|
Hi:
I try to immigrate netants-like floating basket to WinCE, The original one works properly on Destop Window, but on WinCE, the basket window maxmize, occupying full screen. Is there WinCE expert can help me? Thanks for you helping in advance!
Best Regards
Tony Wu
|
|
|
|
|
I've got a class to create a window in Win32, and one to create a bitmap button. When I resize the window, I've tried calling MoveWindow or SetWindowPos, both cause the buttons to flicker terribly. I know the problem is here because I killed all drawing in the window, so the background is never drawn at all. Can anyone suggest if there is anything I can do to make my buttons move nicely without flicker ?
Christian
As I learn the innermost secrets of the around me, they reward me in many ways to keep quiet.
Men with pierced ears are better prepared for marriage. They've experienced pain and bought Jewellery.
|
|
|
|
|
Hi,
U need to use LockWindowUpdate(which temporarily stops
the WM_PAINT mesgs) and after ur
moving is completed, call UnlockWindowUpdate
to again continue drawing.
Hope it helps....
|
|
|
|
|
It sounds like your WM_ERASEBKGND handler repaints the entire background. If that's the case, it's painting over the buttons, which in turn have to be repainted, and thus you get flicker.
First thing I'd try is, in your WM_ERASEBKGND handler, only repaint the necessary portion (by calling GetUpdateRect()) so you won't always paint over all your buttons.
--Mike--
http://home.inreach.com/mdunn/
"....." -- Silent Bob
your with and
|
|
|
|
|
Would this be the case even if I set the PaintStruct's erase member to FALSE ? I did that and also stopped my own code from drawing a rectangle over the area, so that the Window background was whatever was under it on creation ( because it was never drawn ), but it still flickers on resize. The above suggestion did not help either, although I was glad to learn the function existed, it did not solve the problem.
Christian
As I learn the innermost secrets of the around me, they reward me in many ways to keep quiet.
Men with pierced ears are better prepared for marriage. They've experienced pain and bought Jewellery.
|
|
|
|
|
*scratches head* hmmm, so when you do nothing in WM_ERASEBKGND the flicker goes away?
--Mike--
http://home.inreach.com/mdunn/
"....." -- Silent Bob
your with and
|
|
|
|
|
No, the flicker always remains. The buttons are owner drawn bitmap buttons and it's obvious when I have a lot that they are all being drawn grey and then the owner drawing code draws the bitmaps over them afterward, so the ones at the end of the list are noticably blank before each draw during the sizing process.
Christian
As I learn the innermost secrets of the around me, they reward me in many ways to keep quiet.
Men with pierced ears are better prepared for marriage. They've experienced pain and bought Jewellery.
|
|
|
|
|
OK, so your WM_ERASEBKGND handler is out of the picture. Something is invalidating your buttons, maybe it's a WM_WINDOWPOSCHANGED, WM_SIZE, or similar handler in your button class?
--Mike--
http://home.inreach.com/mdunn/
"....." -- Silent Bob
your with and
|
|
|
|
|
How would I use the overloaded insertion operator to input a string of a user defined class?
|
|
|
|
|
istream& operator>>(istream& in)
{
//Write ur code
in>>string ;
// Some code
...
return in;
}
//Assuming that the fn is a member of the class.
if not then the following
if the class's name is 'A'
class A
{
..
friend istream& operator(istream& in, A &a) ;
..
};
istream& operator(istream& in, A &a)
{
...
}
Hope this helps
|
|
|
|
|
I have a function which accepts a variable number of integer arguments like so:
void MyFunc(int nVal, ...);
I want to grab the first one, and pass the rest to a similarly defined function. How do I do that?
To hell with those thin-skinned pillow-biters. - Me, 10/03/2001
|
|
|
|
|
My understanding is if you use va_arg, va_start & va_end, one parameter is stripped from the list at a time as you parse them. If this is so, then you could strip the first one ( as you will obviously need to ) and then pass the resultant list along.
Of course, I could just be full of it....
Christian
As I learn the innermost secrets of the around me, they reward me in many ways to keep quiet.
Men with pierced ears are better prepared for marriage. They've experienced pain and bought Jewellery.
|
|
|
|
|
I tried that. No workee.
If I had the code I was playing with at work, I culd provide an example of what I've already tried.
Essentially, I passed 1,2,3,4,5 as parameters to the 1st function, used va_start to get the first parameter, and passed the list to the next function, and so on.
Func1 got 1 as the 1st param
Func2 got 2 as the first param
Func3 got 96 as the first param
Func4 got -20
By then I stopped because I knew something was seriously hosed up.
If I can't do this, I have to resort to passing a string or array of values.
To hell with those thin-skinned pillow-biters. - Me, 10/03/2001
|
|
|
|
|
Hi,
Why does the following code generate a compile error of C2065 in VC 6++
CStdioFile myFile; <-Why do I have to do this to avoid the compile error C2065 (Undeclared identifier)
TRY
{
CStdioFile myFile((LPCTSTR)m_FilePath, CFile::modeRead | CFile:: typeText);
}
CATCH (CFileException, err)
{
MessageBox("Can't open file",...);
}
END_CATCH
Maui.File.SeekToBegin(); <-Asserts here due to Null reference
To get the asserts I had to put a variable declaration of CStdioFile myFile at the top of the function. This is because of the error I get with "Undelcared identifier". I don't get it isn't it already being declared in the TRY...CATCH block? And why is it when I make a forward declaration it still asserts at the following two lines after END_CATCH?
Really confused Please help.
Sam C
----
Systems Manager
Hospitality Marketing Associates
|
|
|
|
|
If you want to access myFile, it must be declared outside try/catch. And you should just use myFile in try/catch - currently you're creating another variable with identical name - and assert fires, because myFile visible outside of try/catch block is different than myFile you're playing with inside.
BTW: why don't you use plain try/catch instead of MFC macros?
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
At first I did have try catch set up the old fashioned way.
try
{
CStdioFile myFile(...)
}
catch(CFileException *err)
{
TRACE("PROBLEM OCCURED");
err->Delete();
}
...
But I was thinking that may have been part of my problem MFC confuses me (as you can already tell). So basically I have to go back and Declare it outside and call the OPEN member function from within the try/catch block.
Also is it bad to use MFC macros for MFC exceptions? I have never heard of a problem with this?
Thanks for your quick response.
Sam C
----
Systems Manager
Hospitality Marketing Associates
|
|
|
|
|
This has something to do with "scope" of the TRY block, i.e. TRY{...}. It's fine to use the variable inside the scope, i.e. inside the braces, but not outside of it (which you were doing in your ASSERT statement).
Hope this helps.
// Fazlul
Get RadVC today! Play RAD in VC++
http://www.capitolsoft.com
|
|
|
|
|
So if I only wanted to check basically the "OPEN" function of the class I have declared I have to encapsulate the rest of the code within the try block? So for example:
...
try
{
Open(...)
}
catch (...)
{
}
And I can't do this?
try
{
Open(...);
}
Catch (...)
{
}
REST OF FUCTION CODE HERE USING CStdioFile
I find that peculiar and thanks for informing me of the try/catch scope, I did not know that it had it's own scope.
Sam C
----
Systems Manager
Hospitality Marketing Associates
|
|
|
|
|
You're right. This scope thingy is related to braces and has nothing to do with TRY-CATCH. You can get similar error with the following code:
{
int n = 0;
}
n = 5;
Hope this helps.
// Fazlul
Get RadVC today! Play RAD in VC++
http://www.capitolsoft.com
|
|
|
|
|
How can i convert BMP file to JPEG file ?
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
It's in the FAQ.
Christian
As I learn the innermost secrets of the around me, they reward me in many ways to keep quiet.
Men with pierced ears are better prepared for marriage. They've experienced pain and bought Jewellery.
|
|
|
|
|
Hi,
Can you tell me, where is FAQ in this website ?
Please write URL address.
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
The link is at the top of the lounge. There are three in a row, from memory - Demographics, Top 10 posters, Mike Dunn's C++ FAQ.
Christian
As I learn the innermost secrets of the around me, they reward me in many ways to keep quiet.
Men with pierced ears are better prepared for marriage. They've experienced pain and bought Jewellery.
|
|
|
|
|
I found it ...
Thanks ...
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
Hi all,
Please explain to me about Mode values in connection string ...
Please explain about: ModeShareExclusive - ModeShareDenyWrite - ModeShareDenyNone and other values ...
In last, what is Mode default vlaue ? Is that ModeUnknown ?
I read MSDN but i didn't understand ...
Thanks for replies ...
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|