|
I will look for them, thanks.
If you have a short example , it would be great.
|
|
|
|
|
LONG lCurrentStyle = ::SetWindowLong(hwnd, GWL_STYLE);
lCurrentStyle |= WS_OVERLAPPEDWINDOW;
::SetWindowLong(hwnd, GWL_STYLE, lCurrentStyle);
Check out the docs for SetWindowLong(). You may need to call SetWindowPos() or other API
after setting certain styles.
|
|
|
|
|
Thank you for help!
I understand how it works now. And it works well
Problem solved.
|
|
|
|
|
You can use ModifyStyle , too.
ModifyStyle(0,WS_OVERLAPPEDWINDOW );
|
|
|
|
|
It looks like what I was searching for, but... I can't find it.
I'm not using MFC, CView Cstatic etc...
I'm using "windows.h" with HWND etc...
Where can I find this method or something similar ?
|
|
|
|
|
You need to use SetWindowLong then.
e.g. If you want to add WS_CHILD style to a window you can do like this,
SetWindowLong(hWnd,GWL_STYLE,WS_CHILD);
|
|
|
|
|
Thank you
|
|
|
|
|
Hi people,
Code C++ with header files included after compile in visual studio 6?
I would like see this code.
Somebody help me?
Thx!!
|
|
|
|
|
John Shaft wrote: Code C++ with header files included after compile in visual studio 6?
I don't understand what you are asking ?
code what ?
|
|
|
|
|
I would like to see source code of header files and pragmas used in my source, when I compile in Visual Studio 6. I wanna see complete source code. Intermediate files?
It's possible?
Sorry by my English.
Thx!
|
|
|
|
|
ok, I get it.
I'm not certain you can do it from WITHIN VC6, or if the command line CL.exe ( or whatever it's called ) can do this.
with G++ ( gnu/linux compiler ) you can call the compiler with the -E switch to preprocess the file.
The keyword here is preprocess, this will "expand all the headers, #defines and other stuff.
for your information this can create a BIG file.
I created the following program :
#include <iostream>
int main()
{
std::cout << "tata";
return 1;
}
and generated the preprocessed file and the file is 600+ K. ( 24000 lines )
have a look at the CL.exe documentation on MSDN to see if there's a switch to preprocess the file.
|
|
|
|
|
hi all
how to create and terminate a process using WMI
Can i have c++ code for it
Thanks
abhi
|
|
|
|
|
Hi,
I have my own file format and a program loading those files.
Under Windows XP i got the automatic file asssignment working, but it doesn't work under windows Vista. So i think i didn't do it correctly under XP, maybe it only works there by accident .
Do you guys know how to automatically assign (what to write into registry) a file format to a program (which also works under Windows Vista)?
Here is how i do it:
<br />
void RegisterFileType(const String& extension,<br />
const String& fileRegisterName,<br />
const String& fileExplorerName)<br />
{<br />
TCHAR buffer[1024];<br />
GetModuleFileName(NULL, buffer, 1024);<br />
CString applicationFileName = buffer;<br />
<br />
CRegistry keyFileExtension;<br />
keyFileExtension.CreateKey(HKEY_CLASSES_ROOT, extension.AsChar());<br />
CString standard = _T(fileRegisterName.AsChar());<br />
keyFileExtension.SetValue("", standard);<br />
keyFileExtension.CloseKey();<br />
<br />
CRegistry LMFile;<br />
CString fileName = _T(fileExplorerName.AsChar());<br />
LMFile.CreateKey(HKEY_CLASSES_ROOT, standard);<br />
LMFile.SetValue("", fileName);<br />
LMFile.CloseKey();<br />
<br />
CRegistry keyDefaultIcon;<br />
CString defaultIcon = standard;<br />
defaultIcon += "\\DefaultIcon";<br />
keyDefaultIcon.CreateKey(HKEY_CLASSES_ROOT, defaultIcon);<br />
CString iconPath = applicationFileName + ", 0";<br />
keyDefaultIcon.SetValue("", iconPath);<br />
keyDefaultIcon.CloseKey();<br />
<br />
CRegistry shell;<br />
CString shellPath = standard;<br />
shellPath += "\\shell";<br />
shell.CreateKey(HKEY_CLASSES_ROOT, shellPath);<br />
shell.CloseKey();<br />
<br />
CRegistry open;<br />
CString openPath = standard;<br />
openPath += "\\shell\\open";<br />
open.CreateKey(HKEY_CLASSES_ROOT, openPath);<br />
open.CloseKey();<br />
<br />
CRegistry command;<br />
CString commandPath = standard;<br />
commandPath += "\\shell\\open\\command";<br />
command.CreateKey(HKEY_CLASSES_ROOT, commandPath);<br />
CString a = "\"";<br />
CString cs = a + applicationFileName + a + CString(" ") + a + CString("%1") + a;<br />
command.SetValue("", cs);<br />
command.CloseKey();<br />
}<br />
Do i miss anything? Or do i do something incorrectly?
Hope you guys can help me!
Thanks a lot in advance and i hope to hear from you soon.
- Ben
|
|
|
|
|
Can anyone please help me? I would really appreciate it!!!
Anyone already got the file assignment working under xp? Maybe i just do it wrong?
|
|
|
|
|
Maybe I'm reading your code incorrectly (i'm still in my first cup-o-tea this morning) but
it looks like youi create the extension key in HKEY_CLASSES_ROOT which is fine but all the
rest of the keys are created off HKEY_CLASSES_ROOT as well instead of under the extension key.
Am I reading it wrong?
This article may help...
Associate File Extension with Shell OPEN command and Application[^]
|
|
|
|
|
Can anyone help provide a method to add checkbox controls programatically. I would like to read in a file that contains the names of the checkboxes to be created and displayed. The file contents will not stay the same thus the need to create these at runtime. Thanks.
sd
|
|
|
|
|
|
Or you can use of
CButton m_Button;
m_Button.Create("Test",WS_CHILD|BS_AUTOCHECKBOX|WS_VISIBLE,CRect(0,0,100,23),this,1);
</code>
|
|
|
|
|
Hello,
We cants add checkbox at run time.
What we can do is:
Add the Check Box in ur Dialog.
After you read the Name of checkbox from file,u can change the lable of ur check box easily.
If you want to display check box at run time only then you can hide them previously and then use ShowWindow(SW_SHOW) method to make those check box visible.
Abhijeet
|
|
|
|
|
I would like some advice about how to proceed with this little problem. I am developing a set of classes which can both read and write to the infamous index.dat internet cache files. These files are permanently locked from within wininet.dll. I should also point out they are memory mapped files being shared between multiple processes.
Is there any way my own process could access the files, without using wininet.dll, and without causing read/write problems while processes like Iexplorer is using it?
|
|
|
|
|
How does one set the size of the text displayed in a CEdit (or RichEdit)? I can set up a RichEdit control so that new user input is displayed using the correct font, but data in the control populated by the app (SetDlgItemTextA(IDC_RICHEDIT21,_T("7.0"))) uses the default font.
Lee
|
|
|
|
|
For a CEdit, you'd need to create the font you want, and use SetFont. For text in a Richedit, as a guess, change the text selection to include all the text, and then use GetCharFormatSelection(), modify the font, and use SetCharFormat?
I haven't tried this, since I tend to allow the user to control what's in there instead. There should certainly be a message to allow you to set the format (including the font used).
Steve S
Developer for hire
|
|
|
|
|
Do you want to save this font for next run app?
|
|
|
|
|
I have a CFormView application that has alot of edit boxes
and so the right-hand scroll bars appear. They only way
to scroll down is to move the mouse over, click on the scroll
bars and scroll down.
How can I activate the mousewheel so that spinning that makes
the scrollbars move down?
Please, any response any one can give me will be greatly appreciated.
Sincerely,
Danielle Brina
|
|
|
|
|
Hi, I'm creating a variable, m_ulCounter, as
psuedo code below, non-compilable
Static declaration behaviour within MFC dialog
class blahDlg : public CDialog
{
//stuff
private:
static unsigned long m_ulCounter;
//stuff
};
Can I expect this static variable to act as its C counter parts - retaining it's value even though it might go in and out of scope?
Thanks.
|
|
|
|