|
Because when Windows wants to repaint a window, because an obscured part was exposed or for another reason, it sends a WM_PAINT message to the window to get it to repaint itself. If you put the rendering code elsewhere you'll see the rendering but when a part of the window is obscured and then exposed (or for some other reason needs to be re-rendered) the WM_PAINT handler will regenerate the image but it will not include the line. Aside from this I suspect the WM_CREATE handler is too early anyway. This situation is set to change with Vista's DWM but still the WM_PAINT handler will remain the correct place to perform most rendering operations.
Steve
|
|
|
|
|
Hi Gurus,
I m working on an application which depends on Removable Storage Manager in order to manage multiple media.As a result i have to design a RSM application. But my problem is i m not able to find any samples regarding this topic. In MSDN, there is a lot of description on Removable Storage Manager but no sample or example at all. May any one of u plz tell me that from where i can get starting samples of Removable Storage Manager.
Thanks
Touseef Afzal
"I only fail when i give up "
|
|
|
|
|
Hi all, i'm trying to implement a tool that navigate automatically on a site, using iwebbrowser. The problem is that this site has httaccess, so when i do Navigate to that url, it opens a login popup with "Authentication Required". This popup is not html, so i don't know how to fill it with username and password.
I thought that this code was a good idea:
HINTERNET m_hInternetSession;
HINTERNET m_hHttpConnection;
if (!AfxParseURL(m_sURLToDownload, m_dwServiceType, m_sServer, m_sObject, m_nPort))
{
TRACE(_T("Failed to parse the URL: %s\n"), m_sURLToDownload);
return false;
}
m_hInternetSession = ::InternetOpen(AfxGetAppName(), INTERNET_OPEN_TYPE_PRECONFIG, NULL, NULL, 0);
if (m_hInternetSession == NULL)
{
TRACE(_T("Failed in call to InternetOpen, Error:%d\n"), ::GetLastError());
return false;
}
m_hHttpConnection = ::InternetConnect(m_hInternetSession, m_sServer, m_nPort, m_sUserName,
m_sPassword, m_dwServiceType, 0, (DWORD) this);
But this has no correlation with iwebbrowser2..so even using this code before navigating to that page the http 401 "authentication required" message is still there.
Please Help
|
|
|
|
|
Im using a 16-Bpp Bitmap, With biCompression = BI_BITFIELDS.
Im trying to get a color at a pixel in this bitmap.
Im reading the pixel data and applying the Masks in the BmpInfoHeader and calculating the
color value.
The color value obtained this way is different from the color obtained using GetPixel()
after rendering the Bitmap on screen using SetDIBitStoDevice().
Why is it so?
Thanks in advance.
Uday kiran
|
|
|
|
|
I guess to answer this, we need to know how they differ, and how you're doing your calculation. Do you realise that the color is stored within the bitmap as BGR, not RGB ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
I want to read a pst file through my own program, but i couldn't find any material describing the structure of the pst file . Can u help me in getting that.
thanxs
|
|
|
|
|
It's always annoying when you take the time to answer someone, and they don't like the answer ( which doesn't change that it's the only available answer ),so they wait a few hours and ask the same thing again.
This[^] is all the info anyone is going to be able to give you.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
actually i was not getting ur point so i thought i s'ld re frame my question and ask it again sorry if at all u felt bad....and thanxs for responsing to me and giving the link of that page
|
|
|
|
|
Did you see previous link?
|
|
|
|
|
ya i have seen previous link but wen i dowloaded demo file frm dat link der was no dsw file or exe file so i was not able to connect those files n was not not able to detect the flow of the program so it didn't worked out 4 me
|
|
|
|
|
neha.agarwal27 wrote: ...no dsw file or exe file...
The project contains a .dsp file. Open that instead. No .exe is provided as you can build one yourself.
BTW, this is not a cell phone, PDA, or other IM device. Loose the SMS-speak and you'll get much more help.
"Talent without discipline is like an octopus on roller skates. There's plenty of movement, but you never know if it's going to be forward, backwards, or sideways." - H. Jackson Brown, Jr.
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
|
how in debug mode watch the contents of the vector<> it only shows first elemnt only, and not tmp[i] telling it is not possible
9ine
|
|
|
|
|
9ine wrote: how in debug mode watch the contents of the vector<> it only shows first elemnt only, and not tmp[i] telling it is not possible
It's quite easy.
For eg: if you have an array like
int *pnData = new int[20]; // Fill out pData here
Now select pnData and press Shift + F9 for quick watch window.
This will only show you the first value. Now in order to see next value type the following...
pnData[0]
pnData[1]
pnData[2] Same with vector too...
Select the variable that denotes the array in a vector, that is the internal data pointer in quick watch window.
Now follow the same procedure that you did for pnData .
Hope this helps...
|
|
|
|
|
Another option is in the watch window, use
<br />
pnData,20<br />
That will show 20 elements.
Hope that helps.
Karl - WK5M
PP-ASEL-IA (N43CS)
<kmedcalf@ev1.net>
PGP Key: 0xDB02E193
PGP Key Fingerprint: 8F06 5A2E 2735 892B 821C 871A 0411 94EA DB02 E193
|
|
|
|
|
krmed wrote: Another option is in the watch window, use
pnData,20
That will show 20 elements.
This is real nice. Thanks for this info. I didn't know about this. A 5. Do you know any more of such tricks.
|
|
|
|
|
Hello All
I am using english OS WIN XP, in which Japanese character can be used using Microsft IME.
The file names are stored in a text file which is SHIFT-JIS encoding.
when I read the file names form the file using I am getting some encoded file name in a charcter buffer.
fgets( szFilename, pFP );
fills the szFileName with character that is not the same of the filename.
But I want to open the file after reading the filenames from the text file
i.e I want this two step
fgets(szFilename, pFP);
fopen( szFileName, "r");
I know the problem is in character encoding. But can't find any solution. Any hiht to proceed please
Regards
Anil
|
|
|
|
|
Use WideCharToMultiByte()
Rinu Raj
|
|
|
|
|
Thank you very much.
I was able to do it with the above funtion. forgot to thank you on that day
Regards
Anil
|
|
|
|
|
Hello comunity,
it is posible to modify an content from an LPCTSTR variable!?
Example:
<code>
CString csStringContent = "This is an String";
LPCTSTR lpsz = csStringContent;
</code>
with best regards
break;
|
|
|
|
|
break; wrote: CString csStringContent = "This is an String"; // modify to "This is String" or replace a part of themLPCTSTR lpsz = csStringContent;// modify lpsz?
with best regards
csStringContent = "This is String";
LPTSTR lpsz = csStringContent.GetBuffer();
lpsz[0] = _T( 't' );
csStringContent.ReleaseBuffer(); Or
csStringContent = "This is String";
LPCTSTR lpszC = csStringContent;
LPTSTR lpsz[0] = const_cast< LPTSTR >( lpsz );
lpsz[0] = _T( 't' );
|
|
|
|
|
Nibu babu thomas wrote: CString csStringContent = "This is an String"; // modify to "This is String" or replace a part of themLPCTSTR lpsz = csStringContent;// modify lpsz?
Generally, if you want to modify the LPCTSTR, then you are making something wrong.
You can:
1. csStringContent[0] = 'a';
2. use various member function of CString
3. use CString only when necessary:
TCHAR str[100] = "This is a string";<br />
_tcscpy(str[2], "aaa";<br />
CString cstr = str;
4. use CString::GetBuffer() as already described;
Playing with the LPCTSTR ... no way.
|
|
|
|
|
Agreed, casting the const away as done above is not on - I'd fire someone for doing this.
Steve
|
|
|
|
|
Your second method is just plain evil - although you mentioned it sould be avoided I'd go as for as to say you shouldn't have even mentioned it as an option. Even if it works on one MFC verion it may stop working in a later version.
Steve
|
|
|
|
|
Stephen Hewitt wrote: Your second method is just plain evil - although you mentioned it sould be avoided I'd go as for as to say you shouldn't have even mentioned it as an option. Even if it works on one MFC verion it may stop working in a later version.
Sometimes when you don't have any other option you are forced to do this. But it should be avoided. I just mentioned this so that if he didn't have any other option he can use this. I just went for his question.
|
|
|
|