Click here to Skip to main content
15,917,652 members
Home / Discussions / COM
   

COM

 
GeneralRe: Really struggling with GetTypeFromProgID Pin
Jörgen Sigvardsson29-Aug-05 9:00
Jörgen Sigvardsson29-Aug-05 9:00 
GeneralRe: Really struggling with GetTypeFromProgID Pin
DaveC42691329-Aug-05 10:03
DaveC42691329-Aug-05 10:03 
GeneralRe: Really struggling with GetTypeFromProgID Pin
Jörgen Sigvardsson29-Aug-05 19:53
Jörgen Sigvardsson29-Aug-05 19:53 
GeneralRe: Really struggling with GetTypeFromProgID Pin
DaveC42691330-Aug-05 2:59
DaveC42691330-Aug-05 2:59 
QuestionActiveX Control's Bitmaps in ToolBox Pin
Ashwin kumar Gurujala27-Aug-05 1:53
Ashwin kumar Gurujala27-Aug-05 1:53 
GeneralRe: ActiveX Control's Bitmaps in ToolBox Pin
Jörgen Sigvardsson27-Aug-05 13:22
Jörgen Sigvardsson27-Aug-05 13:22 
GeneralRe: ActiveX Control's Bitmaps in ToolBox Pin
Ashwin kumar Gurujala28-Aug-05 19:55
Ashwin kumar Gurujala28-Aug-05 19:55 
GeneralRe: ActiveX Control's Bitmaps in ToolBox Pin
Jörgen Sigvardsson29-Aug-05 9:16
Jörgen Sigvardsson29-Aug-05 9:16 
The components registry "folder" is located in HKEY_CLASSES_ROOT\CLSID\{<clsid here>}.
Under that key is the ToolboxBitmap32 key. The default value of that key is the toolbox bitmap. The string value is on the form module,id. Parse the module and id into their own variables.

Then open the module using LoadLibraryEx(), using the LOAD_LIBRARY_AS_DATAFILE option. Then use the function LoadBitmap with the handle returned from LoadLibraryEx(), and the id "transformed" with MAKEINTRESOURCE().

Pseudo-code:
LPCTSTR lpszToolboxBitmap32 = GetToolboxBitmap32ForCLSID(clsidOfComponent);
LPCTSTR lpszModule;
int     nId;
ParseBitmapString(lpszToolboxBitmap32, &lpszModule, &nId);
 
HMODULE hLibrary = ::LoadLibraryEx(lpszModule, NULL, LOAD_LIBRARY_AS_DATAFILE);
HBITMAP hBmp = ::LoadBitmap(hLibrary, MAKEINTRESOURCE(nId));
::FreeLibrary(hLibrary);
 
// the handle to your bitmap is now in hBmp
I hope this helps.

Good music: In my rosary[^]
GeneralRe: ActiveX Control's Bitmaps in ToolBox Pin
Ashwin kumar Gurujala1-Sep-05 1:37
Ashwin kumar Gurujala1-Sep-05 1:37 
GeneralRe: ActiveX Control's Bitmaps in ToolBox Pin
Jörgen Sigvardsson1-Sep-05 9:48
Jörgen Sigvardsson1-Sep-05 9:48 
GeneralRe: ActiveX Control's Bitmaps in ToolBox Pin
Ashwin kumar Gurujala9-Sep-05 0:02
Ashwin kumar Gurujala9-Sep-05 0:02 
QuestionCalling remote components method Pin
Anonymous27-Aug-05 0:16
Anonymous27-Aug-05 0:16 
QuestionRe: Calling remote components method Pin
sudeesht31-Aug-05 0:12
sudeesht31-Aug-05 0:12 
QuestionLNK2019 Pin
bondguru26-Aug-05 2:33
bondguru26-Aug-05 2:33 
Questionactivex question... Pin
l a u r e n25-Aug-05 20:20
l a u r e n25-Aug-05 20:20 
GeneralRe: activex question... Pin
Jörgen Sigvardsson26-Aug-05 9:55
Jörgen Sigvardsson26-Aug-05 9:55 
GeneralRe: activex question... Pin
Anonymous26-Aug-05 10:10
Anonymous26-Aug-05 10:10 
GeneralRe: activex question... Pin
Jörgen Sigvardsson26-Aug-05 22:35
Jörgen Sigvardsson26-Aug-05 22:35 
GeneralRe: activex question... Pin
l a u r e n27-Aug-05 6:58
l a u r e n27-Aug-05 6:58 
GeneralRe: activex question... Pin
l a u r e n27-Aug-05 8:29
l a u r e n27-Aug-05 8:29 
GeneralRe: activex question... Pin
Jörgen Sigvardsson27-Aug-05 13:20
Jörgen Sigvardsson27-Aug-05 13:20 
GeneralRe: activex question... Pin
l a u r e n27-Aug-05 16:46
l a u r e n27-Aug-05 16:46 
Questionsocket problem Pin
Ganesh_T25-Aug-05 18:58
Ganesh_T25-Aug-05 18:58 
QuestionDriver interface Pin
Paresh emb25-Aug-05 5:52
Paresh emb25-Aug-05 5:52 
QuestionTopics for DCOM Pin
V.G25-Aug-05 2:55
V.G25-Aug-05 2:55 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.