|
Hi,
Please can someone help me. I have designed an App in MFC on Windows 2000. There are a lot of dialogs in this application which are 'skinned' (in the resource editor) by images I have created in photoshop. I am trying to transfer the code to Windows XP and have found that the dialogs I have created have increased in size. This is a problem as all of the controls on the dialog are misplaced compared with the bitmap underneath. Does anyone know why this is?
Any help would be grealy appreciated?
Thanks in Advance ,
Richard
|
|
|
|
|
Is your WinXP system running with large fonts?
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
When you use a skinned window, you should usually turn off themes for your window, so the physical dimensions are the same as previous versions of windows.
SetWindowTheme ( hwndYourWindow, L"", L"" );
--Mike--
Personal stuff:: Ericahist | Homepage
Shareware stuff:: 1ClickPicGrabber | RightClick-Encrypt
CP stuff:: CP SearchBar v2.0.2 | C++ Forum FAQ
----
You cannot truly appreciate Dilbert unless you've read it in the original Klingon.
|
|
|
|
|
I've finally reached my limit on adware and tracking software, to that point that there's so much protection software now running on my development system that it's getting hard to get real work done.
The last straw was SpamNET; a P2P email anti-spam application that seemed to be the best thing since sliced bread, until I realized they're accessing Internet Explorers Cookie and History index files and uploading that data.
I want a utility or good pointer to info that will allow me to restrict access to particular files on a per-process basis (e.g. only allow IEXPLORE.EXE access to ..\Content.IE5\index.dat).
I'm familiar with process wide hooking and filter drivers, but would like this to have minimal impact on the system and don't want to start from scratch unless absolutly necessary. What's the best way?
Thanks In Advance!
nb
|
|
|
|
|
I've used a method that DavidCrow gave me to iterate through all the messages in a user's inbox. That works fine. But the _MailItem object has functions for GetSenderName, which returns the name (John Doe), and also the subject, body and HTMLBody. But I can't get the sender's email address. Any help on how I may be able to do that? Thanks in advance
If it's broken, I probably did it
bdiamond
|
|
|
|
|
Hi
My company is looking for a visual c++ (MFC) programmer to freelance on a few small apps we need writing.
We have written a few simple apps before but just don't have the time anymore so would rather call in an expert.
Serial and IP experience required. Experience with graphics and bitmaps a must.
Located in wimbledon, SW london
Get in contact if you think you may be able to help.
Best regards
Scott
|
|
|
|
|
In the sample code given with crystal report 'Pro Salaries' it gives an error on the line which says :
m_Report = m_Application->NewReport();
the error is mentioned in subject.
Please send an immidiate reply please...
|
|
|
|
|
Hello..
I'm reading a book that describes how I can use build in wizards in Visual Studio 6.0 to add message handlers. It tells me to right click the class, and click add windows message handler.. But i'm using VC7.0.. Where can I find this functionallity? Specifically I want to add an OnCreate handler.
|
|
|
|
|
A message handler is just another function.
In your header file add this declaration:
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
In your implementation file where it says,
BEGIN_MESSAGE_MAP(CYourWindow, CWnd)
this is where you tell it what method is going to handle which message.
Add this ON_WM_CREATE() somewhere in the MESSAGE_MAP.
Then add your function to the implementation file like this:
int CYourWindow::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
}
BTW, I'm assuming MFC is used. Otherwise you'll have this huge switch statement to modify.
"We have done so much in the last 2 years, and it doesn't happen by standing around with your finger in your ear, hoping everyone thinks that that's nice." - Donald Rumsfeld
|
|
|
|
|
Yes, but I was getting tierd of writing code like that and wanted the wizard to do it for me. I just can't seem to find the "Add Message Handler"-wizard in VC 7.0.
|
|
|
|
|
If its in a dialog, you can right click on the control.
"We have done so much in the last 2 years, and it doesn't happen by standing around with your finger in your ear, hoping everyone thinks that that's nice." - Donald Rumsfeld
|
|
|
|
|
But it's not. My book tells me to "Right-click CMainFrame in the ClassView window, select Add Windows Message Handler, double-click WM_CREATE, and click Edit Existing. You'll find yourself in the empty message handler body, poised to type in the finished code. ClassWizard has already done everything else, including adding an ON_WM_CREATE entry to the message map."
But there's no "add windows message handler" in VC 7.0(at least I can't spot it)
|
|
|
|
|
You can also go to class view, click on the class, right-click and go to properties. Then click on the messages button and add your handler.
"We have done so much in the last 2 years, and it doesn't happen by standing around with your finger in your ear, hoping everyone thinks that that's nice." - Donald Rumsfeld
|
|
|
|
|
Aah, thank you.. Exactly what I was looking for!
|
|
|
|
|
join the freaking club
why oh why did they get rid of class wizard???
"there is no spoon" biz stuff about me
|
|
|
|
|
In MFC (VC6.0) how do I remove a start-menu folder?
I can delete all of the items, but however I try to delete the folder (_rmdir, SHFileOperation) I get a permission denied error.
Any suggestions? It looks like the shell keeps a lock on the folder.
|
|
|
|
|
I'm curious why you'd want to remove the Start Menu folder. Trying it yields a "Start Menu is a Windows system folder and is required for Windows to run properly. It cannot be deleted." message.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
Bad wording on my part. A menu ON the start menu. We have an application that re-installed itself somewhere different during an update leaving people with a bad shortcut on the start menu.
I've worked out a program to delete all of the .lnk files pointing to the old directory, but was having trouble deleting the directory.
Since my original post I've realized that the problem was that I was trying to remove the directory while a FindFile was still pending on the directory. Once I moved the delete routine to another part of the program all worked fine.
Thanks
|
|
|
|
|
How can I change the language at run-time. I use resource-only dll's for the different languages and set it in the MFC method CWinApp::InitInstance with AfxSetResourceHandle before the MainFrame is loaded. How can I do this, when the MainFrame is already loaded. What do I have to do besides the AfxSetResourceHandle, that even the Menu and all the dialogs are now in the new language? Thanks for any help.
Konrad
|
|
|
|
|
Hi
In one column of List Control i want to show the image but not the values, but with my code(pasted below) it is showing both the image and values. Can any body help me how can i achieve this.But i need to associate the values also because i am doing sorting also on that column
//Set up Record Status
Holder = pRecordSet->GetCollect("RecordStatus");
status = Holder.iVal;
temp.Format("%d",status);
m_RecordList->SetItemText(iNew,5,temp);
// setup record status
lvI.mask=LVIF_IMAGE ;
lvI.iItem= iNew;
lvI.iSubItem=5;
if(status == eCIT_STATUS_COMPLETE)
lvI.iImage = 1;
else if(status == eCIT_STATUS_VOID)
lvI.iImage = 3;
else
lvI.iImage = 0;
m_RecordList->SetItem(&lvI);
Thanks
Shailesh
|
|
|
|
|
aman2006 wrote:
i want to show the image but not the values
Isn't the call to SetItemText() what's showing the value?
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
SetItemText() is showing the value but how can i associate a value with the image so that i can sort by clicking on header. But it is showing both values and Image.
Thanks
shailesh
|
|
|
|
|
aman2006 wrote:
how can i associate a value with the image...
Call SetItemData() .
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
Hey this is the situation now but it is not sorting when i click on the header column.
//Set up Record Status
Holder = pRecordSet->GetCollect("RecordStatus");
status = Holder.iVal;
m_RecordList->SetItemData(iNew,status);
// setup record status
lvI.mask=LVIF_IMAGE ;
lvI.iItem= iNew;
lvI.iSubItem=5;
if(status == eCIT_STATUS_COMPLETE)
lvI.iImage = 1;
else if(status == eCIT_STATUS_VOID)
lvI.iImage = 3;
else
lvI.iImage = 0;
m_RecordList->SetItem(&lvI);
Any Suggestion
Thanks
|
|
|
|
|
aman2006 wrote:
...it is not sorting when i click on the header column
And what does the handler code for that look like?
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|