|
Hello!
As far as I know there is a macro or something like that to get single text-items which are defined in the string-table resoure. I haven't found anything at msdn, but I know there is a macro which is able to get the text from the string table via the ID like GetDlgItem(ID).
Does anybody know what I mean and please can anybody help me? I'm getting crazy...
thanks in advance
fl
I don't want achieve immortality through my work - I want achieve it through not dying - Woody Allen
|
|
|
|
|
LoadString .
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
You tried LoadString, didn't you?
Tomasz Sowinski -- http://www.shooltz.com
What is "scratch" and why can everything be made from it?
|
|
|
|
|
thanks! I have tried LoadString but don't know how to handle the parameters. Finally I've found MAKEINTRESOURCE macro which works well (but needs some typecasting for working with CStrings)
thanks!
I don't want achieve immortality through my work - I want achieve it through not dying - Woody Allen
|
|
|
|
|
CString str;<br />
str.LoadString(IDS_MYSTRING);<br />
|
|
|
|
|
I want to prepare a installer for my application which should be able to start installation program automatically. I have already preapred a setup program using installshield. Now I want to put my application on net and just like Yahoo messanger download I want that setup.exe should be copied to client's side and after completion it should start installation automatically.
Is it possible? Please help me.
|
|
|
|
|
how to get current window hwnd while i am in dlg class ?
r00d0034@yahoo.com
|
|
|
|
|
What do you mean by
i am in dlg class
???
Tomasz Sowinski -- http://www.shooltz.com
What is "scratch" and why can everything be made from it?
|
|
|
|
|
You can always use:
<br />
this->GetSafeHWnd()<br />
.. from within your CDialog derived code (or any CWnd derived class for that matter).
chin.
|
|
|
|
|
CInsDWFirstDlg* pInsDWFirstDlg;
pInsDWFirstDlg=new CInsDWFirstDlg();
pInsDWFirstDlg->Create (IDD_InsDWFirst,this);
pInsDWFirstDlg->ShowWindow (SW_SHOW);
CInsDWFirstDlg is a Modal Window ,but if I use above method to display it ,it is not Modal Window.
I don't want to use pInsDWFirstDlg->DoModal()
How I display it as Modal Window in MDI window ?
thank you
|
|
|
|
|
What does prevent you from using
CInsDWFirstDlg dlg;
dlg.DoModal();
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Has anyone tryed a USB comunications object for sending data to a divice connected to ther USB port
Rich
|
|
|
|
|
Hi
I have a dialog-based application, where a user can either click on buttons or use the keyboard.
Since there are many buttons, I have handled mouse button clicks in the OnCommand handler. Now, I don't want to duplicate keyboard messages. So is there a way to map the keyboard messages to the mouse clicks?
Regards
Sridhar J
|
|
|
|
|
You should rather map keyboard messages to WM_COMMAND directly using accelerator table.
Tomasz Sowinski -- http://www.shooltz.com
What is "scratch" and why can everything be made from it?
|
|
|
|
|
Hello
Thanks for your quick reply.
What I want to do is something like in the windows Calculator. When a number is pressed on the keyboard, the button acts as if it is clicked and the same code as a button click is executed. How do I do this?
Regards
Sridhar J
|
|
|
|
|
sridharj wrote:
When a number is pressed on the keyboard, the button acts as if it is clicked and the same code as a button click is executed
In this case, handle WM_KEYDOWN or WM_CHAR and send BM_CLICK to appropriate button. You'll probably want to map key codes to button control IDs to avoid huge switch(...) statement. Use CMap or std::map for that.
Tomasz Sowinski -- http://www.shooltz.com
What is "scratch" and why can everything be made from it?
|
|
|
|
|
Hello
Thank you very much. Although, I usually do not post thank you messages too often, since it wastes the other persons' time, I feel I can make an exception here.
Please look out, since I have a lot of questions.
Each will have its own thread, since people can read and learn without asking again.
Regards
Sridhar J
|
|
|
|
|
I want to change the cursor to an Hourglass while my program is busy. I thought this would be simple but I cannot find it my books, in the help or on CP, maybe I'm searching for the wrong thing!
Anyway, can anyone tell me how to do it or where to look.
Cheers,
Ali
|
|
|
|
|
BeginWaitCursor(), to change to hourglass
then EndWaitCursor() when done.
chin
|
|
|
|
|
Excellent, thank you very much. I thought it should be simple, just couldn't find it.
Thanks again,
Ali
|
|
|
|
|
Either the Begin..End functions given in the other post, or my personal favourite (if you're using MFC, that is) - add a CWaitCursor object to your functions's variables like so
void CMyClass::DoSomethingThatTakesAges()
{
CWaitCursor xWait;
.. do whatever processing you want here as per usual..
}
Whilst the CWaitCursor object lives, it'll make your mouse pointer into an hourglass, so you can easily drop these as the first line of any function that does any kind of long period of processing (and they can stack quite happily - the mouse stays as an hourglass as long as there is at least one CWaitCursor object alive)
--
Help me! I'm turning into a grapefruit!
|
|
|
|
|
That's neat, and it will fit nicely into my code. Thanks for the tip .
Ali
|
|
|
|
|
Hello,
I am a "new hand" of MDI
I want to know how to open different type of view at the same time in MDI and pass through the data between between it.
or How to open another view when I click the menu bar?
Thx you very much!!!!
Calvin Wong
|
|
|
|
|
Hi,
I will be opening an url through Shellexecute() command.
ShellExecute(hwnd,0,szCommand,0,0,SW_NORMAL);
If my szCommand="file:///f:/mypage.htm#my_cursor"
then it opens mypage.htm but it never points to my_cursor paragraph.
But if i open explorer & copy the above text,it points to particular paragraph.
How can achive this with shellexecute() command?
Thanks
Neha
|
|
|
|
|
Hi
Try using CreateProcess with the name of the application (here it is IE) with a switch style parameter like:
<br />
Iexplore.exe /file:
I am not sure abt this, but you can tweak it a little here and there.
Regards
Sridhar J
|
|
|
|