|
OK, I understand that, what is bothering me is, after reading the MSDN documentation, I don't understand how to get the "Handle to an instance of the module whose executable file contains the icon to be loaded"?
Thanks for your time and excuse my ignorance.
Cheers
Rui
|
|
|
|
|
The hInstance parameter is passed by Windows to WinMain when an application is started. Use AfxGetInstanceHandle() to get it. If that does not answer you, I don't understand your question. Try rephrasing it and posting again and perhaps someone can help.
|
|
|
|
|
CComVariant var("Somevalue");
How to convert this to C-style string
|
|
|
|
|
|
Hi
Iam using the GridCtrl in my code.The Grid is allowing to enter infinite number of charecters in the cells.I want to restrict the cell characters by some 12 or 13.That is user should not enter more than 12 charecters in a cell.
Please help me.
munafmohamed
|
|
|
|
|
This is from memory, so you'll have to check on the implementation details.
When a cell is being edited, it created an "InPlaceEdit" control. This is an
edit box which is subclassed to capture the WM_KILLFOCUS message.
When this is created, the grid control sends you a notification. You can get
the handle / CWnd * of the edit box and send it a EM_LIMITTEXT message.
I hope this helps,
Iain.
|
|
|
|
|
I'm currently trying to use the Scintilla (www.scintilla.org[^]) control in one of our applications. That's rather simple and works.
Problem is that I want to add a colorizer (for our macro language) to Scintilla. It seems like I have to write my own lexer module specifically for Scintilla, which is a pitty since I already have a lexical analyser written in lex/flex, that works together with our parser, written in yacc/bison.
I would like to reuse our lex/flex lexical analyser in the Scintilla lexer.
Anybody done that already ? Or anyone ideas ?
Thanks.
Enjoy life, this is not a rehearsal !!!
|
|
|
|
|
Is this possible...?
Spy++ has a neat feature where you drag the bullseye over a window and it returns it's info like class info and process ID and thread and such...
I assume I can get the process ID using GetWindowThreadProcessID() , but once I have a window or application process how can I get the module's ICON...???
Thanx in advance!
Cheers!
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
hIcon of the WNDCLASS....?
that would work yeah...?
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
Have a look at the function
HICON ExtractIcon(
HINSTANCE hInst,
LPCTSTR lpszExeFileName,
UINT nIconIndex
);
hInst should be AfxGetInstanceHandle(); and lpszExeFileName the path to the executable of the process you want to get the icon from. There is a member "szExeFile" in the PROCESSENTRY32 struct, so this should not be a problem. To get the standard icon, set nIconIndex = 0.
-Dominik
|
|
|
|
|
How can I programmatically figure out that my shared folders are accessed from some user? Is there any event which can trigger me that, and how?
Thank you in advance.
|
|
|
|
|
Hi All,
consider Test.exe which is GUI based,
now in command line
\\directory\test.exe it invokes Test.exe, if user types
\\directory\test.exe help ,particular help should be displayed simillar to c:\help a list of commands with description is displayed
can anyone explain me on how to do this
Thanks
Uday
|
|
|
|
|
Parse the command line parameter of WinMain() , determine if the commandline included help, then print the stuff to screen.
console apps I guess use main() so you have to work with argv and argc
argv is an array (if i remember correctly) of each paramter and argc is a count of the number of array elements...
so argv[0] = test.exe (module name)
and argv[1] would contain the text string help
simple as that really
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
I need to use WriteConsole for that I have to get the Handle
(Handle to the console screen buffer to be written to. The handle must have GENERIC_WRITE access. )
How to get this Handle??
I used ,
HANDLE hnd =GetStdHandle(STD_OUTPUT_HANDLE); buts its not working and also I used GetLastError() its returning 0 which means program executed correctly
So ??
|
|
|
|
|
Are you using WinMain(...) or main(...). If you use WinMain, you have to call the function
AllocConsole();
before calling GetStdHandle(...);
-Dominik
|
|
|
|
|
Hi,
In DataTypes.h , I wrote this
typedef struct _DATASTRUCT
{
LPCTSTR ID;
double value;
SYSTEMTIME time;
}DATASTRUCT,*LPDATASTRUT;
and include this header in several classes *.h or *.cpp files,the compiler hint to me that redefination has happened.
Then how to fix this problem?
Extreme programming. Do the No.1
|
|
|
|
|
|
Are you protecting your file .h>/code> against multiple inclusion? (with <code>#ifndef DATA_TYPE_H s and stuff, you know.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
In data types.h add something like this:
#if !defined DATATYPES
#define DATATYPES
....
#end if
Best regards,
Alexandru Savescu
|
|
|
|
|
Hii all ,
how I can get Information about the space available and the total space in the memory of a Pocket PC or Its aditional card !!
thanks alot
|
|
|
|
|
How to retreive the system font?
|
|
|
|
|
GetStockObject(SYSTEM_FONT)
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
I'm trying to use CImage in an ATL Active X. I only use methods from CImage Load, Draw and Destroy (which is noting strange). The problem is that when the application that uses the control ends, the DLL of the control can be unload. Any idea of what's the matter ?
|
|
|
|
|
I have two List Control boxes in a dialog. and I wish the user can select a few items from the first list and some items from the second list, and then the user can see all the items he just chose are still highlighted in both lists.
now after i selected one or some items in the first list(they'll get highlighted at this time), when i click in the second list and select items there, the first list will lose focus and the highlighted items in the first list will lose highlighting. Anybody can suggest me how to solve it? thx a lot in advance.
|
|
|
|
|
Just a guess, but the list view control has a 'Show selection always' property...
If that doesn't do the trick then you'd have to devise something using owner draw...
Either way only one item can ever have focus so I hope you don't desire the focus rectangle also...?
Cheers!
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|