|
Yes I'm using C++ to code, can you help me figure out the idea?
Thanks
|
|
|
|
|
ernst20020530 wrote: ...I'm using C++...
Managed C++.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Try changing:
volatile wchar_t* content;
to:
#define MAX_CONTENT_SZ <some value="">
volatile wchar_t content[MAX_CONTENT_SZ];
i.e. don't dynamically alloc shared data unless you are prepared to handle all multi-proc ownership issues.
...cmk
The idea that I can be presented with a problem, set out to logically solve it with the tools at hand, and wind up with a program that could not be legally used because someone else followed the same logical steps some years ago and filed for a patent on it is horrifying.
- John Carmack
|
|
|
|
|
Hi
I have got the following code:
Code:
drawDATA(Shapes shapes, CDC& cd){
// select pen ... ect
// draw shapes
cd.TextOut(X, Y, "DRAW1");
}
I am calling drawDATA from two methods drawA, drawB with: CClientDC dc(this) as parameter.
drawA(shapesA, dc); --> if user invokes action A
Invalidate()
drawB(shapesB, dc); --> if user invokes action B
Invalidate();
both methods draw the shapes, but I only want to show the latest shapes not both shapes of A and B.
If user clicks button A then i should show him shapes A
If he clicks Button B then I should show him shapes B.
If he clicks A , I should show shapes A first, and he continues and clicks B, I should erase shapes A and show shapes B only
SO iI need a way of erasing previous shapes
thank
llp00na
|
|
|
|
|
Invalidate() doesn't redraw your window, it merely tells your window that the whole thing needs to be redrawn the next time the WM_PAINT message is handled.
if you want to erase the background, just fill it with the background color.
|
|
|
|
|
I am drawing on top of a web browser control
So cant use the background colour
I tried UpdateWindow() but does not work
llp00na
|
|
|
|
|
UpdateWindow just sends the WM_PAINT message to your app, it doesn't actually cause painting to happen. basically painting happens whenever your app has nothing else to do and your app gets around to processing the WM_PAINT message. that's not going to happen in the middle of a function (unless you're doing something like an old-school Message Pump between statements).
but, basically, there is no "erase" functionality. there is only draw. if you need to erase drawing A, you have to draw what was there before you drew A.
|
|
|
|
|
llp00na wrote: I am drawing on top of a web browser control
Which means that anytime the Web browser control redraws itself, anything drawn on top of it goes away.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Try RedrawWindow[^] instead of Invalidate...
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <
|
|
|
|
|
How do i force a web browser control to redraw itself?
llp00na
|
|
|
|
|
that did not work
llp00na
|
|
|
|
|
Are you using IWebBrowser2 ?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
|
Can you call it's Refresh() or Refresh2() method?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
I have tried Refresh()
But it erases everything, even those created after Refresh is called
drawShapesA
Refresh()
drawShapesB
llp00na
|
|
|
|
|
Are you changing the HTML that the IWebBrowser2 control is rendering?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
|
|
Perhaps the Site Bugs/Suggestions forum would be a better place to ask.
|
|
|
|
|
The most obvious reason for a new article to be deleted is that it did not pass moderation (i.e. was not considered to be of suitable quality for the site). Common mistakes include poor grammar, inadequate explanations and posting code snippets which duplicate MSDN content.
That being the case, I would suggest taking a good look at the article (you did keep a copy, didn't you?) and working out how to improve it. As a guideline, take a look at highly rated (say over 4.5) articles on the site to ee what is expected.
Once you consider it up to par, feel free to re-submit it.
|
|
|
|
|
Because they didn't pass moderation. I guess some people posted things in the message boards of your articles, they probably told you what was wrong with your articles.
|
|
|
|
|
My article was also deleted. I was hoping to use it as a future reference as well. God damn this site. It suck balls. Their article search is also FAIL. When you try to browse through articles, you'll see that the pages go on to infinity. I'm going to boycott this site now. I thought my articles would be able to help developers in the future too.
|
|
|
|
|
hi ,
Im using the below code....
/*the below is the ini file i used..
[name]
name1=promod
name2=praneeth
*/
const int SIZE = 8000;
CString csSectionname=_T("name");
char lpszBuffer[SIZE];
CString csString;
::GetPrivateProfileSectionW(csSectionname,(LPWSTR)lpszBuffer,SIZE,_T(c:\\testing.ini");
char* NextSection="";
NextSection=lpszBuffer;
while(*NextSection!=NULL)
{
csString=NextSection;
NextSection=NextSection+strlen(NextSection)+1;
AfxMessageBox(csString);
}
But the messagebox prints only single letter at once instead of displaying key and value pair....
ie messagebox is displaying 'n'--->first time..
is displaying 'a'--->second time
.
.
.
.
i need messagebox to display name1=promod for the first time itself.....
Please help me out......
modified on Friday, March 20, 2009 12:52 PM
|
|
|
|
|
p_1960 wrote: while(*cNextSection!=NULL)
what is "cNextSection", and where do you modify it?
|
|
|
|
|
Sorry it"s NextSection not cNextSection.... Please help me out...
modified on Friday, March 20, 2009 12:36 PM
|
|
|
|