|
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
|
|
|
|
|
do you increment it anywhere ?
and i suspect, as David Crow notes below, that you're mixing Unicode and ANSI strings. GetPrivateProfileStringW is returning a wide char string, but NextSection is a char* pointer (not a wchar_t*), so it's only looking at one byte at a time:
GetPrivateProfileStringW gives you this:
n\0a\0m\0e\0 ... a NULL after each letter
|
|
|
|
|
Ya i do increment please have a look at the updated code....and what u said i exactly true ...but please let me know how can get the toal string ie name1=promod and display it thru messagebox..
|
|
|
|
|
if you need to use GetPrivateProfileStringW, then NextSection should be a wchar_t*, not a char*.
and, you'll need to build your project in Unicode to get AfxMessageBox to handle wide chars.
|
|
|
|
|
Hi chris,
If you don"t mind please let me know how to display the complete string with
sample...(may be modifying the above code...)as im a newbie and i have to complete this by today.........
|
|
|
|
|
You are mixing Unicode and MBCS (which is legal if you know how to do it). Most applications use one or the other. See here for more.
"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
|
|
|
|