|
HRESULT hr = CoCreateInstance(CLSID_CExample,NULL,CLSCTX_LOCAL_SERVER,IID_CExample,(void**)&inf);
hr value is E_NOINTERFACE
No Such Interface Supported.
But if CLSCTX_INPROC_SERVER is used then the value of hr is S_OK
Regards,
Vishal
modified on Friday, April 8, 2011 1:04 PM
|
|
|
|
|
i want to use button instead of scrollbar on listcontrol
|
|
|
|
|
we know that much already. I have two suggestions for you:
- post an accurate question, providing all information one would need to be able to answer effectively;
- stop creating new threads, simply add messages to your original thread as long as it is about the same subject.
In summary, do as the other enquirers do.
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
|
|
|
|
|
Wow. Three in a row. Do you get the feeling that maybe your question isn't clear? Maybe that's why you're not getting the answer you want?
Here are some questions for you:
1. What is the button supposed to do?
2. Exactly where do you want the button to be displayed? In place of the scrollbar? In a listcontrol cell? Which cell?
3. Do you want the scrollbar to be hidden? Which scrollbar? Horizontal or vertical? Or both?
|
|
|
|
|
i want to use button instead of scrollbar
|
|
|
|
|
rajniyadav1a wrote: i want to use button instead of scrollbar OK, by this I assume you mean you want to use a button to scroll instead of using the scrollbar.
This is fairly simple to do: create a button on the dialog, and in the button handler send WM_VSCROLL or WM_HSCROLL message. See MSDN for what the message parameters should be.
p.s. Please reply to this message, instead of creating a new message.
|
|
|
|
|
If you're using MFC, you can use the CListCtrl::Scroll method to scroll the contents of the list control.
|
|
|
|
|
how to add button on listcontrol instead of scrollbar.
|
|
|
|
|
What do you mean, "instead of scrollbar"? Are you currently adding a button to the scrollbar?
Please be more clear.
|
|
|
|
|
Hello Friends
I am creating a win32 application.In that i am using another dll dynamically.
but when I build my application in release mode then Its loading dll but when i build in Hybrid then its not loading dll.
Do I need to change in project settings?
Regards
Yogesh
|
|
|
|
|
Is it possible that the DLL is in the 'Release' folder but not in 'Debug' folder?
|
|
|
|
|
Hi
Is it possible to increase the size of shared memory created using CreateFileMapping/MapViewOfFile during program execution.
|
|
|
|
|
I try to read all ODBC installed on , with this[^] sample , as with modify follow target :
#define IS_KEY _T("SOFTWARE\\ODBC\\ODBCINST.INI")
but it didn't function ... what I didn't understand on this sample is
#define IS_DISPLAY _T("DisplayName")
variable ?!
Thank you .
|
|
|
|
|
Flaviu 2 wrote: I try to read all ODBC installed on , with this sample , as with modify follow target :
#define IS_KEY _T("SOFTWARE\\ODBC\\ODBCINST.INI")
but it didn't function
Flaviu 2 wrote: what I didn't understand on this sample is
<SPAN class=code-preprocessor>#define</SPAN> IS_DISPLAY _T(<SPAN class=code-string>"</SPAN><SPAN class=code-string>DisplayName"</SPAN>)<BR> variable
?!
Your question is very unclear. See here perhaps.
"One man's wage rise is another man's price increase." - Harold Wilson
"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
"Some people are making such thorough preparation for rainy days that they aren't enjoying today's sunshine." - William Feather
|
|
|
|
|
Ok , here is situation :
#define IS_KEY_LEN 256
#define IS_DISPLAY _T("DisplayName")
#define IS_KEY _T("Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall")
void CTestRegView::OnHelpReadodbc()
{
HKEY hKey = NULL;
DWORD dwIndex = 0;
LONG lRet;
DWORD cbName = IS_KEY_LEN;
TCHAR szSubKeyName[IS_KEY_LEN];
if (::RegOpenKeyEx(HKEY_LOCAL_MACHINE, IS_KEY, 0, KEY_READ, &hKey) != ERROR_SUCCESS)return;
while((lRet = ::RegEnumKeyEx(hKey, dwIndex, szSubKeyName, &cbName, NULL, NULL, NULL, NULL)) != ERROR_NO_MORE_ITEMS)
{
if(lRet == ERROR_SUCCESS)
{
HKEY hItem;
if (::RegOpenKeyEx(hKey, szSubKeyName, 0, KEY_READ, &hItem) != ERROR_SUCCESS)continue;
TCHAR szDisplayName[IS_KEY_LEN];
DWORD dwSize = sizeof(szDisplayName);
DWORD dwType;
if(::RegQueryValueEx(hItem, IS_DISPLAY, NULL, &dwType, (LPBYTE)&szDisplayName, &dwSize) == ERROR_SUCCESS)
{
TRACE("\n %s \n",szDisplayName);
}
::RegCloseKey(hItem);
}
dwIndex++;
cbName = IS_KEY_LEN;
}
::RegCloseKey(hKey);
}
this code , from above list all uninstall programs , but , if I change
#define IS_KEY _T("SOFTWARE\\ODBC\\ODBCINST.INI")
the code doesn't work ...then I ask myself , what is _T("DisplayName") which is paramenter 2 on ::RegQueryValueEx method ?
|
|
|
|
|
I found here[^] an solution ...
|
|
|
|
|
Hello,
i need some suggestions with this problem, after start my application does nothing until the user give some input to dialog.
but the cursor is always as "wait-cursor" showed!?
On Spy++ the only messages that are active are this wm_kickidle messages.
Now, this is only if my application runs on 64bit system (ms windows), not on 32bit???
Does any one have idea about how to solve this?
regards
arrin
|
|
|
|
|
I've declared an array like that in a header (the code should be a pure C code):
int someMap[MAPSIZE_X][MAPSIZE_Y];
and I want to use it as a global variable. The problem is if I include that header in another file I get a linker error that this variable was already defined and I'm really stuck here and I have absolutely no clue what's going on and how I'm missing the point.
If I use static it is fine but it isn't global any more.
"extern int gameMap[MAPSIZE_X][MAPSIZE_Y];" doesn't work as I'm expecting. I get the linker error even if I don't use the array in any files.
modified on Thursday, April 7, 2011 6:34 AM
|
|
|
|
|
In the header file declare it as extern int someMap[MAPSIZE_X][MAPSIZE_Y];
Give the declaration int someMap[MAPSIZE_X][MAPSIZE_Y]; in any one of the .cpp files.
|
|
|
|
|
Thank you for your reply.
Well, my code is supposed to be a C code.
|
|
|
|
|
Just replace CPP in my reply with C.
|
|
|
|
|
Thank you! It was a lame problem.
BTW Very interesting article.
|
|
|
|
|
int someMap[MAPSIZE_X][MAPSIZE_Y]; allocates memory for an array; if you include that statement in a header file, then include that header file in N different C files, you end up allocating N arrays, all with the same name, and the linker will complain as it can't have data blocks with global scope and conflicting names.
extern int someMap[MAPSIZE_X][MAPSIZE_Y]; says: "there is an array somewhere, but this by itself does not allocate it"; so inserting that in the header file tells your C files they get access to the array, without allocating memory at all, and without creating linker problems. Of course you still need a single int someMap[MAPSIZE_X][MAPSIZE_Y]; in one of the C files to actually allocate the memory; and that C file better also include the header file with the extern statement.
[ADDED]
One elegant way of dealing with all this is described in Stefan63's message below.
[/ADDED]
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
modified on Thursday, April 7, 2011 9:02 AM
|
|
|
|
|
Wow! Amazing explanation! Thank you so much!
|
|
|
|
|
you're welcome.
In software development, getting things to work may be the goal, understanding how each part works is a necessary step to get things to work reliably.
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
|
|
|
|