|
That is dependent upon which font you are using to display the text. Look at the CharMap application. Some fonts have corresponding characters for ^ and v, some don't.
onwards and upwards...
|
|
|
|
|
|
Dear everyone,
I create some CEdit box, the height for example is 20.
and the CEdit box is not multi-line.
But the font size is small, for some function, should
set the text content verticle center or bottom in CEdit.
How can i do?
Welcome any suggestion!
Many thks to u!
Best Regards,
Bosicat
Good Luck
|
|
|
|
|
Sorry, you can't centre the text in an edit box. It can't be aligned with the bottom either. Top-only, I'm afraid
Ryan
Being little and getting pushed around by big guys all my life I guess I compensate by pushing electrons and holes around. What a bully I am, but I do enjoy making subatomic particles hop at my bidding - Roger Wright (2nd April 2003, The Lounge)
Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late - John Nichol "Point Of Impact"
|
|
|
|
|
|
Thomas George wrote:
Do anyone know of a way to set different background and foreground colors for the text on individual toolbar buttons?
WM_CTLCOLOR?
Ryan
Being little and getting pushed around by big guys all my life I guess I compensate by pushing electrons and holes around. What a bully I am, but I do enjoy making subatomic particles hop at my bidding - Roger Wright (2nd April 2003, The Lounge)
Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late - John Nichol "Point Of Impact"
|
|
|
|
|
|
I got a class declared as follows:
class CWordItemList : public CList<CWordItem*,CWordItem*&>{
public:
void AddTail(CWordItemList* pList);
...
};
void CWordItemList::AddTail(CWordItemList *pList)
{
CList<CWordItem*,CWordItem*&>::AddTail(pList);
//the program asserts(ASSERT_VALID) and throws an error
...
}
How should I derive from CList?
|
|
|
|
|
is there a possibility to easy edit a 24bit toolbar in VS.NET?(by editing i mean settind the IDs, rearrange the order,etc..) i cant believe this is not possible, and i have to rearrange, and cut my nice 24 bit toolbar "by hand"
why is there no support for 24bit toolbars??
greets andreas
|
|
|
|
|
Is it possible to subclass a window belonging to another process?
If yes, then how?
|
|
|
|
|
Yes, but only by using a global hook. There is information on MSDN about how to do this.
Basically you set a global hook (usually a WH_CBT hook) from inside a DLL and when the hook function is called by Windows for a particular process, your DLL is loaded into the address space of that process. You can then subclass whichever windows in that process you want. Usually, you set a hook that activates whenever the HCBT_CREATEWND code is passed (a window is created), but if the window is already created, you may never get the opportunity to subclass it.
Ryan
Being little and getting pushed around by big guys all my life I guess I compensate by pushing electrons and holes around. What a bully I am, but I do enjoy making subatomic particles hop at my bidding - Roger Wright (2nd April 2003, The Lounge)
Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late - John Nichol "Point Of Impact"
|
|
|
|
|
|
You're welcome
Ryan
Being little and getting pushed around by big guys all my life I guess I compensate by pushing electrons and holes around. What a bully I am, but I do enjoy making subatomic particles hop at my bidding - Roger Wright (2nd April 2003, The Lounge)
Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late - John Nichol "Point Of Impact"
|
|
|
|
|
Am not sure, but won't using WH_CALLWNDPROC or WH_CALLWNDPROCRET hooks to obtain the handle of the window or its controls after creation then using SetWindowLong() to set the GWL_WNDPROC property could do the job of subclassing the window after its creation?
|
|
|
|
|
WH_CALLWNDPROC hooks are called from the context of the process that calls SendMessage() , not the one that receives the message. As long as a message is sent by the same process as the one you're wanting to subclass the window in, it should be OK.
These will work, but these hook functions are called for every message sent to every window. They substantially slow down the system and are not recommended unless absolutely necessary.
Ryan
Being little and getting pushed around by big guys all my life I guess I compensate by pushing electrons and holes around. What a bully I am, but I do enjoy making subatomic particles hop at my bidding - Roger Wright (2nd April 2003, The Lounge)
Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late - John Nichol "Point Of Impact"
|
|
|
|
|
Hello,
Is there any means to update editboxes individually?
For example I have 3 editboxes (one of which is kept blank & readonly when certain condition prevails). When I update data, the focus moves to the readonly (blank) box. Can anybody help me to overcome this?
Pani
Humble learner
|
|
|
|
|
Use a static text instead of an edit box, unless the user needs to be able to select and copy text out of it. If it has to be an edit box, then call SetFocus() on another window after you update the text box to remove the focus from it.
It the user doesn't need to be able to select and copy text from the edit box, then a static text box is the better option.
Ryan
Being little and getting pushed around by big guys all my life I guess I compensate by pushing electrons and holes around. What a bully I am, but I do enjoy making subatomic particles hop at my bidding - Roger Wright (2nd April 2003, The Lounge)
Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late - John Nichol "Point Of Impact"
|
|
|
|
|
How to close Excel from my c-program, if i've opened it with ShellExecute.
HINSTANCE hInstance= ShellExecute(
GetSafeHwnd(),"open","c:/test.xls",NULL,NULL,SW_SHOWNORMAL);
Thx
|
|
|
|
|
You can't close it that way. Use ShellExecute[b]Ex[/b] you get then a handle to your open Excel instance. The other way is to
find excel with "FindWindow" and then send a "WM_CLOSE" or "WM_SYSCOMMAND - SC_CLOSE" message.
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
A better way would to use CreateProcess instead of ShellExecute, so that you can kill the associated thread or process.
~RaGE();
|
|
|
|
|
@Rage
ok if i create my own process for this, how can I the Excelfile I want to?
If I start it the same way with ShellExecute It would be the same effect. Excel would start in an own process but not in the one i've created for it
|
|
|
|
|
Set the lpCommandLine member of the CreateProcess call to the filename that you want to open.
onwards and upwards...
|
|
|
|
|
Anonymous wrote:
If I start it the same way with ShellExecute It would be the same effect. Excel would start in an own process but not in the one i've created for it
What do you mean ? With CreateProcess , *you* start the excel process. The last parameter of create process, which is a PROCESS_INFORMATION struct, contains the process handle and the starting thrad handle. Use ExitProcess() on the process handle, and you're done.
~RaGE();
|
|
|
|
|
hi,
i am newbie to STL.
i want to know if i have a list for storing struct. after i insert a struct in it, it will store the reference or make of in the list?
my worry is memory leakage if i don't remove the struct properly after remove it from the list.
list<control> ctrllist;
void addtolist()
{
control a;
a.id=1; a.value=10;
ctrllist.push_back(a);
}
void removelist()
{
// how to remove from list properly?
//ctrllist.remove(???)???
}
any help?
thanks,
jim
|
|
|
|
|
the code should like this!
list<<control>> ctrllist;
void addtolist()
{
control a;
a.id=1; a.value=10;
ctrllist.push_back(a);
}
void removelist()
{
// how to remove from list properly?
// ctrllist.remove(???)???
}
|
|
|
|