|
|
Hello,
Thanks for your reply.You have been helpful always.
I have been to the above link before asking you the question and went through CDialogTemplate class but I don't think it will be of any use to me.
I do not have a dialog resource.
MyDialog is class derived from CDialog.
This is my code.
MyDialog dlg;
DLGTEMPLATE *d = new DLGTEMPLATE;
d->x = 10;//(short)m_Rect.left;
d->y = 10;//(short)m_Rect.top;
d->cx = 200;//(short)m_Rect.Width();
d->cy = 200;//(short)m_Rect.Height();
d->style = WS_CAPTION | WS_SYSMENU | WS_VISIBLE | DS_SETFONT;
d->cdit = 0;
int iRet = dlg.InitModalIndirect(d);
dlg.DoModal();
In the above code iRet = 1 when debugged but the dialog box is not seen.
Thanks
Prithaa
|
|
|
|
|
I think if you look at the documentation for the DLGTEMPLATE Structure[^], you'll see
you're missing other items following the structure.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
hi...
i am doin file drag and drop opertion. while dropping a file i need to display the paticular file image also in richtext box.
For example: i am dropping a word document file means,then i need to display the word doc file icon in richtext box).
is any one know how to do...or any regerence links....
ple reply me...
thanks
|
|
|
|
|
You might want to lookup SHGetFileInfo . Here's a snippet that fetches the icon associated with a file and renders it onto a DC.
SHFILEINFO fileInfo = { 0 };
DWORD dwStatus = SHGetFileInfo( _T( "bing.pdf" ), 0,
&fileInfo, sizeof( SHFILEINFO ),
SHGFI_ICON | SHGFI_LARGEICON );
dc.DrawIcon( 10, 10, fileInfo.hIcon );
|
|
|
|
|
Dear all
what is difference between DLL and Static library. thanks. and how to make it and to use it?
thanks
Li Zhiyuan
29/06/2007
|
|
|
|
|
A DLL is a piece of code that resides in a separate file that your application typically loads (implicitly or explicitly) and executes at runtime. A static library is a piece of code that you link to when you build your application, which means that all the code that you are referring to in the static library gets copied into your executable.
How to create and use them? You really should get a book or something! A little googling might help as well.
|
|
|
|
|
See here[^] does helpful?
|
|
|
|
|
Dear all
when i built my simulation, output showed below:
atal error RC1015: cannot open include file 'res\DSplit.rc2'.
Error executing rc.exe.
when i went to ResourceView,clicked Resource file, but computer showed: load failed.
what happened?
thanks a lot
Li Zhiyuan
29/06/2007
|
|
|
|
|
Check if the resource file still exists in your projects working directory ...
Regards,
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
My Blog: ^_^
|
|
|
|
|
Hi all,
I m trying to make an activex control and i hav added some custom properties to it and made the Get/Set functions thru the wizard bar.
i made the control sucessfully.
But .....
The problem begins when i insert the control to another project
it makes 2 file one is "control.h" and other is "control.cpp"
which contains the declration and code of the activex component.
in place of custom property decralation in .h the IDE says that type of functions i.e get and set are in valid
It rather writes :-
"property 'ShowFrame' not emitted because of invalid type"
how can i resolve it pls help me out
thank you
Regards,
Pankaj Sachdeva
|
|
|
|
|
sending a string as keyboard keystrokes wrongly
as u can see from my following code, KeyBoadText() is a function that accepts a string and then type the string out as if it was typed using the keyboard. but now i am having problem when my typetext = "abc"
instead of typing "abc", it types "123". how can i solve this?
[CODE]
void CStocksmsDlg::KeyBoardText(CString typetext)<br />
{<br />
<br />
int text_len = typetext.GetLength();<br />
<br />
<br />
for(int i =0; i<text_len; i++)<br />
{<br />
INPUT Input[2];<br />
KEYBDINPUT ki;<br />
<br />
ki.dwFlags = KEYEVENTF_EXTENDEDKEY | 0;<br />
ki.time = 0;<br />
ki.wScan = 0;<br />
ki.wVk = typetext.GetAt(i);<br />
Input[0].type = INPUT_KEYBOARD;<br />
Input[0].ki = ki;<br />
ki.dwFlags = KEYEVENTF_EXTENDEDKEY | KEYEVENTF_KEYUP;<br />
ki.dwFlags = KEYEVENTF_KEYUP;<br />
Input[1].type = INPUT_KEYBOARD;<br />
Input[1].ki = ki;<br />
SendInput( 2, Input, sizeof(INPUT) );<br />
}<br />
<br />
} [/CODE]
|
|
|
|
|
u r sending keys "abc" of ascii 97,98,99 which stands for VK_NUMPAD1,VK_NUMPAD2,..
If u want print 'abc' then turn off capslock and send "ABC"
see "winuser.h"
|
|
|
|
|
I have some requriement to convert the text form one language from to ohter.Say I have the some text in the .txt file(Englis), i need to convert the text into other language(Korean).Plz suggest me is there any way to do this.
With regards,
Kishore V
kishore
|
|
|
|
|
How is this a Visual C++ / MFC question?
Nobody can give you wiser advice than yourself. - Cicero
|
|
|
|
|
you cant simply change the system language and hope your file to be changed to tht language, ya but there are ways,
|
|
|
|
|
Google language tools here[^] can do a rough translation.
|
|
|
|
|
|
I work with Visual C++ (currently in Visual Studio2005) on win xp. I have a resizable dialog bar - from a class I derived from CDialog bar to be resiable. The dialog box contain a list box and some button at bottom. Dialg bar is covering entire length of MDI. When i am resizing the main window the dialog bar is also resizing. But at resulution ( 1280 * 1024 ) pixels it covers only the 3/4 length of MDI.
What I did is increasd the length of the dialog bar in resource and that solved the problem. But is this right way of doing this or is there some method to increase the lenght of dialog at runtime.
Sandip
|
|
|
|
|
Can anybody give me a working version of portuser.cpp of Gary Nebbet,
i mean i must compile it properly with DDK2000/XP and PlatformSDK.
Thank you very much.
|
|
|
|
|
What will be best way of providing security to our application in MFC.I mean how to generate installation key to our Applicationn. can u post your suggestions..
Thaking you
swamy
|
|
|
|
|
See here[^], I hope it helps you.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Hi _AnShUmAn_,
Thaking for giving this article. But Iam asking about "In what basis we will generate the key" i.e., either by using System Hard Disk Serial number or MAC address??
Thanking you,
swamy.
|
|
|
|
|
Hi Experts,
Can i use CHtmlView to display html as well as text data.If yes,how to get a pointer of CHtmlView
CHtmlEditCtrl *HtmlCtrl=&Get?????????();
|
|
|
|
|
If you want to show html file or text file with ChtmlView you can do it.
|
|
|
|