|
As per the code you posted, if the command line is 'h', then only you will call dlg.RunModalLoop() other wise DoModal() is called. isnt it?
In case of DoModal, the WS_VISIBLE style of the dialog has no effect. That means, your dialog will show correctly. While double click plese check, DoModal() or RunModalLoop() is called.
|
|
|
|
|
sorry you are right.
Thanks for help.
|
|
|
|
|
Davitor wrote: ...i want to show when application run through commandline then it is in hidden mode...
See the first section of this article.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
I want to change replace old image with new image in the Imagelist at 9 index. So I have used the Relace function, In that the 3 parameter saying the Bitmap mask. that i couldn't understood. Pls provide me the example for replace a image in the image list. My actual aim is to change the toolbar button image, when i cliked that toolbar button.
Provide me solution
|
|
|
|
|
Hi,
I could't get ur real problem. Any way, i already tell that set hot and cold image list for tool bar.Hot image list is for the image when we focus on the toolbar button.
|
|
|
|
|
Pls give a example for replacing the image in the Image list using Replace method. the 3 parmateter of the Replace method saying some mask. that i couldn't udersttod. Example pls
|
|
|
|
|
I will explain my problem sir, I have three buttons in the toolbar with associated bitmapgreen, Red, Blue. Now When I clicked the Red button, that button color has to changed to Yellow color. Give me example
|
|
|
|
|
Thanks That problem is solved with the follosing code.
hIcon = AfxGetApp()->LoadIcon(IDI_ICON1);
m_wndToolBar.GetToolBarCtrl().GetImageList()->Replace(8,hIcon);
|
|
|
|
|
The mask bitmap is use to make some part of the original image transparent. Thie value have effect only if you have created the image list with flag ILC_MASK .
But I think in your case rather than replacing the ICon in the image list, just change the icon index of the button using the CToolBar::SetButtonInfo() fuction.
|
|
|
|
|
|
Hi,
I need to fill the CMap map and then Pass it to other function as argument. Is it possible? I am getting error while doing this.
e.g CMap<cstring,>, vector<cstring> >cMapPassArg;
-- fill the CMap
-- Call the function func(...,..,cMapPassArg)
-- Called function func(...,...,CMap cMapPassArg);
Mike
|
|
|
|
|
mikert_2008 wrote: I am getting error while doing this.
This is because there is no copy constructor for CMap. So you cannot pass a CMap object by value. How ever you can pass CMap object either as a pointer or reference.
1) As reference
func(...,..,cMapPassArg)
func(...,...,CMap& cMapPassArg);
2) As pointer
func(...,..,&cMapPassArg)
func(...,...,CMap* cMapPassArg);
|
|
|
|
|
In this way...
typedef CMap<CString,LPCTSTR,int,int> MyMap;
void fun1(MyMap& map)
{
}
void fun2(MyMap* pMap)
{
}
void main()
{
MyMap map;
fun1( map );
fun2( &map );
}
Main point is that when passing template object, the function parameter of template should be of the same template types.
- ns ami -
|
|
|
|
|
It's working.
Thanks.
Mike
|
|
|
|
|
You are welcome...
- ns ami -
|
|
|
|
|
How can CMap Argument be pass to function of two different class?
e.g class A
{
typedef CMap <..,..,..,..>cMyMapA;
void func(cMyMapA cMapAgr);
}
class B
{
typedef CMap<..,..,..,..>cMyMapB;
A objA;
objA.func(cMyMapB cMyMapBArg) ?????
}
Thanks:-
Rajiv
|
|
|
|
|
You need to declare the typedef available for both classes. It can be in a common header file.
For Eg,
typedef CMap<.....> MyMap;
class A
{
void fun(MyMap& map)
{
}
}
class B
{
A m_a;
MyMap m_map;
void call()
{
m_a.fun(m_map);
}
}
Hope it is clear...
- ns ami -
|
|
|
|
|
The following code block keeps giving me the following error
CBasePageDlg(UINT pageId, CWnd* pParent, const UINT prevPage = -1, const UINT nextPage = -1)
: CDialog(pageId, pParent), m_pageId(pageId),
m_prevPage(prevPage), m_nextPage(nextPage)
{}
error C2664: 'CDialog::CDialog(LPCTSTR,CWnd *)' : cannot convert parameter 1 from 'int' to 'LPCTSTR'
Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
But I cannot for the life of me figure out why it is not using the UINT version of the constructor.
even changing the code to be...
CDialog((UINT)pageId, pParent)
or
CDialog(UINT(42), pParent)
... gives the same error. Any ideas or suggestions?
|
|
|
|
|
Notice it says int to LPCTSTR , not UINT . The compiler thinks you're passing an int to the base class ctor. Is there another pageId in scope somewhere that's an int ?
|
|
|
|
|
Had a look couldn't find anything else with same name, but just to test, I changed it from pageId to foo . newarly the same result, just now says it cannot convert from UINT to LPCTSTR (which is essentially the same problem)
|
|
|
|
|
I'd have to agree that this is a puzzle.
Luckily, not an important one. Just use the MAKEINTRESOURCE macro, as that's all the UINT version of the CDialog constructor does...
Iain.
Codeproject MVP for C++, I can't believe it's for my lounge posts...
|
|
|
|
|
The class name of your prototype is CBasePageDlg yet you're trying to construct an object of CDialog . Instantiate the former.
Judy
Be wary of strong drink. It can make you shoot at tax collectors - and miss.
Lazarus Long, "Time Enough For Love" by Robert A. Heinlein
|
|
|
|
|
CBasePageDlg inherits from CDialog, so the information for the CDialog constructor gets passed through
|
|
|
|
|
Hi,
I am looking for some help from a programmer to improve this software. This was developed around 1999. There were some older versions as well but this was the last version available as free ware.
I have a lot of interest in programming and many other technical things but how much you can do without learning any thing. So most of I know is self taught with litle help. I think its an open source as when I used PE Explorer. I was able to see about 12 different folders including MENU DIALOG STRING ACCELERATORS TOOLBAR and few other.
I want to make changes like:
1. To add colour pallet to software as it only has 4 basic colours to give to text or background and you have to generate other colours manually.
2. The spell check does not work and I get a message Unable to initialise dictionary file.
3. Change of skin.
4. It does show how many words are in a document but you have to check manually and a new box comes on screen. I want this to work as you are typing at the status bar.
There will few more things depends how much you can help.
===================================================================
SOME CODES I WAS ABLE TO SEE WITH PE Explorer to give you idea which language is this.
28 ACCELERATORS
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
{
"-", 20227, NOINVERT, ALT
VK_0, 20226, NOINVERT, ALT, VIRTKEY
VK_0, 20097, NOINVERT, SHIFT, CONTROL, VIRTKEY
VK_1, 20073, NOINVERT, CONTROL, VIRTKEY
VK_1, 20217, NOINVERT, ALT, VIRTKEY
VK_1, 20098, NOINVERT, SHIFT, CONTROL, VIRTKEY
VK_188, 20230, NOINVERT, ALT, VIRTKEY
VK_190, 20229, NOINVERT, ALT, VIRTKEY
VK_2, 20074, NOINVERT, CONTROL, VIRTKEY
VK_2, 20218, NOINVERT, ALT, VIRTKEY
VK_2, 20099, NOINVERT, SHIFT, CONTROL, VIRTKEY
VK_3, 20075, NOINVERT, CONTROL, VIRTKEY
VK_3, 20219, NOINVERT, ALT, VIRTKEY
VK_3, 20100, NOINVERT, SHIFT, CONTROL, VIRTKEY
VK_4, 20076, NOINVERT, CONTROL, VIRTKEY
VK_4, 20220, NOINVERT, ALT, VIRTKEY
VK_5, 20077, NOINVERT, CONTROL, VIRTKEY
VK_5, 20221, NOINVERT, ALT, VIRTKEY
VK_6, 20222, NOINVERT, ALT, VIRTKEY
VK_7, 20223, NOINVERT, ALT, VIRTKEY
VK_8, 20224, NOINVERT, ALT, VIRTKEY
VK_9, 20225, NOINVERT, ALT, VIRTKEY
"=", 20228, NOINVERT, ALT
VK_A, 20014, NOINVERT, CONTROL, VIRTKEY
VK_B, 20089, NOINVERT, CONTROL, VIRTKEY
VK_C, 20010, NOINVERT, CONTROL, VIRTKEY
VK_C, 20094, NOINVERT, CONTROL, ALT, VIRTKEY
VK_F, 20212, NOINVERT, CONTROL, VIRTKEY
VK_F, 20096, NOINVERT, CONTROL, ALT, VIRTKEY
VK_G, 20034, NOINVERT, CONTROL, VIRTKEY
VK_G, 20208, NOINVERT, CONTROL, ALT, VIRTKEY
VK_H, 20033, NOINVERT, CONTROL, VIRTKEY
VK_I, 20090, NOINVERT, CONTROL, VIRTKEY
VK_I, 20200, NOINVERT, CONTROL, ALT, VIRTKEY
VK_J, 20095, NOINVERT, CONTROL, ALT, VIRTKEY
VK_K, 20036, NOINVERT, CONTROL, VIRTKEY
VK_L, 20103, NOINVERT, CONTROL, VIRTKEY
VK_L, 20092, NOINVERT, CONTROL, ALT, VIRTKEY
VK_N, 19013, NOINVERT, CONTROL, VIRTKEY
VK_O, 20000, NOINVERT, CONTROL, VIRTKEY
VK_O, 20215, NOINVERT, CONTROL, ALT, VIRTKEY
VK_P, 20005, NOINVERT, CONTROL, VIRTKEY
VK_P, 20006, NOINVERT, CONTROL, ALT, VIRTKEY
VK_R, 20212, NOINVERT, CONTROL, VIRTKEY
VK_R, 20093, NOINVERT, CONTROL, ALT, VIRTKEY
VK_S, 20001, NOINVERT, CONTROL, VIRTKEY
VK_S, 20002, NOINVERT, CONTROL, ALT, VIRTKEY
VK_T, 20039, NOINVERT, CONTROL, VIRTKEY
VK_T, 20035, NOINVERT, CONTROL, ALT, VIRTKEY
VK_U, 20209, NOINVERT, CONTROL, ALT, VIRTKEY
VK_V, 20011, NOINVERT, CONTROL, VIRTKEY
VK_DELETE, 20055, NOINVERT, ALT, VIRTKEY
VK_DELETE, 20009, NOINVERT, SHIFT, VIRTKEY
VK_DOWN, 20047, NOINVERT, ALT, VIRTKEY
VK_DOWN, 20047, NOINVERT, SHIFT, ALT, VIRTKEY
VK_END, 20061, NOINVERT, ALT, VIRTKEY
VK_F10, 20112, NOINVERT, CONTROL, VIRTKEY
VK_F10, 20086, NOINVERT, SHIFT, VIRTKEY
VK_F11, 20053, NOINVERT, VIRTKEY
VK_F11, 20022, NOINVERT, CONTROL, VIRTKEY
VK_F11, 20052, NOINVERT, ALT, VIRTKEY
VK_F12, 20205, NOINVERT, VIRTKEY
VK_F12, 20207, NOINVERT, CONTROL, VIRTKEY
VK_F12, 20206, NOINVERT, ALT, VIRTKEY
VK_F2, 20071, NOINVERT, VIRTKEY
VK_F2, 20078, NOINVERT, SHIFT, VIRTKEY
VK_F3, 20079, NOINVERT, SHIFT, VIRTKEY
VK_F4, 20068, NOINVERT, CONTROL, VIRTKEY
VK_F4, 20007, NOINVERT, ALT, VIRTKEY
VK_F4, 20080, NOINVERT, SHIFT, VIRTKEY
VK_F5, 20023, NOINVERT, VIRTKEY
VK_F5, 20127, NOINVERT, CONTROL, VIRTKEY
VK_F5, 20081, NOINVERT, SHIFT, VIRTKEY
VK_F5, 20259, NOINVERT, SHIFT, CONTROL, VIRTKEY
VK_F6, 20024, NOINVERT, VIRTKEY
VK_F6, 20128, NOINVERT, CONTROL, VIRTKEY
VK_F6, 20082, NOINVERT, SHIFT, VIRTKEY
VK_F6, 20258, NOINVERT, SHIFT, CONTROL, VIRTKEY
VK_F7, 20025, NOINVERT, VIRTKEY
VK_F7, 20125, NOINVERT, CONTROL, VIRTKEY
VK_F7, 20083, NOINVERT, SHIFT, VIRTKEY
VK_F7, 20261, NOINVERT, SHIFT, CONTROL, VIRTKEY
VK_F8, 20026, NOINVERT, VIRTKEY
VK_F8, 20126, NOINVERT, CONTROL, VIRTKEY
VK_F8, 20084, NOINVERT, SHIFT, VIRTKEY
VK_F8, 20260, NOINVERT, SHIFT, CONTROL, VIRTKEY
VK_F9, 20031, NOINVERT, VIRTKEY
VK_F9, 20111, NOINVERT, CONTROL, VIRTKEY
VK_F9, 20085, NOINVERT, SHIFT, VIRTKEY
VK_HOME, 20060, NOINVERT, ALT, VIRTKEY
VK_INSERT, 20010, NOINVERT, CONTROL, VIRTKEY
VK_INSERT, 20040, NOINVERT, ALT, VIRTKEY
VK_INSERT, 20011, NOINVERT, SHIFT, VIRTKEY
VK_LEFT, 20063, NOINVERT, ALT, VIRTKEY
VK_LEFT, 20063, NOINVERT, SHIFT, ALT, VIRTKEY
VK_NEXT, 20057, NOINVERT, ALT, VIRTKEY
VK_PRIOR, 20058, NOINVERT, ALT, VIRTKEY
VK_RETURN, 20059, NOINVERT, ALT, VIRTKEY
VK_RIGHT, 20062, NOINVERT, ALT, VIRTKEY
VK_RIGHT, 20062, NOINVERT, SHIFT, ALT, VIRTKEY
VK_SPACE, 20102, NOINVERT, CONTROL, VIRTKEY
VK_TAB, 20114, NOINVERT, CONTROL, VIRTKEY
VK_UP, 20046, NOINVERT, ALT, VIRTKEY
VK_UP, 20046, NOINVERT, SHIFT, ALT, VIRTKEY
VK_X, 20009, NOINVERT, CONTROL, VIRTKEY
VK_Y, 20003, NOINVERT, CONTROL, VIRTKEY
VK_Y, 20004, NOINVERT, CONTROL, ALT, VIRTKEY
VK_Z, 20008, NOINVERT, CONTROL, VIRTKEY
"^H", 20008, NOINVERT, ALT
}
AND
STRINGTABLE
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
{
7138, "Text Color\nText Color"
7142, "Style Sheet\nStyle Sheet"
7143, "Text Style\nText Style"
7144, "Left Tab\nLeft Tab"
7145, "Right Tab\nRight Tab"
7146, "Center Tab\nCenter Tab"
7147, "Deimal Tab\nDecimal Tab"
7148, "Tab Position\nTab Position"
7149, "Tab Leader\nTab Leader"
7150, "Default Tab Stop\nDefault Tab Stop"
7151, "Tabs & Indent Settings (Ctrl+Alt+T)\nTabs & Indent Settings (Ctrl+Alt+T)"
}
=====================================================================
Any help will be really appreciated. Just e mail me so i ca send you this software.
Thanks!
MAG
modified on Thursday, January 29, 2009 8:16 PM
|
|
|
|
|
I dont understand what you're looking for - someone to do your code for you ? well, there's RentAcoder for that, else if you're offering a job/contract, there's a forum here for that - this isnt it....
Else if you have questions about sections of the code, you could post them in the appropriate forum (depending on how much you know it could be a long tedious route to get your software fixed) - it sounds like you really should consider a professional for a short engagement !
'g'
|
|
|
|
|