|
So it's not part of CDialog. it's part of CWnd right? then how the creation with template name specified occurs?
|
|
|
|
|
Sarath. wrote: then how the creation with template name specified occurs?
i dont understand what u mean. In what ever way create the dialog, atlast ::CreateDialogIndirect(..) funtion is called.
nave
|
|
|
|
|
Sarath. wrote: You should remove this code from your constructor.
That code is fine. It was the extra Create() call that was the problem. Note the assertion indicated exactly what the problem was (i.e., the window handle was non-NULL ).
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hope I understood your question
<br />
CMyDlg *mydialog;<br />
mydialog=new CMyDlg(this);<br />
<br />
CMyDlg::CMyDlg(CWnd* pParent)<br />
: CDialog(CMyDlg::IDD, pParent)<br />
{<br />
Create(pParent);<br />
ShowWindow(SW_NORMAL);<br />
}<br />
|
|
|
|
|
Sachin Gedam wrote: Now I am facing a problem, how to get this abbreviation from client side?
Why aren't you using GetTimeZoneInformation() ?
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
i want client's(web browser) time zone information.. now i store time zone related information in xml file and to access particular time zone information only time zone abbrevatoin is only the way
Sachin Gedam
(Software Engg.)
Pune India
|
|
|
|
|
I don't quite follow you. You wanted to know how to obtain the timezone using Visual C++. I suggested you use GetTimeZoneInformation() . Now you are talking about browsers and XML files. What exactly is it that you are looking for?
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hi..can anyone help me out of thiss???
i trying to load a a ImageList of 24Bit Color Bitmap , but when it draw on a Static Control ot Losses it Quality to 16 Color im doing this to load a Image List :
/////////////////////////////////////////////////////////
[B]
CImageList m_imgList;
HIMAGELIST hImageList = ::ImageList_LoadImage ( AfxGetInstanceHandle(),
_T("d:\\total.bmp"),
64, 32,
RGB(255,255,255),
IMAGE_BITMAP, LR_LOADFROMFILE);
if(NULL != hImageList)
{
BOOL bRet = m_imgList.Attach(hImageList);
HICON m_hIco = m_imgList.ExtractIcon(0);
//CStatic Control on Dialog with SS_ICON
m_bBitmap.SetIcon(m_hIco);
}
/////////////////////////////////////////////////////////[/B]
i also tried to Draw the Extracted Image to Dialog box by calling the Funtion in CImageList
Draw(....); and DrawIndirect(...); and same problem done in this Also.. the Quality of Image loss
please please help me out of this
|
|
|
|
|
It's my recollection that you need to create an empty image list and copy the 24 bit images into it in order for them not to revert to the lower bit depth.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
thnx for reply... but can you tell me how to copy the 24bin image to CimageList.. and i want to Animate the Images, but if i load one by one image into the Imagelist in Startup initailization then it takes a lot resource and thr will be lots of bitmap image files in the skin folder. like if i want to create a animation of 20 frames then user have to create the 20 images , and i think its better if we use a Image List instead of loading a Single bitmap into imagelist without lossing qualit !
please tell me a way out of this.. thnx
|
|
|
|
|
There are actually articles on this site with 24 bit images in toolbars. It would be easier for you to read one of them than for me to repost the code here.
If you want to create a 20 frame animation, you will need to load 20 images, they take up the same size in an image list as they do in a bitmap.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Can I use serialization on a RecordSet Class? To be more exact. I have a program which does all sorts of things with a database. Can I save the results of a querry in a file? And can I load them when I want?
|
|
|
|
|
tanarnelinistit wrote: Can I use serialization on a RecordSet Class?
Yes.
tanarnelinistit wrote: Can I save the results of a querry in a file? And can I load them when I want?
Most definitely (to both).
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
|
Sanroop wrote: bitmaps to combobox
See Here
[^]
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
You can derived CComboBox and use from WM_DRAWITEM
like this
void CMyCombo::DrawItem(LPDRAWITEMSTRUCT lpDrawItem)
{
CDC dc;
CString str;
dc.Attach(lpDrawItem->hDC);
CRect rect(lpDrawItem->rcItem);
...
...
DrawIconEx(dc.GetSafeHdc(),rect.left,rect.top,
hIcon,0, 0, 0, NULL, DI_NORMAL);
...
...
dc.Detach();
}
|
|
|
|
|
I have a structure x which have a CString s; in it. I have created a pointer to that structure; In one of my functions i want to assing a string to that 's'; i wrote px->s = "y"; There i am getting an debug assertion failure window.
Can u show me the way.
Thank you.
KIRAN PINJARLA
|
|
|
|
|
did you create the structrure with the new operator?
modified 9-Mar-17 17:14pm.
|
|
|
|
|
|
why creating the struct in the heap ?
no need to call new .
|
|
|
|
|
Then how do you want to create the struct???
Dream bigger... Do bigger...Expect smaller
aji
|
|
|
|
|
struct TestStr {
CString m_str;
};
TestStr varTS;
varTS.m_str = _T("Another way");
TestStr* pTS = &varTS;
pTS->m_str = _T("Hello");
|
|
|
|
|
toxcct wrote: TestStr* pTS;pTS->m_str = _T("Hello");
this time to what pTS is points to????
Dream bigger... Do bigger...Expect smaller
aji
|
|
|
|
|
my mistake. fixed it. see the previous post.
|
|
|
|
|
Dream bigger... Do bigger...Expect smaller
aji
|
|
|
|