|
Use Win32 Shell Idle apis instead
|
|
|
|
|
kilt wrote: Use Win32 Shell Idle apis instead
And which Win32 Shell function would that be?
Best Wishes,
-David Delaune
|
|
|
|
|
Hi,
I'd like to how caputre scrollview area, incluing unvisible area...
scrollview size is nomally big than actually monito's resoluton, unvisible area don't captured...
CRect rect;
HWND hWnd = m_hWnd;
if (hWnd == NULL) return;
HDC hScrollView = ::GetWindowDC(hWnd);
HDC hCaptureDC = CreateCompatibleDC(hScrollView);
CRect m_rDrawingSurface;
::GetWindowRect(hWnd,&m_rDrawingSurface);
BITMAPINFOHEADER BMIH;
HBITMAP m_hCaptureBitmap;
BYTE* m_pDrawingSurfaceBits;
CDC* pDC = GetDC();
if(pDC != NULL)
{
BMIH.biSize = sizeof(BITMAPINFOHEADER);
BMIH.biBitCount = 24;
BMIH.biPlanes = 1;
BMIH.biCompression = BI_RGB;
BMIH.biWidth = m_rDrawingSurface.Width();
BMIH.biHeight = m_rDrawingSurface.Height();
BMIH.biSizeImage = ((((BMIH.biWidth * BMIH.biBitCount) + 31) & ~31) >> 3) * BMIH.biHeight;
m_hCaptureBitmap = CreateDIBSection(pDC->GetSafeHdc(), (CONST BITMAPINFO*)&BMIH, DIB_RGB_COLORS, (void**)&m_pDrawingSurfaceBits, NULL, 0);
ReleaseDC(pDC);
}
SelectObject(hCaptureDC,m_hCaptureBitmap);
BitBlt(hCaptureDC,
0,
0,
m_rDrawingSurface.Width(),
m_rDrawingSurface.Height(),
hScrollView,0, 0,SRCCOPY|CAPTUREBLT);
CxImage *image = new CxImage();
if(m_hCaptureBitmap)
{
image->CreateFromHBITMAP(m_hCaptureBitmap);
bool retval;
retval = image->Save("c:\\ss.bmp", CXIMAGE_FORMAT_JPG);
}
if (image) delete image;
::ReleaseDC(hWnd,hDesktopDC);
DeleteDC(hCaptureDC);
DeleteObject(m_hCaptureBitmap); :)
|
|
|
|
|
I am going to implement smart card using VC++.
i am using SCM dual interface reader SDI010
having standards ISO7816 And ISO14443 (type A and B).
Can someone tell about some sample code that can provide me help that how can i read from and write into a smart card..
Thanks in advance
|
|
|
|
|
There are some smartcard samples located in the Windows Driver Kit[^]. They are located at \7600.16385.0\src\smartcrd in the install path.
Best Wishes,
-David Delaune
|
|
|
|
|
Hi all,
i m using a picture control to browsing picture,i have also a option to remove this picture from picture control by clicking the remove button.
but when i click remove button to remove the picture ,its not refresh ,if i move the propertysheet and than its refresh.
please tell me how can i do this.
thanks in advance.
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
Maybe a call to UpdateWindow() is in order.
"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 think that you can Invalidate the control.
|
|
|
|
|
How to restrict a class not to create more than 3 objects?
|
|
|
|
|
Handle the construction yourself - make the constructor private and provide a public static method to create an instance of the class. Keep a data member to maintain the count of currently active objects, which should be a maximum of 3. Increase it with every construction and decrease it in the destructor.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
You could try this, although it's NOT thread-safe
class Restricted
{
public:
Restricted()
{
if (instances==3) throw SomeException();
instances++;
}
~Restricted()
{
instances--;
}
private:
static int instances;
};
int Restricted::instances = 0;
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
The (overabused... ) Singleton design pattern [^] can easily modifed to fulfill such a requirement.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Hi,
I am just giving you simple way, try it.
class resritct
{
public:
restrict(){}
void show(){ cout<<"restricted class"; }
};
void main()
{
for(int i=0;i<3;i++)
{
resrict r;
r.show();
}
}
sampath-padamatinti
|
|
|
|
|
I think the OP would be more interested than me...Anyway do you really think that delegating the responsibility of restricted object creation to the class consumer(s) makes the trick?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
I want to tile the 4 dialogs in the window, in my MFC application
|
|
|
|
|
Elsie wrote: I want to tile the 4 dialogs in the window, in my MFC application
Calculate the composite width and height of your dialogs and make sure the client portion of your window is exactly that size. As you create each dialog move it to the appropriate quadrant of the window.
|
|
|
|
|
You can dynamically create 4 dialogs, here is to create a dynamically child dialog:
<br />
CRect rect;<br />
CChildDlg *pDlg=new CChildDlg();<br />
<br />
pDlg->Create(IDD_ChildDlg,NULL);<br />
pDlg->GetWindowRect(rect);<br />
<br />
pDlg->MoveWindow(10,20,rect.bottom,rect.left,TRUE);<br />
<br />
pDlg->ShowWindow(SW_SHOWNORMAL);<br />
pDlg->UpdateWindow();<br />
pDlg = NULL;<br />
|
|
|
|
|
hi everybody!
i want to use "SetWaitableTimer" api,but i don't know how to set "pDueTime". for example,if i
want to set "pDueTime" a value "2009-10-20 13:34:10",what value should i set to "pDueTime".
|
|
|
|
|
Use SystemTimeToFileTime[^] and convert the time that you need represented using the SYSTEMTIME[^] structure to a FILETIME[^] structure. You can now convert the FILETIME to a LARGE_INTEGER[^]. The documentation for FILETIME tells you how to.
«_Superman_»
I love work. It gives me something to do between weekends.
Microsoft MVP (Visual C++)
|
|
|
|
|
No, useless.
Use directly RTL apis.
|
|
|
|
|
Reference?/Example?
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
|
I have a project in which C-ISAM DB is used , now client want to have Oracle RDBMS and
C-ISAM both the DB support for the project i.e an environment variable will deside weather
to go for the C ISAM or RDBMS. Currently C- ISAM is implemented we need to implement RDBMS
support using OCI APIS. Do any body have the sample code of who to achieve this.
Problem is how we convert the data in C which is in structures into the compatiable string
for OCI calls.
REgards
Amit
|
|
|
|
|
HI all,
i m using a ListCtrl,FindItem use to find a item but its works only for first column.its not find the item even its present in other column.
i want to search it in whole list with use of FindItem.
please exaplain me how can i do this.
thanks in advance.
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
I once did this by using GetItemText in a nested loop.
Don't know of any other method, but the time it took when compared to FindItem was almost similar.
«_Superman_»
I love work. It gives me something to do between weekends.
Microsoft MVP (Visual C++)
|
|
|
|