|
What does "indent" mean? (I'm spanish :P)
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
|
|
|
|
|
Nelek wrote: What does "indent" mean? (I'm spanish)
In short it means you write this:
for( ;; )
{
}
instead of this:
for( ;; )
{
}
Steve
|
|
|
|
|
Ok, then it is to use the tabulated structure, isn't it? Thanks for the answer
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
|
|
|
|
|
Hi,
Is there any API through which i can find the IP address of current computer(computer on which my exe is running).
Warm Regards,
Mushq
|
|
|
|
|
How about gethostbyname() ?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
|
|
Hello All,
I am working a addin for MS Word and i am new with that so i have registered a addin but now i am unable unregistered this addin.
so can body tell me how can i unregistered a addin.
and also i want to know how can i add menu bar in this addin and how to handle messages?
if any body can give me idea about that, than please share with me.
thanks
bankey
|
|
|
|
|
Banks K wrote: so can body tell me how can i unregistered a addin.
How did you register it?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
I have registered with "regsvr32 *.DLL"
|
|
|
|
|
So why can't you just use the /u command-line switch?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
So how about "regsvr32 -u *.DLL"?
Regards,
Tim
|
|
|
|
|
Hi fellows
I need to insert an image in my menu. My menu is composed with the following strings: "New Text", "New File", "New Ruler".
My menu was coded with win32, not MFC.
Now the questions:
1) I've readed that I need to create owner draw menus. Is that right?
2) How can I load an image to insert in my menu? The size of the image matters or when I insert, windows fit the image according the area that I passed.
3) What you recommend that I read to get a better understand of this topic and start coding?
Any help is very welcomed. Again thanks for the support.
|
|
|
|
|
I've used NewMenu in several projects. Excellent.
|
|
|
|
|
|
thanks man, I'll see right now...
|
|
|
|
|
I hope it solved your problem.
|
|
|
|
|
Thanks man, for your help
|
|
|
|
|
|
Hi Alex,
Since you have asked specifically for win32, I thought I should let you know the precisely steps to create Menu and answer your questions.
1) I've readed that I need to create owner draw menus. Is that right?
Its not mandatory.
2) How can I load an image to insert in my menu? The size of the image matters or when I insert, windows fit the image according the area that I passed.
Windos fits the image accordingly. If you want text with a bmp as a menu item then again the space will be fixed for the bmp.
Steps:
HMENU Menu;
Menu = CreatePopupMenu();
HBITMAP hBitmap1 = LoadBitmap(AfxGetInstanceHandle(),MAKEINTRESOURCE(IDB_BITMAP1));
HBITMAP hBitmap2 = LoadBitmap(AfxGetInstanceHandle(),MAKEINTRESOURCE(IDB_BITMAP2));
//Append
AppendMenu(Menu, MF_STRING, 2000, "Test3333333333");
AppendMenu(Menu, MF_SEPARATOR, NULL, "");
AppendMenu(Menu, MF_STRING, 2001, "Test2");
SetMenuItemBitmaps(Menu, 2001, MF_BYCOMMAND,hBitmap2, hBitmap1);
TrackPopupMenu(Menu,TPM_RIGHTALIGN,point.x, point.y,0,this->m_hWnd,NULL);
The above steps will create 2 Menu items, one only text and other bmp with text.
Manoj
Never Gives up
|
|
|
|
|
Thanks for your help manoj, very thanks....
And thanks for the code, I'll test it right now
|
|
|
|
|
Hi there,
Please specify how to decide whether to go for return codes or exception handling.
When is exception handling preferred over returning a specific error code.
Thanks in advance,
Raja Pratap
|
|
|
|
|
IMHO you need a decision between throwing an exception or returning a specific error code.
If it is as above stated, then I think:
(1) If it's your own application (entirely developed by you) then you can (almost) safely rely on return error codes, since you know that calling methods must always check the return values.
(2) If your're working in team then throw, throw, throw: never trust your mates coding neatness!!!
Hope that helps.
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.
|
|
|
|
|
Thank you for your response Pillani.
But still I'm not clear, why return codes are not suitable when we work as team.
|
|
|
|
|
Hi,
I think it is because you can not be totally sure about what the others will do. If they get an assertion, they have to solve something, if they have a return code, they can make nothing about or even don't realize about the error. And then error will be cumulating themselves until it would be too difficult to correct the program.
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
|
|
|
|