|
See an example in msdn "IconPro" but im not sure it convert bmp to icon(its for extract icon form dll/exe)
|
|
|
|
|
In MSPaint do a 'select all; copy'
then in VS do 'File->New->File...->Icon file'
then 'paste'
----------------------
Mayank Thakore
Learning C++ - since 1998
They didn't print my card right; so I resigned.
|
|
|
|
|
Hi all,
Does anyone know how to create a registry entry. Nothing to complex just a normal registry entry. So if anyone knows of a site or have a small piece of code ...
Thanx in advance
Regards
Programm3r
|
|
|
|
|
Using MFC? Straight Win32?
Here's an example using straight Win32 calls. As you can see using a wrapper class as provided by MFC of ATL (and no doubt many others) would make things a lot simpler.
--------------------
// Create or open the key.
HKEY hKey;
LONG res = RegCreateKeyEx(
HKEY_CURRENT_USER,
_T("Software\\My Company\\My Product"),
0,
NULL,
REG_OPTION_NON_VOLATILE,
KEY_ALL_ACCESS,
NULL,
&hKey,
NULL
);
if (res==ERROR_SUCCESS)
{
// Now write a value in the key we opened/created.
DWORD Value = 5; // Value to write to registry.
res = RegSetValueEx(
hKey,
_T("My value"),
0,
REG_DWORD,
reinterpret_cast<const BYTE*>(&Value),
sizeof(Value)
);
// Close the key.
RegCloseKey(hKey);
}
Steve
|
|
|
|
|
Thanx for the responce.
Straight Win32, wanna put it in a win32 dll.
Regards
Programm3r
|
|
|
|
|
try ATL::CRegKey class
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
|
Thanx for the help....
Regards
Programm3r
|
|
|
|
|
Hi, i want to create an SDI application without Frame And Menu bars.
And in this SDI application ,i split the window into 3 views.
How can i close all the views at a time by clicking one button in the top view?
|
|
|
|
|
kiranin wrote: want to create an SDI application without Frame And Menu bars
Create window without using style WS_OVERLAPPEDWINDOW .
kiranin wrote: And in this SDI application ,i split the window into 3 views.
How can i close all the views at a time by clicking one button in the top view?
Look for splitterwindow.
By the way, you have posted this question already, isn't it?
|
|
|
|
|
I tried But it only closes maximize, minimize and close buttons only Still caption Bar is Coming and also menu
|
|
|
|
|
kiranin wrote: I tried But it only closes maximize, minimize and close buttons only Still caption Bar is Coming and also menu
Are you sure ?
I talked about removing style WS_OVERLAPPEDWINDOW .
Can you show me how you have implemented in your code?
One way is to 0 use ModifyStyle to remove this style in OnCreate
|
|
|
|
|
BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
{
if( !CFrameWnd::PreCreateWindow(cs) )
return FALSE;
// TODO: Modify the Window class or styles here by modifying
// the CREATESTRUCT cs
cs.style &= ~WS_THICKFRAME;
cs.style &= ~WS_OVERLAPPED;
// optional - set initial window size
cs.cx = 400;
cs.cy = 670;
return TRUE;
}
|
|
|
|
|
Use ModifyStyle(WS_OVERLAPPEDWINDOW,0) in OnCreate of your function, instead of this.
|
|
|
|
|
How to Close and minimize the whole Application bu using a button in the top View.
And How to Paint menu or remove it?
|
|
|
|
|
kiranin wrote: How to Close and minimize the whole Application bu using a button in the top View.
send message WM_CLOSE for close button. and minimizing you need to use ShowWindow().
kiranin wrote: And How to Paint menu or remove it?
If you have use WS_OVERLAPPEDWINDOW style, there will be no menu.
|
|
|
|
|
|
kiranin wrote: menu is there yaar
You are doing some thing wrong. Try my suggestions above on sample SDI app.
|
|
|
|
|
How to Send WM_ClOSE MESSAGE TO THE BUTTON?
|
|
|
|
|
use,
PostMessage(AfxGetMainWnd(),WM_CLOSE,0,0);
|
|
|
|
|
Hi all,
How can I read from a dxf file format Using VC++ ,
Please Help me
Thanks in Advance
George K Jolly
|
|
|
|
|
georgekjolly wrote: How can I read from a dxf file format Using VC++ ,
this doesn't mean anything. you have to know what is stored in this file, if it is binary or text file first. if it is binary, you have to know what is structure of the datas.
what application does generate such .dxf files ?
|
|
|
|
|
I think it depends to AutoCad
|
|
|
|
|
|
Hi,
On a toolbar I am working on, the button is erased but it still responds to mouse clicks. I have already tried NOT to ANSWER the WM_ERASEBKGND; use BeginPaint-EndPaint, or GetDC-ReleaseDC instead, but the background is either erased or it is completely transparent and not drawn. Either way, the button does not show, but is active. Now, if I don't respond to WM_PAINT messages, the toolbar is correctly drawn, and the button is ok...
Do you know what I should do?
ThanX
mfranco
|
|
|
|