|
Anonymous wrote:
Then will there be any difference using COM or ATL ???
Yes, if you don;t use ATL, it will take you longer.
Any ATL component will work with VB.
Christian
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
Cats, and most other animals apart from mad cows can write fully functional vb code. - Simon Walton - 6-Aug-2002
|
|
|
|
|
Hi all. I am trying to use _rmdir under WindowsXP to delete some folders. But I can´t and all I get is an errno = 13. Does anyone knows what does this mean? It doesn´t fit in what the documentation tells the errno values could be. Thanx...
Rodrigo
|
|
|
|
|
|
Hi all,
I'm writing a program (MFC) that connect to a SQL Server to manipulate the data. But I dont know which technique is the best in this situation, use ADO or something else ??? Which control should I use to display the data from SQL Server ?
Thanks alot
|
|
|
|
|
I use ADO for all my SQL Server data applications. A simple combination of AdoConnection, AdoCommand and AdoRecordset. I then display the data in standard Windows Controls (ListView, Edit, ListBox etc)
Most of my command objects use Stored Procedures to retrieve the data.
Michael
Programming is great. First they pay you to introduce bugs into software. Then they pay you to remove them again.
|
|
|
|
|
Hello,
I can transfer an image from a Canon digital camera with IWiaDataTransfer::idtGetBandedData but fail with IWiaDataTransfer::idtGetData. However, with a Kodak EasyShare I can use IWiaDataTransfer::idtGetData but fail if IWiaDataTransfer::idtGetBandedData. Then I try to use IWiaDataTransfer::idtGetBandedData then IWiaDataTransfer::idtGetData if IWiaDataTransfer::idtGetBandedData failed, the IWiaDataTransfer::idtGetData fails. Do you know why?
Thanks!
|
|
|
|
|
Hello there,
I want to change the Bitmap Button when i'm moving mouse cursor on the button ...
How can i do that ???
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
|
Thanks for your helps
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
If you want to save yourself the programming, try one of the various button controls available at CP's MFC Button Control articles[^] which provide hovering facilities.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Thanks for useful articles and tutorials
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
Is there a way to find the length of a CString in pixles?
There's always one more bug.
|
|
|
|
|
|
thx
There's always one more bug.
|
|
|
|
|
The EnumFontFamProc function uses all of its parameters as "input" parameters. The third parameter, 'nFontType', however, has me a little baffled because nowhere prior to it being used, is it initialized.
Therefore my contention is that the test conducted, using 'nFontType' is invalid because it doesn't contain valid data (at least that's what I would like to think), but the program works.
If there's a mystery here, could someone explain it to me. Thanks!
Below is sample code of what I'm talking about.
==========================================
int CALLBACK CMainWindow::EnumFontFamProc(ENUMLOGFONT* lpelf, NEWTEXTMETRIC* lpntm, int nFontType, LPARAM lParam)
{
CMainWindow* pWnd = (CMainWindow*)lParam;
if((pWnd->m_wndCheckBox.GetCheck() == BST_UNCHECKED) || (nFontType & TRUETYPE_FONTTYPE))
do something etc;
etc.
}
===================================
This is the call that activates EnumFontFamProc.
::EnumFontFamilies((HDC)dc, NULL, (FONTENUMPROC)EnumFontFamProc, (LPARAM)this);
William
|
|
|
|
|
nFontType is a DWORD which is a combination of :-
DEVICE_FONTTYPE, RASTER_FONTTYPE, TRUETYPE_FONTTYPE
or it could be 0. In your case you are doing a boolean check on (nFontType & TRUETYPE_FONTTYPE ) which will be TRUE only if the TRUETYPE_FONTTYPE bit is set. And there is nothing peculiar about your code either.
Regards,
Nish
Author of the romantic comedy
Summer Love and Some more Cricket [New Win]
Review by Shog9
Click here for review[NW]
|
|
|
|
|
Where does 'nFontType' get set to be a combination of the various *FONTTYPE*? Does it get set by the function that activates EnumFontFamProc?
Because it's used as an input parameter, it had to be initialized somewhere and by something!
Thanks!
William
|
|
|
|
|
WREY wrote:
Where does 'nFontType' get set to be a combination of the various *FONTTYPE*? Does it get set by the function that activates EnumFontFamProc?
Because it's used as an input parameter, it had to be initialized somewhere and by something!
William
All 4 parameters are [in] parameters. Usually when we see [in] we instantly think of it as to be initialized by us. But in this case the callback function is called by the API for us. Means they'll populate all the parameters. What's [in] for them is a sort of [out] for us. So you don't have to worry about them being [in] parameters.
If you are implementing some other user based api call, and you wish to use this same callback function as the callback, then you need to populate them. But in your case, you don't have to do that.
I hope I make myself clear.
Regards,
Nish
Author of the romantic comedy
Summer Love and Some more Cricket [New Win]
Review by Shog9
Click here for review[NW]
|
|
|
|
|
How to get window hwnd of a process if i have its process id ?
How to get total no of windows hwnd that a process created ?
and how to get its active window hwnd?
if i want to get a condition that a process is performing processing or not what to do?
plz help.
r00d0034@yahoo.com
|
|
|
|
|
imran_rafique wrote:
How to get window hwnd of a process if i have its process id ?
You can use GetWindowThreadProcessId while you enumerate (using EnumWindows ). GetWindowThreadProcessId can be used to find process id based on window handle.
ÿVOTD:3 "Do nothing out of selfish ambition or vain conceit, but in humility consider others better than yourselves. 4 Each of you should look not only to your own interests, but also to the interests of others." - Phi 2:3-4
|
|
|
|
|
i have used EnumWindows but i could not understand how to do it plz explain a little so that i could got some thing out of that.
plzzzzzzzzzzz
r00d0034@yahoo.com
|
|
|
|
|
I don't know if you found the answer to your question, if not, try this:
struct FindHwndWithProcIdStruct{
DWORD dwProcId;
HWND hWnd;
};
HWND DoFindWindowWithProcId(DWORD dwProcessId)
{
FindHwndWithProcIdStruct myProcIdStruct = { 0 };
myProcIdStruct.dwProcId = dwProcessId;
::EnumWindows(gfnEnumWindowProc, (LPARAM)&myProcIdStruct);
return myProcIdStruct.hWnd;
}
BOOL CALLBACK gfnEnumWindowProc(HWND hWnd, LPARAM lParam)
{
DWORD dwProcessId = 0L;
DWORD dwThreadId = GetWindowThreadProcessId(hWnd, &dwProcessId);
if (dwProcessId == ((FindHwndWidthProcIdStruct*)lParam)->dwProcId;
{
((FindHwndWidthProcIdStruct*)lParam)->hWnd = hWnd;
return FALSE;
}
return TRUE;
}
ÿVOTD:Psalm 117
1 Praise the Lord , all you nations; extol him, all you peoples.
2 For great is his love toward us, and the faithfulness of the Lord endures forever.
|
|
|
|
|
How do I select an item in a list box? I'm calling the following code, but that doesn't select anything. What's the correct code to use?
<br />
ServerListCtrl.SetItemState(0, LVIS_SELECTED | LVIS_FOCUSED, LVIS_SELECTED | LVIS_FOCUSED);<br />
ServerListCtrl.EnsureVisible(0, FALSE);<br />
Thanks!
|
|
|
|
|
Use SetCurSel() and SetSet().
Kuphryn
|
|
|
|
|
How? They aren't members of CListCtrl
|
|
|
|