|
Would PathMatchSpec() be of any help here?
"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
|
|
|
|
|
Indeed, that's exactly what I need.
Thanks.
|
|
|
|
|
by adding these code to the case WM_PAINT:
hdc = BeginPaint(hWnd, &ps);
MoveToEx (hdc, 100, 100, NULL) ;
LineTo (hdc, 100, 200) ;
EndPaint(hWnd, &ps);
why can I adding them to the case WM_CREATE to realise it?
|
|
|
|
|
What problem with this code? and i said you about WM_CREATE & WM_PAINT
|
|
|
|
|
there is nothing wrong with the code,
I just want to know, why can't I move this code into WM_CREATE to get the same result- just draw a line in the window when the window is created.
|
|
|
|
|
Because when it receives the WM_PAINT message, the window will be redrawn and thus if you don't redraw your line too, it will be erased.
|
|
|
|
|
And From the MSDN:
WM_CREATE:
This message is sent when an application requests that a window be created
|
|
|
|
|
bloodwinner wrote: case WM_CREATE to realise it
WM_CREATE:
The WM_CREATE message is sent when an application requests that a window be created by calling the CreateWindowEx or CreateWindow function. (The message is sent before the function returns.) The window procedure of the new window receives this message after the window is created, but before the window becomes visible.
WM_PAINT:
The WM_PAINT message is sent when the system or another application makes a request to paint a portion of an application's window ie when we want to draw something on the window.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Run notepad, and calculator. Drag the notepad over the calculator. Move it away. Why does the calculator redraw itself ? The answer is, it generates a WM_PAINT message, windows uses this to tell a window to repaint itself. If you draw outside WM_PAINT, then your window will lose what you draw when it redraws itself.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
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.
|
|
|
|