Skip to content

Commit

Permalink
[#78] Filenames must internally be represented in Unicode (Part 19: F…
Browse files Browse the repository at this point in the history
…ixed Part 17)
  • Loading branch information
tomas-nestorovic committed Feb 21, 2024
1 parent decaa45 commit dab0a22
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Main/src/ViewCriticalSector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
content->CreateStatic(this,1,2,WS_CHILD|WS_VISIBLE|WS_CLIPSIBLINGS);//WS_CLIPCHILDREN|
//content->CreateView(0,0,RUNTIME_CLASS(CPropertyGridView),CSize(splitX,0),&cc);
//const HWND hPropGrid=content->GetDlgItemHwnd( content->IdFromRowCol(0,0) );
propGrid.CreateEx( 0, (LPCTSTR)PropGrid::GetWindowClass(app.m_hInstance), nullptr, AFX_WS_DEFAULT_VIEW&~WS_BORDER, 0,0,PROPGRID_WIDTH_DEFAULT,300, content->m_hWnd, (HMENU)content->IdFromRowCol(0,0) );
propGrid.CreateEx( 0, app.GetPropGridWndClass(), nullptr, AFX_WS_DEFAULT_VIEW&~WS_BORDER, 0,0,PROPGRID_WIDTH_DEFAULT,300, content->m_hWnd, (HMENU)content->IdFromRowCol(0,0) );
content->SetColumnInfo(0,Utils::LogicalUnitScaleFactor*PROPGRID_WIDTH_DEFAULT,0);
//content->CreateView(0,1,RUNTIME_CLASS(CHexaEditor),CSize(),&cc); // commented out as created manually below
hexaEditor.Update( fSectorData, fSectorData );
Expand Down
1 change: 1 addition & 0 deletions Main/src/editor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@
cfPreferredDropEffect=::RegisterClipboardFormat(CFSTR_PREFERREDDROPEFFECT);
cfPerformedDropEffect=::RegisterClipboardFormat(CFSTR_PERFORMEDDROPEFFECT);
cfPasteSucceeded=::RegisterClipboardFormat(CFSTR_PASTESUCCEEDED);
propGridWndClass=PropGrid::RegisterWindowClass( m_hInstance );
// - registering recognizable Image types and known DOSes (in alphabetical order)
CImage::Known.AddTail( &CCtRaw::Properties );
CImage::Known.AddTail( &D80::Properties );
Expand Down
2 changes: 2 additions & 0 deletions Main/src/editor.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
DECLARE_MESSAGE_MAP()
private:
bool godMode;
ATOM propGridWndClass;
public:
class CRecentFileListEx sealed:public CRecentFileList{
CDos::PCProperties openWith[ID_FILE_MRU_LAST+1-ID_FILE_MRU_FIRST];
Expand Down Expand Up @@ -38,6 +39,7 @@
CRecentFileListEx *GetRecentFileList() const;
HWND GetEnabledActiveWindow() const;
bool IsInGodMode() const;
inline LPCTSTR GetPropGridWndClass() const{ return (LPCTSTR)propGridWndClass; }
inline CMainWindow *GetMainWindow() const{ return (CMainWindow *)m_pMainWnd; }
#if _MFC_VER>=0x0A00
afx_msg void OnOpenRecentFile(UINT nID);
Expand Down
5 changes: 3 additions & 2 deletions PropGrid/src/api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#define PG_CLASS_NAME _T("WCPropGridClass32")

ATOM WINAPI PropGrid::GetWindowClass(HINSTANCE hInstance){
ATOM WINAPI PropGrid::RegisterWindowClass(HINSTANCE hInstance){
// creates and returns PropertyGrid window class
WNDCLASS wc;
::ZeroMemory(&wc,sizeof(wc));
Expand All @@ -15,7 +15,8 @@
HWND WINAPI PropGrid::Create(HINSTANCE hInstance,LPCTSTR windowName,UINT style,int x,int y,int width,int height,HWND hParent){
// creates and returns a new instance of the PropertyGrid
//if (width<=2*CATEGORY_HEIGHT) width=2*CATEGORY_HEIGHT;
return ::CreateWindow( (LPCTSTR)GetWindowClass(hInstance), // making sure the window class is always defined
RegisterWindowClass(hInstance); // making sure the window class is always defined
return ::CreateWindow( PG_CLASS_NAME,
windowName,
WS_VISIBLE | WS_CLIPCHILDREN | WS_CLIPSIBLINGS | style,
x,y, width,height,
Expand Down
2 changes: 1 addition & 1 deletion PropGrid/src/api.h
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@
);
}

PROPGRID_DECLSPEC ATOM WINAPI GetWindowClass(HINSTANCE hInstance);
PROPGRID_DECLSPEC ATOM WINAPI RegisterWindowClass(HINSTANCE hInstance);
PROPGRID_DECLSPEC HWND WINAPI Create(HINSTANCE hInstance,LPCTSTR windowName,UINT style,int x,int y,int width,int height,HWND hParent);
PROPGRID_DECLSPEC HANDLE WINAPI AddPropertyW(HWND hPropGrid,HANDLE category,LPCWSTR name,PValue value,PCEditor editor,PCustomParam param=nullptr);
PROPGRID_DECLSPEC HANDLE WINAPI AddPropertyA(HWND hPropGrid,HANDLE category,LPCSTR name,PValue value,PCEditor editor,PCustomParam param=nullptr);
Expand Down

0 comments on commit dab0a22

Please sign in to comment.