|
I don't think you understood me. You are selecting your bitmap out before you do the stretchblt. You should select out your bitmap after the stretchblt. I'm actually not sure why you are using CClientDC though. Are you drawing in response to WM_PAINT? Because then you would have a CPaintDC and you should be doing the drawing with it.
|
|
|
|
|
I use windows forms in my project. This project must have multilanguage support. How can I load string from resource (String table) without using MFC. But If mfc is adaptable into windows forms, may be it is used. I don't know this.
|
|
|
|
|
You can use LoadString(..) or LoadResource(..)
Both are Platform SDK functions and not MFC related
|
|
|
|
|
Thanks for your fast replying. How can I use this methods or functions? (LoadStrıng or LoadResource)
|
|
|
|
|
like that :
CString strMainTitle;
strMainTitle.LoadString(IDS_MAINTITLE);
this->SetWindowText(strMainTitle);
TOXCCT >>> GEII power
[VisualCalc 3.0 updated ][Flags Beginner's Guide new! ]
|
|
|
|
|
CString is in MFC library. But I must load string without using MFC library.
|
|
|
|
|
|
|
int LoadString( HINSTANCE hInstance,
UINT uID,
LPTSTR lpBuffer,
int nBufferMax
);
Unfortunately, I couldn't understand first parameter of this function. Can you explain this parameter?
|
|
|
|
|
int LoadString( HINSTANCE hInstance,
UINT uID,
LPTSTR lpBuffer,
int nBufferMax
);
Unfortunately, I couldn't understand first parameter of this function. Can you explain?
|
|
|
|
|
If the StringTable is in the same application then you can pass NULL as first parameter
|
|
|
|
|
"error C3861: 'LoadString': identifier not found, even with argument-dependent lookup"
Can you tell me that what is the reason of this error? All the parameter of this functon are correct as given below.
TCHAR sz[160];
LoadString(NULL,IDYES,sz,sizeof(sz));
|
|
|
|
|
check by incuding "windows.h"
|
|
|
|
|
mehmetned wrote: How can I use this methods or functions? (LoadStrıng or LoadResource)
See here.
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
First of all i'm working in a MDI evironment
I want to create a CDialog that would kind off stay on the background of all other windows so i've placed it in the MainFrm Object:
VERIFY(pMainFrame->m_InitialDlg.Create(CInitialDlg::IDD, pMainFrame));
VERIFY(pMainFrame->m_InitialDlg.SetWindowPos(&wndBottom, 0, 0, 0, 0, SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE));
The trouble is that m_InitialDlg stays on top of all the other Windows (the Doc/View/Frame ones) Any ideea how to fix this?
Is there a beter way of doing it that does not require the CDialog..?
-- modified at 5:01 Tuesday 11th July, 2006
|
|
|
|
|
eusto wrote: The trouble is that m_InitialDlg stays on top of all the other Windows (the Doc/View/Frame ones) Any ideea how to fix this?
Set the dialog's parent to NULL . Since the MDI frame is the parent hence it stays on top of it.
Nibu thomas
A Developer
Programming tips[^] My site[^]
|
|
|
|
|
Tried it with null also it's still a modal window and hence it has top most style (as opposed to views)
|
|
|
|
|
eusto wrote: Tried it with null also it's still a modal window and hence it has top most style (as opposed to views)
How are you displaying it. Are you calling DoModal() or ShowWindow().
Nibu thomas
A Developer
Programming tips[^] My site[^]
|
|
|
|
|
|
eusto wrote: ShowWindow
I am surprised. Then how is it being displayed as a modal dialog. Are you able to interact with the parent window.
Nibu thomas
A Developer
Programming tips[^] My site[^]
|
|
|
|
|
I'm able to interact with the parent window..in fact it's just as if it weren't there. I can push buttons and stuff on views behind it...It's just that it is drawn on top of all other modeless windows. It's quite odd..try it, you'll see. Just create a MDI project, add in a dialog, add a member to that dialog to your mainframe class and call:
VERIFY(pMainFrame->m_InitialDlg.Create(CInitialDlg::IDD, pMainFrame));
VERIFY(pMainFrame->m_InitialDlg.SetWindowPos(&wndBottom, 0, 0, 0, 0, SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE));
in OnCreate method of the MainFrame class
|
|
|
|
|
eusto wrote: VERIFY(pMainFrame->m_InitialDlg.SetWindowPos(&wndBottom, 0, 0, 0, 0, SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE));
What about simple ShowWindow() Is that of any use.
Nibu thomas
A Developer
Programming tips[^] My site[^]
|
|
|
|
|
It's actually the same thing. SetWindowPos gives more options. I guess i could play with showwindow(sw_show)/showwindow(sw_hide) depending wether or not there are open documents but that's not a nice thing.
|
|
|
|
|
eusto wrote: VERIFY(pMainFrame->m_InitialDlg.Create(CInitialDlg::IDD, pMainFrame ));
This is the problem I guess. You are setting the parent to pMainFrame . Hence it stays on top of the frame. Give NULL and it will go behind.
Nibu thomas
A Developer
Programming tips[^] My site[^]
|
|
|
|
|
Ok, now my code looks like this:
VERIFY(pMainFrame->m_InitalDlg.Create(CInitialDlg::IDD, NULL));
pMainFrame->m_InitalDlg.ShowWindow(SW_SHOW);
It's still the same thing. Actually now i can't even press the buttons on m_InitialDlg.
This is the dialog's style:
DS_SETFONT | DS_3DLOOK | DS_FIXEDSYS | DS_CONTROL | DS_CENTER | WS_CHILD
|
|
|
|